So, if one tries to use this module with for example JSON:api, trying to create a node that has automatic entity labels enabled would make things crash like so:

LogicException: The controller result claims to be providing relevant cache metadata, but leaked metadata was detected. Please ensure you are not rendering content too early.

The reason is that rendering a token without passing it metadata, would make it leak this metadata and end up calling rendering to collect it.

Patch coming up

CommentFileSizeAuthor
#6 3051165.patch1.18 KBeiriksm
#2 3051165.patch871 byteseiriksm

Comments

eiriksm created an issue. See original summary.

eiriksm’s picture

Status: Active » Needs review
StatusFileSize
new871 bytes
villette’s picture

Version: 8.x-2.x-dev » 8.x-3.x-dev
Status: Needs review » Reviewed & tested by the community

I had the exact same issue, with JSON:API, and this patch works like a charm
I'm moving it to RTBC

dqd’s picture

Status: Reviewed & tested by the community » Needs work

Thanks @eiriksm for the report and for the patch! And Thanks for the reports back to move along. Would love to have some more reviews but won't slow it down too much to commit. Maybe some other confirmation for that it is working?

@eiriksm: would you mind to add some code comment to the code addition? It helps to track down issues popping up later from new code implemented long time before ...

howto’s picture

I got the same issue with JSON:API (method POST). The patch in #2 solved the issue. Thanks.

eiriksm’s picture

Status: Needs work » Needs review
StatusFileSize
new1.18 KB
nvaken’s picture

After a long time debugging, I found out that this module was the roots of our JSON:API problems and now have found this issue. Thanks for the patch, this solved my little nightmare.

yepa’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

Same issue on PATCH request to update a node.

The patch #6 solves it :)

Thanks @eiriksma

biarr’s picture

Thanks for the patch! It saved my day and works as expected.

  • eiriksm authored 96c86bc on 8.x-3.x
    Issue #3051165 by eiriksm: Pass metadata to the token replacement.
    
colan’s picture

Status: Reviewed & tested by the community » Fixed

Thanks!

Status: Fixed » Closed (fixed)

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