- Issue created by @pvbergen
- @pvbergen opened merge request.
- Status changed to Fixed
about 1 year ago 8:09am 24 October 2023 Automatically closed - issue fixed for 2 weeks with no activity.
- @pvbergen opened merge request.
There is an error with pagedesigner_yoast if metatag:2.x is used:
Notice: unserialize(): Error at offset 0 of 122 bytes in Drupal\pagedesigner_yoast\Plugin\Field\FieldFormatter\DescriptionFormatter->viewElements() (line 29 of modules/contrib/pagedesigner/modules/pagedesigner_yoast/src/Plugin/Field/FieldFormatter/DescriptionFormatter.php).
Drupal\pagedesigner_yoast\Plugin\Field\FieldFormatter\DescriptionFormatter->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 265)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 256)
Drupal\views\Entity\Render\EntityFieldRenderer->buildFields(Array) (Line: 143)
Drupal\views\Entity\Render\EntityFieldRenderer->render(Object, Object) (Line: 833)
Drupal\views\Plugin\views\field\EntityField->getItems(Object) (Line: 1151)
Drupal\views\Plugin\views\field\FieldPluginBase->advancedRender(Object) (Line: 238)
This is caused by the stored data now being JSON instead of serialized arrays.
1. Install drupal/metatag:^1.0
2. Install pagedesigner_yoast, add yoast_seo field to a node and add some data.
3. Use the "pagedesigner_yoast_metatag_description" formatter on the yoast_seo description field in a view. The view renders normally.
3. Upgrade to drupal/metatag:^2.0, run update scripts.
4. The view renders no more description and produces the error above.
drupal/yoast_seo:^1.0 || ^2.0 do not specify the version of metatag to use.
So, we need to allow both formats, using unserialize and Json::decode.
- Implement a check on the data provided and unmarshall it accordingly.
None
None
None
Fixed
3.0
Code
Automatically closed - issue fixed for 2 weeks with no activity.