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.
I created a 3 level hierarchy in my metatag setup and I saw the third level labels always began with "Unknown: Unknown: level label".
Debuggiing I found the bug
when looking for the label for "a:b:c" it removes c and then ask for parents finding
"a:b" and "a", then it runs an implode and looks for a label for "a:b:a" that is wrong.
Also, if you define a 4th level then this lookup results in an infinite loop and an outofmemory error and you have to manually remove the "4 level" instance definition from the DB in order to be able to use the site again.
Comment | File | Size | Author |
---|---|---|---|
#6 | 1891082-fix-config-label-recursion.patch | 2.38 KB | Dave Reid |
#5 | 1891082-fix-config-label-recursion.patch | 2.43 KB | Dave Reid |
#3 | 1891082-fix-config-label-recursion.patch | 2.43 KB | Dave Reid |
#1 | metatag-oom_recursion_and_unknown_label-1891082-1.diff | 586 bytes | bago |
Comments
Comment #1
bago CreditAttribution: bago commentedHere is my patch.
Comment #2
bago CreditAttribution: bago commentedWhile I fixed this issue for the "unknown" part I move this to major because this fixes also the infinite loop => out of memory => broken site issue when using 4 level instances (declared by custom/third party modules).
Comment #3
Dave ReidHere's an alternate version with some tests to confirm the fix.
Comment #5
Dave ReidComment #6
Dave ReidAnother small change, only listing the relevant part in 'Unknown' since we also show the existing lineage.
Comment #7
Dave ReidCommitted #6 to 7.x-1.x. Thanks!
http://drupalcode.org/project/metatag.git/commit/6af9271
Comment #9
saitanay CreditAttribution: saitanay commented#6 works fine