Helix Ultimate: Why is File "template.css" Modified With Each Website Access? - Question | JoomShaper

Helix Ultimate: Why is File "template.css" Modified With Each Website Access?

PH

Peter Hunkeler

Helix Framework 1 week ago

Hi To help me detect hacking activities on my website, I have implemented a cron job which lists all files that have been added or changed within the last day.

I'm surprised to find file

templates/shaper_helixultimate/css/template.css 

to report changed "last modicifation" time after each single website access. Though the content does not change, the timestamp changes.

Out of interest: Why is this?

Regards Peter

0
5 Answers
Atick Eashrak Shuvo
Atick Eashrak Shuvo
Accepted Answer
Support Agent 1 week ago #232083

Hello Peter,

Thank you for the detailed questions. Your understanding is generally correct, but there is an important distinction regarding how Helix Ultimate uses SCSS.

In Helix Ultimate, SCSS is primarily used to generate the template's CSS based on the configuration and style settings selected in the template options. For example, settings such as the body background color, text color, header colors, typography, and other template styling options are represented through SCSS variables and are then compiled into the final template.css file.

SCSS is used instead of writing all of the styles directly in CSS because it provides features such as variables, reusable rules, nesting, and better organization of the template's styling. This makes it much easier for the template to dynamically generate the appropriate CSS based on the options configured by the user.

Regarding your questions:

  • Helix Ultimate template updates: When you update Helix Ultimate, any required changes to the template's SCSS/CSS structure are handled as part of the update process. You generally do not need to keep the SCSS compiler enabled permanently just to accommodate future template updates.
  • Changing template options: If you change styling options through the Helix Ultimate template configuration, the required CSS is generated accordingly. The SCSS compiler is relevant when the template needs to regenerate the CSS from the SCSS sources.
  • Manually modifying SCSS files: Normally, customers do not need to edit the SCSS files directly. If you do make custom changes to the SCSS source files, then yes, you would need to enable the SCSS compiler so that those changes can be compiled into template.css. After confirming that the changes have been compiled, you can disable the compiler again on a production site.

So, for a typical production website where you are not directly modifying the SCSS source files, it is recommended to keep the SCSS compiler disabled. This also avoids the unnecessary recompilation and modification of template.css that you observed with your monitoring script.

I hope this gives you a clearer picture of how the process works and why disabling the compiler on a production site is recommended.

Best regards

0
Atick Eashrak Shuvo
Atick Eashrak Shuvo
Accepted Answer
Support Agent 1 week ago #231924

Hello Peter,

Thank you for reaching out.

The behavior you are seeing is expected and is related to the SCSS compiler in Helix Ultimate. The compiler processes the SCSS files and may update the modification timestamp of templates/shaper_helixultimate/css/template.css when the website is accessed, even if the actual CSS content has not changed.

If this is a production website and you are not actively making changes to the template's SCSS files, we recommend disabling the SCSS compiler. This will prevent it from running on each request and should stop the template.css modification timestamp from being updated unnecessarily.

For more information about the SCSS compiler and its configuration, please refer to our documentation:

https://www.joomshaper.com/documentation/helix-framework/advanced#scss

We hope this clarifies the behavior. Please let us know if you have any further questions.

Best regards

0
PH
Peter Hunkeler
Accepted Answer
1 week ago #232046

Thanks for the explanation. I just read the paragraph about SCSS (you link). It says one disable this on an production site. Fine. I undestand that the compilation will pick up changes from templates/shaper_helixultimate/scss and store the result into templates/shaper_helixultimate/css/template.css

An update of the Helix Ultimate template might introcuce changes to .../scss files. So, wouldn't there be the need to recompile them? Or will athe template update take care of this? If not, what wa teh consequence?

Also, not sure if I as a customer would ever have the need to change one of the scss files. But if so, I would need to enable the compilation, access the website (causing the compile to run) and disable again?

In summary, I'd like to get a good understanding of this process before disabling the compilation. Regards

0
PH
Peter Hunkeler
Accepted Answer
1 week ago #232131

Great! Thanks a lot for the detailed explanation. Much appreciated. Regards, Peter

0
PH
Peter Hunkeler
Accepted Answer
1 week ago #232132

Please excuse me, but one more question just came to my mind: With your explanation above in mind, why would I need to have the SCSS compiler enabled in development environments? Even there, I would only change the look and feel via the templace's configuration, so SCSS to CSS will occur automatically upon template "Save", right?

0