Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
All tokens are not properly substituted after upgrading to 7.x-1.2 from 7.x-1.1. It has something to do with the pregmatch in /includes/context.inc #636.
7.x-1.1 if (preg_match_all('/%([a-zA-Z0-9%:_-]+)/us', $string, $matches)) {
7.x-1.2 if (preg_match_all('/%(%|[a-zA-Z0-9_-]+(?:\:[a-zA-Z0-9_-]+)?)/us', $string, $matches)) {
Why the change?
Comment | File | Size | Author |
---|---|---|---|
#2 | token-regex-1741064-2.patch | 621 bytes | robcarr |
Comments
Comment #1
robcarrI've just traced a token substitution issue down to the change from 7.x-1.1. to 7.x-1.2.
Referencing somewhere that I've just been bitten: means components of an addressfield (eg %node:field-address:postal_code) no longer work. All that is rendered is
:postal_code
in this example.Looks like it relates to #1727804: Keywords substitution doesn't work as expected... re-opened that issue, hoping not to incurr the wrath of @merlinofchaos
Comment #2
robcarrAnd the attached patch gets us back to where we were a week ago:
Comment #3
Dmitriy.trt CreditAttribution: Dmitriy.trt commentedPlease, check latest patch from #1727804: Keywords substitution doesn't work as expected
Comment #3.0
Dmitriy.trt CreditAttribution: Dmitriy.trt commentedChange rule number to correct one