AEM Publish - Newbie - Publish question | Community
Skip to main content
sergiu_carabet
New Participant
July 24, 2018
Solved

AEM Publish - Newbie - Publish question

  • July 24, 2018
  • 13 replies
  • 3012 views

Hi all,

Our company is developing the first AEM project with the AEM 6.3 version of Adobe Experience Manager. We created our project based on the Maven archetype version 12.

We encounter a problem on our test machine. We deploy the project on both author and publish instances via a Jenkins job (that just calls maven mvn -PautoInstallPackage clean install (on author) and mvn -PautoInstallPackagePublish clean install on the publish instance.

In the author instance everything looks fine, content can be configured, visualised in preview mode correctly.

On the publish instance the header component which is part of an editable template disappears, and content is not correctly displayed.

Is there an additional step, like clearing some caches or similar that we have to execute after a deploy, so that the content on the publish instance is displayed correctly?

What we found till now after a small research is just to recompile the jsps on the publish instance:

http://<HOSTNAME>:4503/system/console/slingjsp?reset and there 'Recompile all JSPs' option is used.

This solves the problem in the browser where it is executed, but it needs a login in the backend of AEM and it does not fix it for every browser.

So this is not a viable solution. This problem currently complicates a lot the testing of the project on many physical devices, (as we are still in the development phase of the project).

Could you please advise what can we do in order to visualise correctly the content in all browsers / devices also on the publish instance?

Thank you,

Sergiu

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by joerghoh

I assume that you messed up the permissions on your publish instance. By default anonymous should be able to see some more paths.

Jörg

13 replies

sergiu_carabet
New Participant
August 3, 2018

Thank you. I will have a look at this AEM Jenkins plugin.

joerghoh
Employee
August 2, 2018

Hi,

glad that you were able to find the issue on your own.

Regarding the deployment: you should establish a way, which gives you better control over the deployment process. Starting everything via maven is a nice way, but requires to have a lot of different pom files for the different stages. Also you don't have a retry capability in case something goes wrong in the first place (maybe due to bad timing, some seconds later the system would have settled and the request would have been successful). I was told that there are some plugins for Jenkins would allow you to deploy to AEM more smoothly.

sergiu_carabet
New Participant
August 1, 2018

hi Jörg,

Thank you for the help and for pointing me in the correct direction. I found the problem and it is what you have mentioned related to having the right permissions. The group everyone was not having the read permissions for the editable templates, and this is the reason why the page looked good as soon as we logged in the backend.

Now this works properly also for anonymous users. Thanks a lot for your help.

One last thing related to your comment:

Would you be so kind and point me to some documentation where I can read more about the best practices related to deployment. Or could you sketch a recommendation of how to change the deployment pipeline to be a better one that the current maven based one?

joerghoh
joerghohAccepted solution
Employee
July 26, 2018

I assume that you messed up the permissions on your publish instance. By default anonymous should be able to see some more paths.

Jörg

sergiu_carabet
New Participant
July 26, 2018

Hi Jörg,

Thank you for your answer. You are right, I am not logged in in CRX on the system where I see the problem. So what I realise now is that I do not even need to recompile JSPs. As soon as I log in into CRX the site looks fine. If I log out of it, the header of the page is gone.

So I am with admin when it works and anonymous when it does not work. It looks like a rights management problem somehow. Do you have a hint where to start looking?

joerghoh
Employee
July 25, 2018

That means, that you are are being logged in into the very same system, with the very same user, but with 2 different browsers, and you get different views?

Assuming, that you access the same system makes me think, that you are not using the same user. The screenshot looks like the system an anonymous user would see when logging in into CRXDE Lite on a publish instance.

Jörg

sergiu_carabet
New Participant
July 25, 2018

I am using the admin user. And definitely I am accessing the same address in both browsers (I use copy paste for both the address and for CRX). I still can see the same differences in CRX.

joerghoh
Employee
July 25, 2018

What user are you using to perform this actions? Are they the same on both browsers? Have you double-checked that you are actually visiting the same instance with both browsers?

Jörg

sergiu_carabet
New Participant
July 25, 2018

I am debugging for the source of the problem using 2 browsers. In one I run the recompile all JSPs and everything is fine, in the other one not, and header is not displayed.

A strange thing I realised is when I log in CRX with both browsers. The one when everything is running looks fine and has all the required folders apps, content, libs, etc.

In the browser where the problem can be reproduced, I see a very reduced version in CRX containing only bin, content and crx folders.

sergiu_carabet
New Participant
July 25, 2018

After the deployment the problem appears, and it does not get fixed with a publish of a page.

If I do a recompile JSP in that browser the site works correctly. If I do some changes to the content and publish them, the header is again not visible, and in the logs again the *INFO* and *WARN* messages from above appear again.