Serialization has change in Drupal 11.4.6

$ drush en single_content_sync -y

Fatal error: Declaration of Drupal\content_sync\Normalizer\EntityReferenceFieldItemNormalizer::normalize($field_item, $format = null, array $context = []): ArrayObject|array|string|int|float|bool|null must be compatible with Drupal\serialization\Normalizer\ComplexDataNormalizer::normalize($object, $format = null, array $context = []): array in /Users/philglatz/dev/Servers/pglatz/my-day-www/web/modules/contrib/content_sync/src/Normalizer/EntityReferenceFieldItemNormalizer.php on line 48

Comments

pglatz created an issue. See original summary.

nginex’s picture

Status: Active » Postponed (maintainer needs more info)

isn't that issue of content_sync module? Nothing to do with single_content_sync

pglatz’s picture

My apologies; it was for content sync that had this issue. I was able to install your module, but when I load any node page, I'm seeing this:

TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given in array_key_exists() (line 236 of modules/contrib/single_content_sync/src/ContentSyncHelper.php).
array_key_exists() (Line: 236)
Drupal\single_content_sync\ContentSyncHelper->access() (Line: 238)
Drupal\single_content_sync\Form\ContentExportForm->access()
call_user_func_array() (Line: 66)
Drupal\Core\Access\CustomAccessCheck->access()
call_user_func_array() (Line: 160)
Drupal\Core\Access\AccessManager->performCheck() (Line: 136)
...

nginex’s picture

@pglatz you inatalled module incorrectly (due to the above error), can you uninstall it and install again, so all configs are in place. Besides, when you install the module don't forget to export configs

pglatz’s picture

Thanks, that did the trick. Nice module.

pglatz’s picture

Please elaborate on exporting configs. I am testing on a dev server. What do I export before using the module? I'm looking at the single export page and don't see the module listed. Should I export all configs?

I'm exporting from one server, which does show single_config_sync.settings as a configuration type. I'm importing to a second server that has the same content type, but single_config_sync.settings is not listed as a configuration type when I try to import. I looked at the first server, and it also does not list it as a configuration type for import.

anybody’s picture

Status: Postponed (maintainer needs more info) » Active

Maybe #6 should go into a new feature request issue, if @nginex thinks it makes sense?

Guess this can be closed then.