Trouble with displaying theme modifications in Liferay

Having recently delved into CSS and just starting out with Liferay, I am in the process of creating a custom theme. As an experiment, I attempted to modify the title text color for portlets on the page. In my custom.css file, I have included the following:

.portlet-title {
   float: none;
   font-weight: bold;
   min-width: 50%;
   padding: 5px;
   text-shadow: 1px 1px #FFF;
   color: #800000;
}

I believe that this is the correct class, as applying the color through the Firefox inspector under this class successfully changes the color. However, upon deploying the theme, it reverts back to:

.portlet-title {
      float: none;
      font-weight: bold;
      min-width: 50%;
      padding: 5px;
      text-shadow: 1px 1px #FFF;
}

Even after FTPing to the theme's folder, the changes in custom.css remain intact. Strangely, when the theme renders in Liferay, it defaults back to the earlier version of CSS before modifications were made. I have exhausted all efforts including clearing browser cache. Any suggestions?

Answer №1

It appears that you may be directly updating the files on the webserver ("ftp the folder for the theme") instead of properly making changes, such as in a development environment when building a new theme.

Liferay compresses the CSS (and javascript), combining all CSS files into one and removing any unnecessary whitespace. There is also SASS processing involved. These changes are cached, so it is unlikely that Liferay will recognize your modifications without deploying a new theme.

Utilize the "raw" development version of your theme to make adjustments (in the _diffs folder) and create an updated theme plugin. Once deployed to Liferay, the alterations should take effect.

Answer №2

Common Causes for Portal Performance Issues and How to Address Them:

  1. Check that developer properties are correctly configured and fast.load.css and fast.load.js properties are set in your portal-ext.properties file: For example, add the line

    -Dexternal-properties=portal-developer.properties
    to {tomcat}/bin/setenv.sh, and set theme.css.fast.load=false and javascript.fast.load=false in portal-ext.properties.

  2. Ensure you are developing from your IDE/Liferay SDK using changes made to the _diffs folder and deploying them to your Liferay node(s). Hot deploy by placing the theme.war file in the Liferay /deploy directory. Deploy changes to all nodes in a cluster if multiple application servers are used behind a load balancer.

  3. If necessary, stop Liferay and clean the /temp and /work folders of your application server to prevent cached files from being served to clients.

  4. Are CDNs enabled? Is there a cache mechanism like Varnish in front of your application layer? Use the Liferay CDN feature to cache .js, .css, images, and other files, or ensure new files are properly cached. Consider setting up a www tier to deliver theme files if needed.

  5. Clear browser cache or use "Private browsing" or "Incognito" mode when testing to avoid loading cached content.

Answer №3

Try adding the following line to your JAVA_OPTS configuration and see if it makes a difference:

JAVA_OPTS="-Dexternal-config=portal-developer.properties"

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Volume slider missing on Handel?

I'm having an issue with my volume slider in jQuery - the handle is not showing up despite it working. Any suggestions on how to make the handle visible? The jQuery I have imported: <script src="jquery-3.4.1.min.js"></script> <script ...

Can you tell me which specific font Adobe Edge Code (Brackets) uses in its code editor?

Can someone please help me? I'm trying to identify the syntax highlighter being used in this code. Is it Prettify or something else? ...

Should you construct a fresh element using JavaScript, or opt to reveal a concealed one using CSS?

What are the benefits of using the following approach: var target = document.getElementById( "target" ); var newElement = document.createElement( "div" ); $( target ).after( newElement ); compared to just hiding the newElement div with CSS and showing ...

How can I retrieve the CSS style value within the C# code behind?

When working with ASP.NET code behind, I often find myself adding a css style to an element using the following command: elementID.Style.Add("padding", "20px"); However, once this css property is added to elementID, the question arises - how can I access ...

automatically changing the input type based on the selected option in the dropdown menu

Currently, I am working on a project that involves attendance management. One of the key features I am implementing is a drop-down box where users can select a month. When a month is selected, a dynamic number of buttons will be generated in a separate div ...

Issue with SideNav function in MaterializeCss following recent update

After updating the css/js files of the Materializecss design in my project from v0.97.5 to v0.97.8, I noticed that my SideNav isn't functioning correctly anymore. When I try to click on the menu, it slides out but the dark overlay covers the entire sc ...

Can the z-index property be applied to the cursor?

Is it possible to control the z-index of the cursor using CSS or Javascript? It seems unlikely, but it would be interesting if it were possible. Imagine having buttons on a webpage and wanting to overlay a semi-transparent image on top of them for a cool ...

Best Practices for CSS Naming in MVC Architecturelayouts

Creating a CSS naming convention within an MVC Project with Layouts can be a challenging task. The use of Layouts introduces the necessity of being cautious when selecting class names, as they could potentially be overridden by classes declared in the Lay ...

Centering Slides Vertically in Slick Carousel with Bootstrap 4 Beta

I have spent approximately 2 hours searching and attempting over 15 solutions, but none of them have been successful. The issue involves a slick-slider structured as follows: <section id="testimonial-section" class="pt-4 pb-0 px-4 bg-dark text-white"&g ...

Finding a predecessor with Selenide through tag and class identification

Trying to find the ancestor element using Selenide library on a website. The ancestor element is <div class="BorderGrid-cell" ...>. The .closest(".BorderGrid-cell") method works well. However, the .closest("div.BorderGrid-ce ...

Move the dropdown selection above all DIV elements

Check out this link: Make sure to select an option from the dropdown menu. Also, some of the options are hidden behind other elements. I noticed that if I target .join-form and remove overflow: hidden, the layout of the page becomes distorted. Can anyon ...

How can I keep images from getting cut off when using slick slider with a fixed background?

My current design includes a stylized slick-slider that extends beyond the top border: However, I have set a fixed background for .slick-list, ensuring only the content (text, picture, and button) scrolls: How can I avoid the picture being cropped in t ...

Guide to automatically adjust child div width to match parent container dimensions

I need assistance with structuring my HTML page, which consists of header, main, and footer sections. Below is the HTML and CSS code I'm utilizing: HTML code : <!DOCTYPE html> <html lang="en"> <head> <meta charset=" ...

Effortlessly switch between CSS animation styles while adjusting animation settings

My HTML element with animation is defined as follows: <div id="box"></div> The box starts by moving 200 pixels to the right, taking 4 seconds to complete. .anim { animation-name: anim; animation-duration: 4s; animation-t ...

Adjusting Font Size in Angular Material Design

Recently, I incorporated https://material.angularjs.org/latest/ to optimize the responsive design of my website. One key feature I am focusing on is adjusting the font size based on different screen sizes. For smaller screens, I intend to set the font siz ...

Horizontal Screen Sharing on iPad

Currently, I have a two-column website set up using Wordpress. However, I am facing an issue with the right side column scrolling over on iPads. While the page behaves properly on desktops, on iOS devices, the div is able to scroll over the navigation ba ...

Adjust the space between spans by utilizing the margin

There are two spans (although there could be many more) on this web page that I need to adjust the distance between. I tried using the margin-bottom attribute, but it doesn't seem to have any effect. The spans remain in their original positions, which ...

creating a vertical scroll bar for an HTML table's content

How can I set a fixed height for my HTML table on a webpage so that if it exceeds the height, a vertical scrolling bar is automatically displayed? Any assistance would be greatly appreciated. Thank you. ...

Improving my 'Adaptive' layout

Check out my website at kylesethgray.com. I've created a 'somewhat responsive design', but there are two issues that need fixing: Whenever I have a list, whether it's an <ul> or <ol>, the bullets get cut off when the bro ...

Adjust the width of a div in Angular 6 based on a specified condition

I need to adjust the width of a div based on certain conditions. <div [ngStyle]="'width': selectedTab =='Home' ? '50%' : '100%'"> </div> The currently selected tab is stored in "selectedTab". There ...