Nested Content With Additional Get Params Duplicating Content

(Nic Hubbard) #1

Matrix Version:

We recently built a page for our Graduation that included Nested Content that used Additional Get Params to pass in the ID of a Youtube Playlist. The Nested Content was an asset listing that would then take that playlist ID and using the Youtube API (JSON Datasource) it would show thubmnails of the videos on our page that users could then click to view.

This Nested Content was embedded three times on the page, each with a different playlist ID in the Get Params.

The issue we are seeing, is that for some users they will see duplicated content in those three sections. It seems that the GET params is not staying unique for the nested content, and it is reusing the params from farther up the page.

Is this a known issue where you can not use the same nested content multiple times on a page in this way?

(John gill) #2

I’ve hit this before, and for us it was related to the Matrix Cache. The system doesn’t use the extra params as part of the key when determining the uniqueness of the asset output (I think :man_shrugging: )

This is an extra-double-bastard because it never shows up while you’re testing since everything is bypassing cache anyway.

Our solution was to exempt the asset being nested from Matrix Cache using the Root Specific Node screen of Cache Manager. Seemed to do the trick. If you’ve got multiple assets involved in the nesting gadget you might need to exempt more than one of them.

(Nic Hubbard) #3

Ah, good to know that we aren’t the only ones that this has happened to. And yes, I never saw this happening when building the page and previewing it. Only got reports after it was built.

(Bart Banda) #4

Yes, this was fixed a while ago, I think sometime late in the 5.4 series, or maybe early 5.5, can’t remember.

(Nic Hubbard) #5

Do you happen to know the commit for this fix? I really would love to patch our system as a full upgrade isn’t possible right now.

(David Schoen) #6

It’s worth bearing in mind 5.4 is EOL - .

That said for previously fixed bugs it’s usually easiest to use to find something promising.

I’m not sure if “#1348 - Get Variable passed via nested content container to REST asset is not evaluated as expected” is the correct bug? The MR for that only contained the commit 3c0a60bce7c1471db14c38789b4dc7195acee2e0.

(Nic Hubbard) #7

Do clients have access to Jira?

(David Schoen) #8

Clients have access to bits of it.

I think you’ll need to login via - if you can’t access the ticket at that point, you’d need to create a ticket requesting access.

Given 5.4 is out of support though and there’s relatively little visible on tickets for clients (you would only be able to see the original description in this case), if you have access to the git repo already you might be best off just looking at the diff on that commit and testing it.

The fix just changed the last parameter on one line:

diff --git a/core/assets/bodycopy/bodycopy/ b/core/assets/bodycopy/bodycopy/
index 4f12db25a4..10ba8e94d5 100644
--- a/core/assets/bodycopy/bodycopy/
+++ b/core/assets/bodycopy/bodycopy/
@@ -635,7 +635,7 @@ class Bodycopy extends Asset implements Persona_Consumer
 				$edit = $container->getEditFns();
-				$edit->paint($container, false, !$raw_kw);
+				$edit->paint($container, false, true);
 			$contents = ob_get_contents();

All other changes are to test code and as such do not require patching.

(Nic Hubbard) #9

Thanks. I have git access, so will go that route.