Tokens like [node:title] still use $node->title and not $node->label(), and [node:url] still generates the link manually from "node/" . $node->nid rather than using $node->uri(). This should have been caught in the individual entity conversions but it wasn't, so we should fix them all now.

This should be backported to Drupal 7 to use entity_label() and entity_uri() in tokens.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

larowlan’s picture

Will help if you need, if so assign to me

larowlan’s picture

Status: Active » Needs review
FileSize
5.61 KB

WIP, ran out of time to track down what is causing the test fails
Fixes for user and node entities.

The last submitted patch, core-tokens-1764358.2.patch, failed testing.

larowlan’s picture

Status: Needs work » Needs review

#2: core-tokens-1764358.2.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, core-tokens-1764358.2.patch, failed testing.

Xano’s picture

Status: Needs work » Needs review

#2: core-tokens-1764358.2.patch queued for re-testing.

Status: Needs review » Needs work
Issue tags: +token, +Needs backport to D7

The last submitted patch, core-tokens-1764358.2.patch, failed testing.

Xano’s picture

Status: Needs work » Needs review
FileSize
5.58 KB

Re-roll.

Status: Needs review » Needs work

The last submitted patch, drupal_1764358_03.patch, failed testing.

Xano’s picture

Assigned: Dave Reid » Xano
Status: Needs work » Needs review
FileSize
21.14 KB

The patch makes sure all core entity (user, comment, node, term, vocabulary, file) tokens use the id(), label(), and uri() methods instead of the corresponding properties.

Status: Needs review » Needs work

The last submitted patch, drupal_1764358_04.patch, failed testing.

Xano’s picture

Apparently $_GLOBALS['user'] is not a user entity yet.

Xano’s picture

Status: Needs work » Needs review
FileSize
20.8 KB

I was under the impression that global $user was a full user object, but this is not the case (for good reason).

Re-rolling the patch without the line that changed the last test fail.

Xano’s picture

Assigned: Xano » Unassigned
Xano’s picture

Issue tags: -token, -Needs backport to D7

#13: drupal_1764358_05.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, drupal_1764358_05.patch, failed testing.

Xano’s picture

Status: Needs work » Needs review

13: drupal_1764358_05.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, 13: drupal_1764358_05.patch, failed testing.

Xano’s picture

Issue summary: View changes
Status: Needs work » Needs review
FileSize
14.59 KB

Re-roll.

Status: Needs review » Needs work

The last submitted patch, 19: drupal_1764358_19.patch, failed testing.

Xano’s picture

Status: Needs work » Needs review
FileSize
14.33 KB

Status: Needs review » Needs work

The last submitted patch, 21: drupal_1764358_21.patch, failed testing.

Xano’s picture

Status: Needs work » Needs review

21: drupal_1764358_21.patch queued for re-testing.

Xano’s picture

21: drupal_1764358_21.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, 21: drupal_1764358_21.patch, failed testing.

Xano’s picture

Status: Needs work » Needs review
FileSize
13.69 KB

Status: Needs review » Needs work

The last submitted patch, 26: drupal_1764358_26.patch, failed testing.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

catch’s picture

Version: 8.9.x-dev » 7.x-dev
Issue tags: -Needs backport to D7 +Bug Smash Initiative

Drupal 8/9 uses the correct entity methods now, moving back to 7.x