Problem/Motivation

Certain token types (current-page, user) can create major caching problems since their bubbleable metadata is not added to the imagefield_tokens render array.

Proposed resolution

Update the formatter such that bubbleable metadata from the tokesn is added to the render array.

Remaining tasks

Patch to follow.

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

TBD

Comments

danflanagan8 created an issue. See original summary.

danflanagan8’s picture

Here's a patch that I think adds the right cacheable metadata to the render array, accounting for tokens that have been replaced. I also updated a test so this update has test coverage.
I uploaded the wrong patch here. Please ignore.

danflanagan8’s picture

Status: Active » Needs review
danflanagan8’s picture

StatusFileSize
new3.53 KB

Here's the correct patch. I believe it resolves this issue and adds test coverage.

akyrylenko’s picture

StatusFileSize
new3.38 KB

↑ Please ignore my patch above, it's related to wrong branch ↑

Hi there,

Patch works for me.
Tested on D8.8.1, module version 8.x-2.x

akyrylenko’s picture

ysamoylenko’s picture

Status: Needs review » Reviewed & tested by the community

Hello @danflanagan8,

Thanks for your great patch.

@akyrylenko, thank you for review.

The patch will be committed soon.

ysamoylenko’s picture

Status: Reviewed & tested by the community » Fixed

The patch was committed.
Thanks everyone for your contribution to the module development.

Status: Fixed » Closed (fixed)

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