- Issue created by @dima.iluschenko
- @dimailuschenko opened merge request.
- Status changed to Needs work
over 1 year ago 8:06pm 7 March 2023 - 🇨🇭Switzerland berdir Switzerland
#text must be a string. I'm pretty sure I saw an issue about this before but can't find it right now. The right fix would be to either recurse into those definitions in the metatag processsor or skip them. There temds to be quite a bit of cruft in metatag fields as they have arrays and sersialized strings and what not.
- 🇪🇸Spain dima.iluschenko Malaga
I agree with you, but I think in any case there should be a check for a string, since we cannot predict in which modules such a problem can still get out.
- 🇨🇭Switzerland berdir Switzerland
It shouldn't be silently ignored then though, in that case it should result in a warning or something with more context so it can be identified more easily.
- Status changed to Needs review
over 1 year ago 8:37pm 28 March 2023 - 🇪🇸Spain dima.iluschenko Malaga
Hi @Berdir
please see my latest changes - I have added logging for such cases: https://git.drupalcode.org/project/tmgmt/-/merge_requests/42.diff
Is there anything else needed? - 🇨🇭Switzerland berdir Switzerland
Added some comments.
More importantly, you want to fix the problem at the source, in \Drupal\tmgmt_content\MetatagsFieldProcessor::extractTranslatableData, to make sure that non-string elements are not added in the first place, not skip them later on.
- last update
over 1 year ago 117 pass - last update
over 1 year ago 117 pass - Open on Drupal.org →Core: 9.5.x + Environment: PHP 7.3 & MySQL 8last update
over 1 year ago Not currently mergeable. - last update
over 1 year ago 117 pass - 🇪🇸Spain dima.iluschenko Malaga
Hello @Berdir,
I got your point. Thank you for the hint. I've adjusted PR https://git.drupalcode.org/project/tmgmt/-/merge_requests/42/diffs
If you need more help feel free to tag me. - 🇪🇸Spain dima.iluschenko Malaga
Hello @Berdir,
could you please review this small patch? - Status changed to Needs work
over 1 year ago 6:27am 12 May 2023 - 🇨🇭Switzerland berdir Switzerland
There are more metatag types that have structured data, I would prefer a check if the value is an array instead of just a hardcoded single exclusion.
You should also extend the test in \Drupal\Tests\tmgmt_content\Kernel\ContentEntityMetatagTest with more data to cover this.
- last update
over 1 year ago 117 pass - 🇪🇸Spain dima.iluschenko Malaga
Hi Berdir,
I've updated the code. Pls, verify https://git.drupalcode.org/project/tmgmt/-/merge_requests/42/diffs.
- Status changed to Needs review
over 1 year ago 6:50pm 18 June 2023 - 🇨🇭Switzerland berdir Switzerland
Closing as duplicate of 📌 Support metatag 2 and avoid errors on complex (non-string) metatags Needs review which marks them as untranslatable so they are not lost and extends test coverage to fully test it with proper metatags.
- Status changed to Closed: duplicate
about 1 year ago 10:51pm 13 September 2023