• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Sitebuilder 4.0.0 Error: Argument 1 passed to SB_Session_Environment::saveLocale()

I

isabel.estevao

Guest
I've made an upgrade from sitebuilder 3.0.2 to the new sitebuilder 4.0.0 through rpm packages on suse93.x86_64 and no errors returned.
When I try to access sitebuilder it gives me the following error:


Notice: Undefined offset: 4096 in /usr/local/sitebuilder/include/Base/SyntaxException.php on line 49

File: /usr/local/sitebuilder/include/SB/Session/Environment.php; Line: 81
Message: PHP : Argument 1 passed to SB_Session_Environment::saveLocale() must be an instance of SB_ORM_Locale, null given, called in /usr/local/sitebuilder/include/SB/Auth.php on line 42 and defined; Code: 4096


Any ideas?
 
Looks like that you lost one of the locales during the upgrade.

The following SQL query detects broken links:
select user_settings.id, locale_id from user_settings left join locale on locale_id=locale.id where locale.id is null;

Info about installed locales located in the table 'locale':
select * from locale;

To fix the problem you must correct broken links. For example:
mysql> select user_settings.id, locale_id from user_settings left join locale on locale_id=locale.id where locale.id is null;
+----+-----------+
| id | locale_id |
+----+-----------+
| 1 | 5 |
+----+-----------+
1 row in set (0.00 sec)

mysql> select id from locale;
+----+
| id |
+----+
| 1 |
+----+
1 row in set (0.00 sec)

mysql> update user_settings set locale_id = 1 where id = 1;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0

mysql> select user_settings.id, locale_id from user_settings left join locale on locale_id=locale.id where locale.id is null;
Empty set (0.00 sec)
 
Back
Top