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.
Fatal error: Cannot use string offset as an array in radix/template.php on line 77 in radix_preprocess_page.
I only received this logging out and trying to log back in.
The array looks like this:
$link[0] = 'authcache_ensure_element_cacheable';
I added an isset($link['#link']) prior to the assignment, but maybe this is not correct. Action links as buttons are still working.
Patch attached, but maybe this is actually an Authcache issue. Works for me for now, thanks again for everything!
Comment | File | Size | Author |
---|---|---|---|
#4 | radix-iterate_over_link_elements-2201773-4.patch | 982 bytes | barraponto |
radix-template-authcache2x.patch | 582 bytes | jason.fisher |
Comments
Comment #1
jason.fisher CreditAttribution: jason.fisher commentedComment #2
barraponto CreditAttribution: barraponto commentedWell, you seem to have made the error go away, but does the link work?
Comment #3
znerol CreditAttribution: znerol commentedThe correct way to iterate through render arrays is to use element_children. This function will ignore properties (i.e. keys starting with
#
).Comment #4
barraponto CreditAttribution: barraponto commentedFollowing @znerol's suggestion, I'm using element children to iterate.
@jason.fisher can you check it fixes your issue?
Comment #5
shadcn CreditAttribution: shadcn commented@Capi, feel free to commit this if tested. Thanks.
Comment #6
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedYes. this works.
Comment #8
shadcn CreditAttribution: shadcn commentedComment #10
cgove CreditAttribution: cgove commentedJust want to thank you for this! I was pulling my hair out.