Problem/Motivation

Drupal\schema_metatag\Plugin\metatag\Tag\SchemaItemListElementBreadcrumbBase generates a URL without collecting cacheable metadata.

Combined with other issues (see #3175248: Add cacheability metadata to URL tokens), this can result in 500 errors on JSON API requests.

Steps to reproduce

Proposed resolution

When generating a URL, use toString(TRUE)->getGeneratedUrl() to collect cacheability metadata.

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#3 3175266-2.x-3.patch983 bytesmbovan
#2 3175266-2.patch1.01 KBmbovan

Comments

mbovan created an issue. See original summary.

mbovan’s picture

Status: Active » Needs review
StatusFileSize
new1.01 KB

Patch that resolves above mentioned issue.

mbovan’s picture

Version: 8.x-1.x-dev » 8.x-2.x-dev
StatusFileSize
new983 bytes

I am providing a patch that applies to 2.x branch.

damienmckenna’s picture

Title: Collect cacheability metadata when generating URLs » Collect cacheability metadata when generating breadcrumb URLs
Status: Needs review » Reviewed & tested by the community
Parent issue: » #3367955: Plan for Schema Metatag 3.0.1
Related issues: +#3325539: Plan for Schema.org Metatag 8.x-2.5

This looks reasonable.

  • DamienMcKenna committed 957e74fe on 3.0.x authored by mbovan
    Issue #3175266 by mbovan, DamienMcKenna: Collect cacheability metadata...

  • DamienMcKenna committed ab12d77b on 8.x-2.x authored by mbovan
    Issue #3175266 by mbovan, DamienMcKenna: Collect cacheability metadata...
damienmckenna’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thank you.

damienmckenna’s picture

Version: 8.x-2.x-dev » 3.0.x-dev

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.