As with any new software release, there are going to be bugs and issues that come up as the general public begins to use all the features. Such is the case with Adobe Experience Manager 5.6. We aren’t being critical of AEM — it’s just something that happens. Axis41 AEM Implementation Expert Brian Fitzpatrick joins the Adobe Experience Manager Podcast to talk about a bug we found within the new Adobe Experience Manager 5.6 and the workarounds we implemented to fix it.
You can also check out Brian’s blog post where he goes into more detail (with screenshots and example code) about the targeting bug in AEM 5.6 here.
Music Intro: Code Monkey by Jonathan Coulton
Transcript:Announcer: Welcome to the Adobe Experience Manager Podcast, a weekly discussion regarding Adobe Experience Manager (formerly CQ) and other marketing and technical issues. This podcast is presented by Axis41, your partner in Adobe Experience Manager implementations. Your hosts for the podcast are Joey Smith and Peter Nash.
Peter Nash: Good afternoon everybody, welcome back. I’m Peter.
Joey Smith: And I’m Joey.
Peter Nash: Today with us we have got Brian Fitzpatrick who is relatively a new member of our team, I think you’ve only been with us about what 4 months, Brian?
Brian Fitzpatrick: Yes, about that.
Peter Nash: Yeah, we came across a problem recently when we were upgrading some of our customers from Adobe Experience Manager 5.5 to 5.6 and it caused a little bit of headache and so we thought we’d take a chance to talk about that a little bit today. I don’t understand a lot of the specifics with this, so I am going to turn it over to Joey, to talk about that.
Joey Smith: Thanks, so Brian I know that the problem that we went into really was based around the targeting feature with Adobe Test and Target and when you can and cannot target things? So can you explain to us a little bit about what exactly was that you discovered as you went to do this?
Brian Fitzpatrick: Well, sometimes when you hit the target button it would erase your components from the page. So it supposed to wrap your component in an M-box to be able to change the contents of it; but sometimes it doesn’t do that.
Joey Smith: So, I know you mentioned that when it does wrap around that M-box, what it ends up doing is pushing your actual component further down the content tree.
Brian Fitzpatrick: Right, so you if you look in the node structure and you have an image, when you hit target, there will be a default node underneath your image node. And the default node will have all of the properties that the image node should; and the image node has pretty much nothing in it.
Joey Smith: Okay. So, was there ever a time when you actually were able to see the feature work correctly?
Brian Fitzpatrick: Yeah, sometimes when it is included in a parses, they will be alright. Then you will come up with the disable targeting and the other little offerings that it has in there.
Joey Smith: Okay, and then what you mentioned there, that’s actually a great thing to to call out here, which is the side-effect of this problem: What it creates, is the fact that you cannot, in addition to hiding your component all of that sudden, you can’t disable targeting; is that right?
Brian Fitzpatrick: Well, it doesn’t really activate targeting. Because the page isn’t reading it properly. Because the image component will turn into a target component and so it’s not reading that probably. So, you are not getting the performance you should get. And that is also messing up your stuff.
Joey Smith: I think, when you and I talked about this last time, that you mentioned that it really kind of boiled down to making CQ (Adobe Experience Manager) Include expect certain behaviors; is that right?
Brian Fitzpatrick: Right, so the way CQ Include works, is it looks for a path and a resource type of component to pull. If it looks down into the path and doesn’t find the resource type then it thinks that you forgot to add it and provides you with a white component.
Joey Smith: So once you discovered that was actually what was going on the pages, what did that lead you to do in order to really work around this issue?
Brian Fitzpatrick: So what we did was made our own access includes.
Joey Smith: Around tag library?
Brian Fitzpatrick: Tag lib, yeah. And we thought we put more emphasis on the path to actually include the thing.
Joey Smith: So if I am right, you said that in our tag lib, when you call our private tag lib, and you use it’s include tag, that it actually has three different conditions in it.
Brian Fitzpatrick: Right, so if it’s not getting a resource type or path, it will call the CQ Includes, which will put a fresh component on the page as if you forgot to add it or something. Then if it doesn’t find the component at the path that you gave it, it will include a fresh one also.
Joey Smith: Okay.
Brian Fitzpatrick: And the third case is when it does find something at the path but the resources type does not matchup; so, what we did is, force CQ Include to take whatever resources type we found at that node and include it.
Joey Smith: Okay, that’s really awesome; I know that I ran into this problem myself playing around with 5.6 and I just kind of brushed it off thinking I must be using Adobe Targeting wrong, it must be what I am doing.
Peter Nash: I thought the same thing and when I was hitting that target – “Oh, no, I have just deleted all of this data here, how can we manage to get this back or what did I do wrong?” And it’s nice to know that there wasn’t anything necessarily wrong with what we had done from an authoring perspective. But it was the way that the things were configured.
Joey Smith: Definitely, and Brian excellent job. This is some great detective work to figure it out and also to come up with the solution.
Brian Fitzpatrick: Thanks. Also to recover the node if you hit target a bunch times, you just go down to the bottom node that has actual properties that your component ought to have, and you can pull that out and rename it as the component to bring it back up the tree.
Joey Smith: And then everything is back and restored.
Brian Fitzpatrick: Yeah.
Joey Smith: Great.
Brian Fitzpatrick: Another thing I found was to disable the targeting button. You can go into your CQ edit config on a component or make one if you don’t have one. In the CQ edit config, you can add “CQ disable targeting =true” which is a Boolean and that will remove the targeting button from that component. From that one specifically but there is problem doing that with all the components because it will happen with the components in libs foundation. So they update it and over-write libs, then you get it all back.
Joey Smith: That’s all going to come back and your problems are back to square one.
Brian Fitzpatrick: Which is why we chosen do our own Include tag.
Joey Smith: I think it’s clearly the winning strategy here. I would say it seems to be a bug in CQ itself (or in Adobe Experience Manager, I should say) that we should report back, in fact I think we have opened a daycare ticket on this with Adobe.
Joey Smith: Brian thanks for coming on today and talking us about the problem and we look forward to having you back on again sometime.
Announcer: You have been listening to the Adobe experience manager podcast brought you by Axis 41 your premier partner in AEM implementations. If you have questions, comments or something you would like us to cover; send an e-mail.to firstname.lastname@example.org.