Bugfix synchronize module for users who do not use friendly url's.

The synchronize function will fail if you don’t use friendly url’s and will add short module names (only 8 positions) to your security tables. You can fix it by the following changes of the onvalidate event in the synchronize application:


//$arr_apps = array_diff(scandir($this->Ini->path_aplicacao . "../_lib/friendly_url/"), array('.','..'));
//foreach($arr_apps as $k => $v)
//{
    //$arr_apps[$k] = substr($v, 0, 8);
//}
$arr_apps=array();
$arr_apps_without_friendly = array_diff(scandir($this->Ini->path_aplicacao . "../"), array('.','..', 'index.php', 'index.html'),$arr_apps);


Thank you for sharing this. I remember reading about some issue with using friendly url’s, but I can’t seem to find it again. What is your opinion about the advantages/disadvantages of using friendly url’s? Since you created this bug fix, I have to assume that you do not use friendly url’s. Curious as to your reasons.

Well, it’s a new feature and I have a load of old projects. But on the other hand, what is the advantage? I start the main application (usually the logon) and then all is under control. The main applicaiton is started as part of the root of a website. Mostly the applications run hosted within an iframe of a cms. For me there’s no need and just some extra work to define.

Thank you. I am in a similar situation - just not that many projects:) But I am trying to catch up quickly (on the knowledge that is).

Life saver again, thanks Albert! This was driving me crazy…

How do you “Use Friendly URL’s” in the application?

No idea, I don’t use it.

yes, better not to actually, friendly URL = headache friendly. i don’t remember why, but stopped using it long time back.
now again, i came to this post because i had this issue of sync apps, now is it solved, thanks Albert, like always, a life saver :slight_smile:

Albert @aducom my question was regarding where to even find the option of “Friendly URLS” in Scriptcase 8.1
I have a hosted environment setup for Scritpcase and I want to keep things as “stock” as possible… your fix posted above is excellent, but I would like to find a way to not have to use it on each project.

Thanks!

option is available under “settings > friendly url” issues will need to give permissions in security for all applications twice once for friendly url and one for normally, i remember there was issues with friendly URL so you need to test some stuff before using it, if you use friendly-url.

what you mean by a stock as possible