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.

Files: 
CommentFileSizeAuthor
#6 1891082-fix-config-label-recursion.patch2.38 KBDave Reid
PASSED: [[SimpleTest]]: [MySQL] 21 pass(es).
[ View ]
#5 1891082-fix-config-label-recursion.patch2.43 KBDave Reid
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1891082-fix-config-label-recursion_0.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#3 1891082-fix-config-label-recursion.patch2.43 KBDave Reid
FAILED: [[SimpleTest]]: [MySQL] 20 pass(es), 1 fail(s), and 0 exception(s).
[ View ]
#1 metatag-oom_recursion_and_unknown_label-1891082-1.diff586 bytesbago
PASSED: [[SimpleTest]]: [MySQL] 11 pass(es).
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new586 bytes
PASSED: [[SimpleTest]]: [MySQL] 11 pass(es).
[ View ]

Here is my patch.

Priority:Normal» Major

While 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).

Version:7.x-1.0-beta4» 7.x-1.x-dev
StatusFileSize
new2.43 KB
FAILED: [[SimpleTest]]: [MySQL] 20 pass(es), 1 fail(s), and 0 exception(s).
[ View ]

Here's an alternate version with some tests to confirm the fix.

Status:Needs review» Needs work

The last submitted patch, 1891082-fix-config-label-recursion.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new2.43 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1891082-fix-config-label-recursion_0.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

StatusFileSize
new2.38 KB
PASSED: [[SimpleTest]]: [MySQL] 21 pass(es).
[ View ]

Another small change, only listing the relevant part in 'Unknown' since we also show the existing lineage.

Status:Needs review» Fixed

Status:Fixed» Closed (fixed)

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

#6 works fine