• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Please beaware of a breaking change in the REST API on the next Plesk release (18.0.62).
    Starting from Plesk Obsidian 18.0.62, requests to REST API containing the Content-Type header with a media-type directive other than “application/json” will result in the HTTP “415 Unsupported Media Type” client error response code. Read more here

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