Problem/Motivation

After #2525910: Ensure token replacements have cacheability + attachments metadata and that it is bubbled in any case token module is basically broken as ->generate() breaks.

Let's fix that first and in an additional issue apply the needed metadata.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

dawehner’s picture

Status: Active » Needs review
StatusFileSize
new14.8 KB

Here is a patch for that.

berdir’s picture

Status: Needs review » Reviewed & tested by the community

Looks good.

dave reid’s picture

Status: Reviewed & tested by the community » Needs work

Patch needs a re-roll after #2516454: Append leading slash where necessary was committed.

berdir’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new14.82 KB

Conflicted on one line, just added the new argument to the changed call from the other issue:

++<<<<<<< ours
 +      $replacements += \Drupal::token()->generate('array', $arg_tokens, array('array' => explode('/', ltrim($value, '/'))), $options);
++=======
+       $replacements += \Drupal::token()->generate('array', $arg_tokens, array('array' => explode('/', $value)), $options, $bubbleable_metadata);
++>>>>>>> theirs

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 5: 2538552-5.patch, failed testing.

berdir’s picture

Status: Needs work » Needs review
StatusFileSize
new17.16 KB
new2.46 KB

Missed a few places.

dave reid’s picture

Status: Needs review » Fixed

Committed #7 to 8.x-1.x.

  • Dave Reid committed 23e0e85 on 8.x-1.x authored by Berdir
    Issue #2538552 by Berdir, dawehner: Fixed hook_tokens() missing new...

The last submitted patch, 1: 2538552-1.patch, failed testing.

Status: Fixed » Needs work

The last submitted patch, 7: 2538552-7.patch, failed testing.

dave reid’s picture

Status: Needs work » Fixed

I fought the bot and the bot won.

Status: Fixed » Closed (fixed)

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