app include buttons error and tools buttons are gone

Hello,

some weeks ago I tried to create custom buttons at Tools->Layout->Buttons. All of a sudden ALL buttons disappeared. I was still able to work with SC and produce my apps, until now. Yesterday I started my App and all of a sudden I get this error:

Error
include(/serverpath/scriptcase6/scriptcase/app/folder/_lib/buttons) [function.include]: failed to open stream: Success

Error
include() [function.include]: Failed opening '/serverpath/scriptcase6/scriptcase/app/folder/_lib/buttons/' for inclusion (include_path='.:/usr/local/lib/php')

Below those errors I can still see my app. When I check on server, all files are present in folder “buttons”. I already ran SC Update, but buttons are still not visible in Tools->Layout->Buttons

sc-buttons.jpg

sc-buttons-1.jpg

OnApplicationIni I aaplied some code for automatic language change…language code I will get with my CMS later on, right know the language code is hardcoded…it looks like this code is causing the problem “sc_set_language”:

// GET LANGUAGE
$ActiveLanguage = 'german';
[ActiveLanguage] = $ActiveLanguage;

// SET LANGUAGE
if ($ActiveLanguage === 'german'){
sc_set_language('de');
}
elseif ($ActiveLanguage === 'english'){
sc_set_language('en_us');
}
else {
sc_set_language('en_us');
}

Hello poltergeist,

If you comment sc_set_language, does the error stops from happening?

Please do a manual update.

I highly recommend you to get in touch with our support regarding this issue. Our chat is active on workdays from 8:00am to 6:00pm, and our ticket system is always available.

In addition, I have reported this issue to our bugs team.

regards,
Bernhard Bernsmann

Hello Bartho…Ticket is already under investigation…I send my app as well…

Answering your question: Yes…this code does not produce any error

// GET LANGUAGE
sc_reset_global ([ActiveLanguage]);
$ActiveLanguage = 'english';
[ActiveLanguage] = $ActiveLanguage;
echo $ActiveLanguage;
// SET LANGUAGE
if ($ActiveLanguage = 'german'){
// sc_set_language('de');
	echo 'is german';
}
elseif ($ActiveLanguage = 'english'){
// sc_set_language('en_us');
	echo 'is english';
}
else {
// sc_set_language('en_us');
	echo 'no language';
}

But, I can use sc_set_language(‘en_us’); stand alone and it will work

PS. Thank you for support…I ran a backup of all projects and will do manual SC update even though I have the latest version

I ran a manual update, but buttons with Tools->Layout->Buttons are still not visible…code does still produce error!

I was afraid that the library was corrupted on your SC.

As the error shows

“Failed opening ‘/serverpath/scriptcase6/scriptcase/app/folder/_lib/buttons/’”

Have you set read permission recursively on /sc6? Just trying to assure that the error isn’t happening due to a lack of permission, although I don’t think this is causing the issue.

Also, our bugs team is now aware of this issue. You should get an update here, or from our support team.

regards,
Bernhard Bernsmann

do i need to set 777 with all SC folders? Or 775? The issue with missing buttons at Tools->Layout->Buttons occured like 4 month ago when i tried to copy a button theme. I didn’t mind at that point because SC was still running smooth.

The other issue is error Failed opening '/serverpath/scriptcase6/scriptcase/app/folder/_lib/buttons/ with my code mentioned earlier. I can use sc_set_language stand alone and it will work with no error. As soon as I use it with if statement I get this error.

Thank u for support…

Fresh installation with SC6…buttons are back to good, but:

/serverpath/scriptcase6/scriptcase/app/folder/_lib/buttons/

Issue still remains…

tried my code in another form application…worked…will try to rebuild my app

nope…new Grid+LinkedForm in IFrame…I still get the error!

[QUOTE=poltergeist;11380]do i need to set 777 with all SC folders? Or 775? The issue with missing buttons at Tools->Layout->Buttons occured like 4 month ago when i tried to copy a button theme. I didn’t mind at that point because SC was still running smooth.

The other issue is error Failed opening '/serverpath/scriptcase6/scriptcase/app/folder/_lib/buttons/ with my code mentioned earlier. I can use sc_set_language stand alone and it will work with no error. As soon as I use it with if statement I get this error.

Thank u for support…[/QUOTE]

Hello,

Thanks for your feedback!

As to the permission, that will depend if you are working on a dedicated server or a host server.

As to the issue, our bugs team is aware and running a few tests.

regards,
Bernhard Bernsmann