Expand my Community achievements bar.

Style system is not working in dispatcher

Avatar

Level 2

I implemented style system for one of my components and it works fine for both author and publisher. The CSS classes were wrapped on the outer div of the component in author and publisher, but the same is not happening in the dispatcher. 

 

Did anybody face the same problem? can somebody please help?

 

Thanks in advance.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

12 Replies

Avatar

Community Advisor

@cnivaskallepalli 

 

Please cross-check that an old page is not cached on the dispatcher.

If its cached, please clear the cache and try again


Aanchal Sikka

Avatar

Community Advisor

Hi @cnivaskallepalli 
Could you please compare the page's source when access from publish and dispatcher?

Don't use dev tool to check the source but use view-source
Example:
view-source:https://wknd.site/us/en.html 



Arun Patidar

Avatar

Level 2

@arunpatidar I tried that too, I found only the below extra stylesheet in the publisher page source, which is not there in the dispatcher, other than this I do not find anything that is missing in the dispatcher. But this is something else not related to the style system.

<link rel="stylesheet" href="/libs/cq/experience-fragments/components/xfpage/content.min.<hashcode>.css" type="text/css">

 

Avatar

Community Advisor

The style system, in the end, is simply CSS classes being applied to divs. Therefore, you just need to double-check the following:

  • Whether the markup is being updated with the style system classes
  • If the classes are being exposed in the final HTML
  • If there is any CSS conflicting with your style system classes, which can be 'misleading' and suggest that the style system is not functioning.

Of course, the cache will limit the ability to check the above things, so make sure you are serving a fresh version of the page.


Hope this helps



Esteban Bustamante

@EstebanBustamante Here the problem is that the markup is not updated with style system classes. I tried creating a fresh page but it still has the same issue and as I said it works fine in both author and publisher.

Avatar

Community Advisor

If the dispatcher markup is not in sync with the publisher, then you need to check the cache, try to add for example a dummy image, and republish the page to make sure the HTML is fresh and taken from the publisher. The other basic thing to check is that the changes are working in all the publishers, maybe some publisher instance is not in sync with the other publishers, and hence the dispatcher is serving from it.

 

Hope this helps



Esteban Bustamante

That was the first thing I checked. I created a new page and published that and still have the same issue. I compared the page source from the publisher and dispatcher too, could not find anything that causes this issue.

Avatar

Community Advisor

I had this problem in the past, and here's what I have done to fix the style system, for pulling in styles and templates.
- I ensured that my permissions in publishers have /conf/my-site

- I ensured that the configurations from /conf/my-site is the same as my authors

- Content has not been set with the correct stylesystem ID

- Dispatcher does not really care about /conf/my-site as this is for AEM internal use only, and so maybe permissions or misaligned configurations are surfaced. 

Avatar

Administrator

@cnivaskallepalli Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni

Avatar

Level 2

@kautuk_sahni Unfortunately no, I still need to work on it. I will post it here if I find a solution.