Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
getting a pile of these:
Warning: htmlspecialchars() expects parameter 1 to be string, array given in check_plain() (line 1572 of E:\wamp\www\boma\includes\bootstrap.inc).
tracing it back i see that in function entity_token_token_info_alter(&$info) i see at line 156:
'name' => t('@type with delta @delta', array('@delta' => $i, '@type' => $info['types'][$token_type]['name'])),
issue is $info['types'][$token_type]['name'] is an array.. which trickles down to format_string and then htmlspecialchars (needs to be a string)
fyi.. the array is (Nodes, Workflows)
not sure best fix but issue i think is basically that we have an ambiguous token; likely needs a current() in here somewhere
Comment | File | Size | Author |
---|---|---|---|
#3 | ambiguous_type_token-1604898-3.patch | 922 bytes | idflood |
#1 | entity-ambiguous_type_token.patch | 918 bytes | liquidcms |
Comments
Comment #1
liquidcms CreditAttribution: liquidcms commentedthis patch fixes this but i suspect a bigger issue at the root of this problem
Comment #3
idflood CreditAttribution: idflood commentedHere is a reroll of patch in #1. But as mentioned, I feel the root issue is somewhere else.
Comment #4
idflood CreditAttribution: idflood commentedComment #5
kenorb CreditAttribution: kenorb commentedThe same problem here.
Probably the root was just the custom patch available at: https://drupal.org/files/issues/commerce_express_checkout.tokens.inc_.patch
See: #2247295: Support for tokens
But still not sure what could be wrong with it.
Comment #6
kenorb CreditAttribution: kenorb commentedIn my case this warning was causing the Migrate Exception during the migration of data (via Migrate) by stopping the records from being migrated.
Unfortunatelly I can't afford time of finding and fixing the root problem (too much debugging).
So I've tested the patch and it works correctly.
Comment #7
Christopher Riley CreditAttribution: Christopher Riley commentedI would really like to see this patch added to the distribution. There seems to be way too many people that cannot do coding correctly and although it is not your responsibility to fix bad code in their modules this patch seems to take care of the majority of issues out there.
Comment #8
nerdacus CreditAttribution: nerdacus at Metal Toad commentedThis patch (#3) does quite the warnings in dblog, but I do agree that it is a symptom of problem created somewhere else.
Comment #9
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedThe 6 year old patch in #3 to entity_token.tokens.inc applied cleanly to the latest entity 7.x-1.x-dev and (if relevant) still needs review.