Expand my Community achievements bar.

SOLVED

Adaptave image is not showing up unless you’re logged in.

Avatar

Level 2

I'm using an adaptave image in it, but it’s not showing up unless you’re logged in.That is, if you log into an author or publish instance, you can see the image.If you’re not logged in, it doesn't display.

So, on the dispatcher (where you can’t log in), you can’t see the image.

 

What could be an issue ?

1 Accepted Solution

Avatar

Correct answer by
Level 10

Just to be clear I am checking if it is enabled [1] & not asking to enable ok.... 

On publish instance you can check directly at [2] & see if assets are listed.

[1]  http://www.wemblog.com/2013/01/how-to-associate-cug-with-dam-asset-in.html

[2]  http://<host>:<port>/system/console/cug

View solution in original post

7 Replies

Avatar

Level 10

Looks like permission issue.  You have CUG enabled on the assets referenced in image component?

Avatar

Level 2

Wow, the thing that says "Solved" looks awesome, but doesn't answer the question.  I just suffered from the same problem.  Here's my actual working solution.

What's causing the problem:

If you look at the developer tools (Chrome) or firebug or something, you'll see that there's a .js library to which you do not have permission.  The reason for this is that the clientlibs for this and many many other components are not available to anonymous users.  Superfantastic if you're trying to author public web pages.

Here's how I fixed it:

In CRXDE, copy the clientlibs node under the component you need access to (right click, copy).  Under /etc/clientlibs, select "paste", and then rename the node to the name of the component you're exposing.  In this case, rename it to adaptiveimage.  Throw a "save all" at CRXDE for fun.

Hope that helps!  I can't see how the other answers here could have, but someone marked this as "Solved".  If anyone can explain how adding a Closed User Group to some assets in the DAM can resolve a permission issue with javascript, let me know.

Avatar

Employee

Hi Steve,

A more idiomatic solution, which didn't require copying would be to embed the cq.adaptiveimage client library into your site's client library.

HTH,

Justin

Avatar

Level 2

How to enable Closed User group (CUG)?

Avatar

Level 2

Hey there!

That sounds really promising, and very different from what your support guys told me (which was to "put" the foundation clientlib into /etc/designs - that sounded like a terrible idea).

As you can tell, I'm a complete AEM novice. Can you tell me what it means in AEM terms to "embed" one client library into another?  Basically, it sounds like you're advocating a reference of some sort, which is exactly what I'm looking for, but I'm not sure how to express it within CQ5.

Thanks much!

Avatar

Correct answer by
Level 10

Just to be clear I am checking if it is enabled [1] & not asking to enable ok.... 

On publish instance you can check directly at [2] & see if assets are listed.

[1]  http://www.wemblog.com/2013/01/how-to-associate-cug-with-dam-asset-in.html

[2]  http://<host>:<port>/system/console/cug

Avatar

Employee

Hi,

When a client library embeds another library, it does just that -- embeds the content (JavaScript and/or CSS) of the embedded library. It's actually a bit fancier in that paths in CSS files (for example to background images) are actually rewritten so that they are relative to the embedding library (rather than the original path which would have been relative to the embedded library). You might want to take a read through http://dev.day.com/docs/en/cq/current/developing/clientlibs.html which does a reasonable job of laying out the whole client library system.

Regards,

Justin