Project

General

Profile

Actions

Bug #96502

open

ModifyUrlForCanonicalTagEvent Caching issue on dynamic detail pages?

Added by Reinhard Hiebl over 2 years ago. Updated over 2 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
SEO
Target version:
-
Start date:
2022-01-11
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Hello,
i have to modify the canonical tag. I do this thru the ModifyUrlForCanonicalTagEvent.
But after cache it always keeps the canonical url from the first cached page. Maybe additionalHeaderData in general is affected.
Don't know its a bug or i am using something wrong. The PageTitleGenerator works fine.

services.yaml
NS\MyExt\EventListener\CanonicalListener is called only once. Looks like route arguments below not respected in the cache hash?

services:
  ....
  NS\MyExt\EventListener\CanonicalListener:
    tags:
      - name: event.listener
        identifier: 'ns/myext/canonical'
        after: 'cs-seo/canonical'
        event: TYPO3\CMS\Seo\Event\ModifyUrlForCanonicalTagEvent

Site config.yaml
Looks like the my_ext_item_slug argument will not respected in the page cache hash?
This probably where the problem is. But why?
(I am using the Simple type because the data are fetched from an remote rest api)

routeEnhancers:
  MyExtItemDetail:
    type: Simple
    limitToPages:
      - 1047
    routePath: '/{my_ext_item_slug}'
    requirements:
      my_ext_item_slug: '^$|[a-zA-Z0-9-].*'
    _arguments:
      my_ext_item_slug: my_ext_item_slug

Actions #1

Updated by Reinhard Hiebl over 2 years ago

  • Description updated (diff)
Actions #2

Updated by Reinhard Hiebl over 2 years ago

  • Description updated (diff)
Actions #3

Updated by Oliver Hader over 2 years ago

  • Category set to SEO
Actions

Also available in: Atom PDF