<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Differences in layout when theme is deployed in two similar environments</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=114232664" />
  <subtitle>Differences in layout when theme is deployed in two similar environments</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=114232664</id>
  <updated>2026-04-05T08:50:23Z</updated>
  <dc:date>2026-04-05T08:50:23Z</dc:date>
  <entry>
    <title>RE: Differences in layout when theme is deployed in two similar environment</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114245509" />
    <author>
      <name>Pete Helgren</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114245509</id>
    <updated>2019-07-10T21:48:12Z</updated>
    <published>2019-07-10T21:48:12Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;It didn't work for me but gave me an idea for an even more hackish approach:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;&amp;amp;nbsp;&amp;amp;lt;#else&amp;amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; 
&amp;amp;nbsp;    &amp;lt;script&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$("body.open").removeClass('open');
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$("body.has-control-menu").removeClass('has-control-menu');
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/script&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;
&amp;lt;!--#if--&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;And, that worked!&amp;nbsp; I'll leave it for now.&amp;nbsp; Really appreciate the pointer.&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Pete Helgren</dc:creator>
    <dc:date>2019-07-10T21:48:12Z</dc:date>
  </entry>
  <entry>
    <title>RE: Differences in layout when theme is deployed in two similar environment</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114244041" />
    <author>
      <name>Patrick Yeo</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114244041</id>
    <updated>2019-07-10T16:54:17Z</updated>
    <published>2019-07-10T16:54:17Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;The `open`&amp;nbsp;class is being added by &lt;a href="https://github.com/liferay/liferay-portal/blob/07af97431ed9c9ce34dfd814fc14adfc5911450d/modules/apps/web-experience/product-navigation/product-navigation-product-menu-web/src/main/java/com/liferay/product/navigation/product/menu/web/internal/product/navigation/control/menu/ProductMenuProductNavigationControlMenuEntry.java#L119"&gt;https://github.com/liferay/liferay-portal/blob/07af97431ed9c9ce34dfd814fc14adfc5911450d/modules/apps/web-experience/product-navigation/product-navigation-product-menu-web/src/main/java/com/liferay/product/navigation/product/menu/web/internal/product/navigation/control/menu/ProductMenuProductNavigationControlMenuEntry.java#L119&lt;/a&gt;&lt;a href="https://github.com/liferay/liferay-portal/blob/07af97431ed9c9ce34dfd814fc14adfc5911450d/modules/apps/web-experience/product-navigation/product-navigation-product-menu-web/src/main/java/com/liferay/product/navigation/product/menu/web/internal/product/navigation/control/menu/ProductMenuProductNavigationControlMenuEntry.java#L119-L128"&gt;-L128&lt;/a&gt;.&lt;br&gt;I can't pinpoint where the bug is, but `ProductNavigationProductMenuWebKeys.PRODUCT_NAVIGATION_PRODUCT_MENU_STATE` was set to `open` somewhere.&lt;br&gt;&lt;br&gt;You might be able to hack around it by setting it to closed with:&lt;br&gt;&lt;pre&gt;&lt;code&gt;&amp;amp;lt;#if show_dockbar&amp;amp;gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;lt;@liferay_ui["quick-access"] contentId="#main-content" /&amp;amp;gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;lt;@liferay_util["include"] page=body_top_include /&amp;amp;gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;lt;@liferay.control_menu /&amp;amp;gt;
&amp;amp;lt;#else&amp;amp;gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;lt;script&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Liferay.Store(ProductNavigationProductMenuWebKeys.PRODUCT_NAVIGATION_PRODUCT_MENU_STATE, 'closed');
&amp;nbsp; &amp;nbsp; &amp;lt;/script&amp;gt;
&amp;lt;!--#if--&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;Edit: My code doesn't work. You can see how to get it inside a jsp at&amp;nbsp;&lt;a href="https://github.com/liferay/liferay-portal/blob/07af97431ed9c9ce34dfd814fc14adfc5911450d/modules/apps/web-experience/product-navigation/product-navigation-product-menu-web/src/main/resources/META-INF/resources/portlet/view.jsp#L20"&gt;https://github.com/liferay/liferay-portal/blob/07af97431ed9c9ce34dfd814fc14adfc5911450d/modules/apps/web-experience/product-navigation/product-navigation-product-menu-web/src/main/resources/META-INF/resources/portlet/view.jsp#L20&lt;/a&gt;. I don't know how to get it to work for portal_normal.ftl.&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Patrick Yeo</dc:creator>
    <dc:date>2019-07-10T16:54:17Z</dc:date>
  </entry>
  <entry>
    <title>RE: Differences in layout when theme is deployed in two similar environment</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114242868" />
    <author>
      <name>Pete Helgren</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114242868</id>
    <updated>2019-07-10T15:32:45Z</updated>
    <published>2019-07-10T15:32:45Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body class="${css_class}"&gt;Thanks Patrick.&amp;nbsp; I do have code similar to what you suggest I am just trying to sort out why it works in one environment and not in another.&amp;nbsp; I assumed that maybe there was a system setting that I tweaked that could account for the difference.&amp;nbsp; In init_custom.ftl I have this:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;&amp;amp;lt;#assign&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;permission_checker = themeDisplay.getPermissionChecker()&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;root_css_class = languageUtil.get(locale, "lang.dir")&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;group_id = themeDisplay.getScopeGroupId()&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;the_title = ""&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;/&amp;amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&amp;amp;lt;#assign is_group_admin = permission_checker.isGroupAdmin(group_id) /&amp;amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&amp;amp;lt;#assign is_omniadmin = permission_checker.isOmniadmin() /&amp;amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&amp;amp;lt;#assign show_dockbar = is_group_admin || is_omniadmin /&amp;amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;&amp;amp;lt;#assign&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;is_signed_in = themeDisplay.isSignedIn()&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;/&amp;amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;Then in portal_normal.ftl I have this:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&amp;amp;lt;#include "${full_templates_path}/navigation.ftl" /&amp;amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;lt;#if show_dockbar&amp;amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;lt;@liferay_ui["quick-access"] contentId="#main-content" /&amp;amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;lt;@liferay_util["include"] page=body_top_include /&amp;amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;lt;@liferay.control_menu /&amp;amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;!--#if--&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;div class="container-fluid" id="wrapper"&gt;&lt;code&gt;&lt;/code&gt;&lt;/div&gt;&lt;/pre&gt;&lt;br&gt;In the "bad" template I see this css reference when I inspect the gap to the left of the portlet container:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;@media&amp;amp;nbsp;only screen and (min-width: 768px)&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;product_nav…104009784:3&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;body.open #wrapper&amp;amp;nbsp;{&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;padding-left:&amp;amp;nbsp;320px;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code&gt;}&lt;/code&gt;&lt;/pre&gt;Which I assume is applied by the "open" class applied to the body.&amp;nbsp; Just can't figure out why "open" is applied here when it is a user with no additional permissions that is signed in&amp;nbsp;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Pete Helgren</dc:creator>
    <dc:date>2019-07-10T15:32:45Z</dc:date>
  </entry>
  <entry>
    <title>RE: Differences in layout when theme is deployed in two similar environment</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114238351" />
    <author>
      <name>Patrick Yeo</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114238351</id>
    <updated>2019-07-09T16:47:53Z</updated>
    <published>2019-07-09T16:47:53Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hey Pete,&lt;br&gt;You can see the product menu theme contributor css for 7.0.4CE GA5 at &lt;a href=""&gt;https://github.com/liferay/liferay-portal/blob/07af97431ed9c9ce34dfd814fc14adfc5911450d/modules/apps/web-experience/product-navigation/product-navigation-product-menu-theme-contributor/src/main/resources/META-INF/resources/product_navigation_product_menu.scss&lt;/a&gt;.&lt;br&gt;The spacing is based on the open class. The closed class is there so devs have a css selector for the closed state, just in case.&lt;br&gt;The CSS file &lt;pre&gt;&lt;code&gt;o/product-navigation-product-menu-theme-contributor/product_navigation_product_menu.css?browserId=other&amp;amp;amp;themeId=&lt;/code&gt;&lt;/pre&gt; on your production server is a bundle of the file above, &lt;a href=""&gt;https://github.com/liferay/liferay-portal/blob/07af97431ed9c9ce34dfd814fc14adfc5911450d/modules/apps/web-experience/product-navigation/product-navigation-simulation-theme-contributor/src/main/resources/META-INF/resources/css/simulation_panel.scss, and https://github.com/liferay/liferay-portal/blob/07af97431ed9c9ce34dfd814fc14adfc5911450d/modules/apps/web-experience/product-navigation/product-navigation-control-menu-theme-contributor/src/main/resources/META-INF/resources/product_navigation_control_menu.scss.&lt;/a&gt;&lt;br&gt;I'm not sure how you are hiding the control menu on your site, but if you remove &lt;a href="https://github.com/liferay/liferay-portal/blob/07af97431ed9c9ce34dfd814fc14adfc5911450d/modules/apps/foundation/frontend-theme/frontend-theme-unstyled/src/main/resources/META-INF/resources/_unstyled/templates/portal_normal.ftl#L21"&gt;https://github.com/liferay/liferay-portal/blob/07af97431ed9c9ce34dfd814fc14adfc5911450d/modules/apps/foundation/frontend-theme/frontend-theme-unstyled/src/main/resources/META-INF/resources/_unstyled/templates/portal_normal.ftl#L21&lt;/a&gt; the control menu will never show.&lt;br&gt;You can use &lt;pre&gt;&lt;code&gt;theme_display.getPermissionChecker().isOmniadmin()&lt;/code&gt;&lt;/pre&gt; to check if the user is an omni admin and only show the control menu when that condition is met.&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Patrick Yeo</dc:creator>
    <dc:date>2019-07-09T16:47:53Z</dc:date>
  </entry>
  <entry>
    <title>Differences in layout when theme is deployed in two similar environments</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114232663" />
    <author>
      <name>Pete Helgren</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114232663</id>
    <updated>2019-07-08T22:02:39Z</updated>
    <published>2019-07-08T22:02:39Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body class="controls-visible has-control-menu open yui3-skin-sam guest-site signed-in public-page site" id="senna_surface1"&gt;I have created a theme and deployed it to my development environment and all is well. &amp;nbsp;When I deployed to my staging server, running the same version of Liferay (7.0.4 CE GA5) I am seeing some css applied through what seems to be a theme contributor which as far as I can tell, doesn't exist OR is a part of Liferay base implementation but&amp;nbsp;isn't part of my theme. Part of the "unexpected" URL looks like this:&lt;br&gt;&lt;pre&gt;&lt;code&gt;o/product-navigation-product-menu-theme-contributor/product_navigation_product_menu.css?browserId=other&amp;amp;amp;themeId=&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;I cannot find that css file anywhere in my theme and I cannot find a jar that would explain where the theme-contributor reference comes from. &amp;nbsp;I have cleared cache, deleted files from my osgi/state/ folder but I can't locate where the difference is coming from.The actual problem is that the "bad" instance has this set of classes appearing in the body:&lt;br&gt;&lt;pre&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;(The "open" class is the issue)&amp;nbsp;&lt;br&gt;What that does is "bump" the portlet contents 320px to the right leaving a large space where the control menu should be. But, the person who is signing in shouldn't see the control menu.&amp;nbsp; In my development environment with the same theme and same jars I see this:&lt;br&gt;&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;(The "closed" class is the "fix")&lt;br&gt;There is no reference to&amp;nbsp;product-navigation-product-menu-theme-contributor when the "closed" class is present.&amp;nbsp; So, "open" somehow invokes the theme contributor?&lt;br&gt;I am not sure where else to look. &amp;nbsp;I obviously must have made a change somewhere but I cannot see where that difference might be. &amp;nbsp;I would have thought all of my changes would be located in the theme which is deployed properly and has been selected for the site. Yet, the difference is pretty obvious: It works on one instance, but not on another. &amp;nbsp;Any idea of what I might have done?I hate css......&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Pete Helgren</dc:creator>
    <dc:date>2019-07-08T22:02:39Z</dc:date>
  </entry>
</feed>
