Serious generator bug in SC8 [SHOWSTOPPER!]

If you generate a security module you have the following codesnippet generated in the onvalidateok:


		sc_apl_conf($rs->fields[0], 'insert', has_priv($rs->fields[2]));
		sc_apl_conf($rs->fields[0], 'delete', has_priv($rs->fields[3]));
		sc_apl_conf($rs->fields[0], 'update', has_priv($rs->fields[4]));
		//export
		$export_permission = 'btn_display_'. has_priv($rs->fields[5]);
		sc_apl_conf($rs->fields[0], $export_permission, 'xls');

this generates:


         }
1642|
1643|         $_SESSION['scriptcase']['sc_apl_conf'][$this->rs->fields[0]]['insert'] = 'has_priv($this->rs->fields[2]');
1644|         $_SESSION['scriptcase']['sc_apl_conf'][$this->rs->fields[0]]['delete'] = 'has_priv($this->rs->fields[3]');
1645|         $_SESSION['scriptcase']['sc_apl_conf'][$this->rs->fields[0]]['update'] = 'has_priv($this->rs->fields[4]');
1646|         


If you look at the code the ‘)’ is generated after the quote in stead of before the quote causing a syntax error if you want to run it:

Parse error: syntax error, unexpected ‘)’ in D:\Software\NetMake\v8\wwwroot\scriptcase\app\DOHMWeb\main_logon\main_logon_apl.php on line 1644

this is a ***very *** serious problem which needs attention ASAP!!

Albert, already tested the security module of SC8 didn’t find serious issue, only the one that you have to remove the onApplicationInIt code to be get rid of the error message and be able to continue to apps x groups for permissions selecting…

others for permissions and functionality worked ok in application, so what this wrong code does in practice?

[QUOTE=itsme3;26739]Albert, already tested the security module of SC8 didn’t find serious issue, only the one that you have to remove the onApplicationInIt code to be get rid of the error message and be able to continue to apps x groups for permissions selecting…

others for permissions and functionality worked ok in application, so what this wrong code does in practice?[/QUOTE]

It is as I said above. If I run the application I get the php runtime error and as you can see the code in the php is wrong. I removed the onapplicationinit code, but that doesn’t make the error go away as it is still generated wrong. I updated SC this morning, don’t know if that has something to do with it. I’ll work my way around it, but it is still an error.

Well, ok, sometimes it’s better to start all over again and forget about the issue. I recreated the security module and it’s working fine now. I hate obscure errors like these.

this is number 3 after:
1- i hate workarounds
2- i hate bartho saying “reported to our bugs team” (copyright Giu)
3- i hate to see you mad Albert, relax, you gave me hope when first started with SC and was fighting all over to know how things work :smiley:

cheers

Like this? http://www.scriptcase.net/forum/showthread.php?6909-Error-in-PHP-generation-due-to-quot-character-quot

No I don’t. Problem is that when bugs are not reproducable I can imagine that SC would have a problem fixing it. That’s why I hate obscure bugs. Nothing new, the excists in my own software too from time to time :wink: