Unnecessary watchdog messages: The basic/advanced tag group is missing a value for the description element

Created on 13 May 2023, over 1 year ago
Updated 17 May 2023, over 1 year ago

Problem/Motivation

After upgrading from metatag-7.x-1.30 to metatag-1.31 on an existing site, I started getting the following error messages on the first page load after a cache-clear...

The basic tag group is missing a value for the description element.
The advanced tag group is missing a value for the description element.

My Global and Global: Front page metatag defaults did not have a Basic tags -> Description default, so I created one (and verified it was showing up in the page source, i.e.: as <meta name="description" .../>) but this didn't seem to make the messages go away.

Further, Nodes metatag defaults had been configured to use the token [node:summary] for the Basic tags -> Description default, but I would get the same message if the node was the first page loaded after a cache clear, even if I could see the node's summary in the page source.

(on my site, no other metatag types are enabled)

It appears that the code to log this message was added in πŸ› Undefined array key "description" on Feeds integration Fixed , i.e.: commit 1e9db0aa to the 7.x-1.x branch.

(on my site, feeds is neither downloaded nor installed)

Steps to reproduce

I have not verified these steps on a fresh installation yet, but my guess is:

  1. Download drupal-7.97, and install using the standard install profile. Ensure core's dblog module is enabled.
  2. Download metatag-7.x-1.30 and install.
  3. Enable the Global metatag type and add a Basic tags -> Description.
  4. Enable the Global: Front page metatag type. Edit it to verify that it is inheriting the Basic tags -> Description from the Global metatag type.
  5. Enable the Node metatag type, and set its Basic tags -> Description to the token [node:summary].
  6. Create a node, and add a node summary. Save.
  7. In a new tab/window, go to /admin/reports/dblog. Optionally, clear log messages to make it easier to see the problem.
  8. In a new tab/window, go to /admin/config/development/performance and flush caches.
  9. Return to the tab with the node, and refresh the page. View the page source and verify the meta tag with the name description has a value set to the summary of the node you just entered.
  10. Return to the tab with the Recent log messages report, and refresh. Note there are no new log messages of type metatag.
  11. Return to the tab with the Performance settings and flush caches again.
  12. In a new tab/window, navigate to the front page. View the page source and verify the meta tag with the name description has a value of the Global default you set earlier.
  13. Return to the tab with the Recent log messages report, and refresh. Note there are no new log messages of type metatag.
  14. Upgrade metatag to metatag-7.x-1.31. Make sure to run update.php.
  15. Return to the tab with the Performance settings and flush caches again.
  16. Return to the tab with the node, and refresh the page. View the page source and verify the meta tag with the name description has a value set to the summary you just entered.
  17. Return to the tab with the Recent log messages report, and refresh. Note there are at least two new log messages of type metatag (and if you view details about the log message, the location will be that of the node view page)...
    • The basic tag group is missing a value for the description element.
    • The advanced tag group is missing a value for the description element.
  18. Return to the tab with the front page, and refresh. View the page source and verify the meta tag with the name description has a value of the Global default you set earlier.
  19. Return to the tab with the Recent log messages report, and refresh. Note there are at least two new log messages of type metatag (and if you view details about the log message, the location will be that of the front page)...
    • The basic tag group is missing a value for the description element.
    • The advanced tag group is missing a value for the description element.

Proposed resolution

To be determined.

Remaining tasks

  1. Verify the steps to reproduce.
  2. Review and feedback.
  3. RTBC and maintainer feedback.
  4. Commit.
  5. Ideally, make another release.

User interface changes

To be determined.

API changes

To be determined.

Data model changes

To be determined.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada mparker17 UTC-4

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

Comments & Activities

Production build 0.71.5 2024