• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

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