No errors in drush wd-show but there are these warnings I was advised to share here:
Warning: htmlspecialchars_decode() expects parameter 1 to be string, array given in Drupal\metatag\MetatagManager->generateElements() (line 299 of /home/zantech0/public_html/benia.biz/modu
Warning: preg_match_all() expects parameter 2 to be string, array given in Drupal\Core\Utility\Token->scan() (line 246 of /home/zantech0/public_html/benia.biz/core/lib/Drupal/Core/Utility/
Warning: htmlspecialchars_decode() expects parameter 1 to be string, array given in Drupal\metatag\MetatagManager->generateElements() (line 299 of /home/zantech0/public_html/benia.biz/modu
Warning: preg_match_all() expects parameter 2 to be string, array given in Drupal\Core\Utility\Token->scan() (line 246 of /home/zantech0/public_html/benia.biz/core/lib/Drupal/Core/Utility/
Comment | File | Size | Author |
---|---|---|---|
#23 | Diff.JPG | 118.62 KB | Benia |
#20 | metatag-n2776785-20.patch | 962 bytes | DamienMcKenna |
#9 | metatag-n2776785-9.patch | 1.04 KB | DamienMcKenna |
Comments
Comment #2
DamienMcKennaThat sounds like one of the meta tags stores multiple values and code somewhere is trying to process the meta tag's value array incorrectly..
Comment #3
DamienMcKennaI'm unable to identify where this could be happening, please try updating to the latest -dev snapshot and let me know if the problem persists.
If the problem does continue happening, please install the Devel module and see if you use it to identify what is causing the problem.
Comment #4
Benia CreditAttribution: Benia commentedHi ! can I update the current module version to the latest dev release?
If I can't, I'll just backup the site in Ubuntu, delete the current module with all its data, and try there.
---
Btw, I can use devel; If you need any specific data from Devel, please tell me and I will try to extract it.
Comment #5
DamienMcKennaYes, you should be able to update to the -dev snapshot without any problems, in theory anyway ;-) Please also update Token, the latest version fixes issues with it.
Comment #6
Benia CreditAttribution: Benia commentedI searched in Google how to update a module in D8 to dev version but found mostly data to D7. I tried to replicate the D7 data with drush and did there:
drush up metatag 8.x-1.x-dev
Though it outputted: "No code updates available."probably a different way available?
Comment #7
DamienMcKennaTry this: drush dl metatag-8.x-1.x-dev
Comment #8
Benia CreditAttribution: Benia commentedWell, I did drush up and updated token to version 8.x-1.0-beta1 ...
I then did drush dl metatag-8.x-1.x-dev and now uses this version.
I did drush cr and then drush ws --full but I still see the exact same errors... :\
Comment #9
DamienMcKennaOk.
Please try this patch, let me know what it outputs.
Comment #10
Benia CreditAttribution: Benia commentedIt seems that the patch fixed the issue. Thanks!!! Here is the full drush trace:
If you need to check any devel data please tell me what it is and I will gladly extract it (I'm new to Devel, saw an intro do Devel 8 in Youtube but might need a bit detailed explanation where to look for the data).
Thanks again for all your time and help!!!
Comment #11
DamienMcKennaThe patch couldn't have fixed the problem, it should just display more info when the bug happens. I forgot to mention, you also need to install the "Devel Kint" module that comes with Devel, once you have that installed it should start displaying extra info.
Comment #12
Benia CreditAttribution: Benia commentedI printed kint($variables) under preprocess_html. What data needed?
Comment #13
DamienMcKennaThe patch should output a bunch of information if it comes across a scenario where htmlspecialchars_decode() is being passed an array, see if you can trigger that scenario again.
Comment #14
Benia CreditAttribution: Benia commentedWhen I go to kint on a node with Metatag data and all +- 1000 rows appear I can't track htmlspecial or even ().
I think I'm not in the right place.
Comment #15
DamienMcKennaYou shouldn't need to go to a specific Kint page to see the messages, they should be displayed on the page where the errors were happening.
If the errors only showed in Drush, try changing the lines to use print_r() instead of kint() and run the drush commands again.
Comment #16
Benia CreditAttribution: Benia commentedOkay now drush ws --full does show 2 errors:
Comment #17
DamienMcKennaPlease see #2671060: Use SortArray::stableUasort instead uasort to prevent warnings (Array was modified by the user comparison function) for the Token issue.
So the htmlspecialchars_decode() error is happening on a specific page. Try changing the lines back to kint() instead of print_r(), viewing that page and see if you can see the errors.
Comment #18
Benia CreditAttribution: Benia commentedOh I saw that with kint... I happens basically on any page where there is Metadata I added with Metatag...
Given the 99% of such Metadata is in Hebrew, I guess it is related.
Comment #19
DamienMcKennaCould you please upload a screenshot of the values, or contact me privately if you don't want to make that information public? That'll be the key to working out what's going wrong.
Comment #20
DamienMcKennaTry this patch, it should help spot what meta tag is causing the problem.
Comment #21
Benia CreditAttribution: Benia commentedSeems not to apply (Should I worry from such an error? Has something partially changed?)
Comment #22
DamienMcKennaIn that case, just replace this line:
with these:
Comment #23
Benia CreditAttribution: Benia commentedPlease look what happens in the file itself when I do so...
Comment #24
DamienMcKennaOk. So what errors are displayed on the page now? You might need to be logged in as an admin in order to see them.
Comment #25
Benia CreditAttribution: Benia commentedI've sent you Teamviewer details to email.
Comment #26
DamienMcKennaDon't worry about the patch at this point, just focus on changing the file to match what is in #22 above and then see what messages are displayed on the website.
Comment #27
DamienMcKennaDoes the problem still happen with the latest release?
Comment #28
Benia CreditAttribution: Benia commentedIndeed, just did drush ws --full and seems it does...
Comment #29
Benia CreditAttribution: Benia commentedIt is most likely a migration issue because another site that was built right on D8 and not migrated from D7 doesn't have these errors even though I use metatag with it as well...
Comment #30
DamienMcKennaDoes the problem still happen with 1.2 or even the latest dev snapshot?
Comment #31
DamienMcKennaComment #32
gngn CreditAttribution: gngn at Computer Manufaktur GmbH commentedI still see the three described warnings with 8.x-1.16 (not current version but also not 4 years old).
Digging into it...
Update: I think the update_hook messed with the mask_icon configuration.
It changed from
to
and thus introduced another "array layer".
Setting the correct values at /admin/config/search/ transformed the config back to the old value.
And with that it's working.
So sorry about the false alarm.