Problem/Motivation

Coming from #3520384: Append views display type to element name:

Lupus CE renderer correctly adds this cache contexts:
'url.query_args:_content_format',
'url.query_args:_select',

But that's apparently not enough, since the content-format can be set via request attribute as well - as done by lupus_decoupled_ce_api.

Steps to reproduce

see ##3520384: Append views display type to element name

Proposed resolution

That means, lupus_ce_renderer should expose this is a new cache context which works like getContentFormatFromRequest() method.

Then we can replace our url.query_args._content_format cache context with the new cache context.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

fago created an issue. See original summary.

useernamee’s picture

fago’s picture

Status: Active » Needs review

Added MR including test coverage. I also verified manually that the change fixes the described issue.

useernamee’s picture

Status: Needs review » Needs work

One things that needs a check is that ContentFormatCacheContext needs to implement an interface.

Kernel test is passing.

fago’s picture

Status: Needs work » Needs review

thx. I addressed your remarks, either fixed or commented - see comments above!

useernamee’s picture

Status: Needs review » Reviewed & tested by the community

All PR comments are resolved. RTBC

  • fago committed 90cd082c on 2.x
    Issue #3520910 by fago, useernamee: Cache context ignores request...
fago’s picture

Status: Reviewed & tested by the community » Fixed
useernamee’s picture

Tested locally and it fixes the issue described in the ticket.

**offtopic** I had some issues testing it locally with the layour_builder integration. Which I had to disable to test.

Status: Fixed » Closed (fixed)

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