Intermittent Missing Custom Meta Tags and Blank Sections on Drupal Pages After Frequent Content Updates

Created on 11 February 2025, 2 months ago

Hello,

We are facing an intermittent issue on our Drupal site (version 9.4.12) where the meta tags (title and description) sometimes disappear from the frontend. This issue appears after frequent content updates in the CMS backend and we have also observed that some sections of the page are appearing blank without any data, while other sections display properly.

It is unclear why any frequent content updates would be causing the metatags and sections to break.

Architecture Overview:

  • Three server instances behind a load balancer, serving the Drupal application.
  • AdvAgg drupal module
  • CDN Cache
  • Drupal cache is enabled

For information, these metatags modules has been installed:
metatag
metatag_open_graph
metatag_twitter_cards
metatag_views
schema_metatag

Thanks

💬 Support request
Status

Active

Version

1.21

Component

Miscellaneous

Created by

🇮🇳India santhosh_103

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

Comments & Activities

  • Issue created by @santhosh_103
  • 🇺🇸United States DamienMcKenna NH, USA

    That is definitely a weird error.

    I suggest you first upgrade your codebase to the latest D10 (or 11) and Metatag 2 releases, and see if the problem persists.

  • 🇮🇳India santhosh_103

    Thank you for the suggestion. We will definitely take this suggestion and upgrade and will see if the issue persists.

    However, we have noticed that this issue does not occur in our UAT environment or when Drupal is running on a single instance, but only in multiple server instances (in load balancer setup). Are there any specific pointers in terms of configuration we might have overlooked when it is a load balancer environment.

    Thanks

  • 🇺🇸United States DamienMcKenna NH, USA

    That is really odd.

    You might look to make sure the caching is working correctly, in particular that each environment is correctly able to access the caching system - presuming you're using memcache or redis.

  • 🇮🇳India santhosh_103

    Thanks for the suggestions. Wanted to share a few additional observations.
    As mentioned earlier , after frequent content updates in the cms backend, we sometimes getting the following errors

    1. Error: Undefined constant "Drupal\node\Entity\DRUPAL_OPTIONAL" in Drupal\Core\Entity\EntityStorageBase->mapFromStorageRecords() (line 452 of core/lib/Drupal/Core/Entity/EntityStorageBase.php)
    2. PHP Exception InvalidArgumentException: "Field body is unknown." at core/lib/Drupal/Core/Entity/ContentEntityBase.php line 587
    3. Additionally, some fields disappear on certain content types, leaving only the title visible.

    Would appreciate any guidance or insights you might have on these issues.

  • 🇺🇸United States DamienMcKenna NH, USA

    That seems like something is failing badly and caches are being rebuilt while content is saving.

    Do you have memcache, redis or something else set up as a cache backend?

    Do you have any custom code that interacts with the cache system?

  • 🇮🇳India santhosh_103

    Currently, we don't have memcache or Redis set up as a cache backend yet and we are using the database as the cache backend at the moment.
    Yes, we are using custom code to store one of the API response in the cache. There is no other custom code interacting with the cache system beyond this API response caching. Please let us know if the custom code can create an issue.

    Thanks,

Production build 0.71.5 2024