- Issue created by @ragnarkurm
- 🇫🇷France louis-cuny
An issue exist about drupal core but seems to be planned for D11
Whenever enabling the module on Drupal 10 I get unserialize(NULL)
error.
It happens in web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php
, Line 604:
$values[$id][$field_name][$langcode][$property_name] = (!empty($column_attributes['serialize'])) ? unserialize($row[$column_name]) : $row[$column_name];
The full message is this:
Deprecated function: unserialize(): Passing null to parameter #1 ($data) of type string is deprecated in Drupal\Core\Entity\Sql\SqlContentEntityStorage->loadFromSharedTables() (line 604 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
Indeed, the table menu_link_content_data
has column translated_link_url__options
, and the values are all NULL
.
Running this
update menu_link_content_data set translated_link_url__options = 'N;';
will fix the issue.
My scenario was following:
drush cr
because of the unserialize(NULL)
errors.It can be repeated:
drush pm-uninstall multilingual_menu_urls
drush en multilingual_menu_urls
drush cr
... and the error appears again.Install hook that takes care of converting that serialized field from NULL to N;
.
Active
1.0
Code
An issue exist about drupal core but seems to be planned for D11