Add to head footer bad render array

Created on 12 May 2021, over 3 years ago
Updated 27 August 2024, 3 months ago

Problem/Motivation

After the code has been added to make add to head assignable also to the footer, there are constant render warnings User error: "1" is an invalid render array key in Drupal\Core\Render\Element::children() that come from the bad render array added to the footer.

Steps to reproduce

Add some markup to the footer with add_to_head.

Proposed resolution

Remove the line 'add-to-head--' . $profile['name'], from add_to_head_page_bottom() - it copies the approach from the add_to_head_page_attachments_alter() but this approach does not work in the footer context.

Remaining tasks

Provide a patch. This is an easy fix but I can provide a patch if needed.

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇧🇬Bulgaria alexrayu

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024