Have to apply design after stylesheet changes

Forum rules
Only administrators can post or move items here.
Post Reply
Bigge

Have to apply design after stylesheet changes

Post by Bigge »

Build Date: 07/15/2015 18:30:12 (and previus to)

I have a design with attached:
template for the page,
template for the menu,
stylesheet for the page,
stylesheet for the menu.

When I change the stylesheet for the menu and save, the style is no longer active.
I have to resave the design to get cmsms to use the style

This is what happens (video): https://goo.gl/ub2xAY

If I change the stylesheet for the page this problem do not appear.

/Birger
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Have to apply design after stylesheet changes

Post by calguy1000 »

Are you by any chance using PHP 5.5+ with the opcode cache enabled?

If so, can you please try disabling the opcode cache and see if that solves the problem.

It solves the problem for me. and if I can get confirmation from others that this is infact the issue I will work out an isolated (without CMSMS) test case and report a bug to the smarty guys.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Have to apply design after stylesheet changes

Post by calguy1000 »

for me, with opcache enabled I must wait ~10 seconds after applying a change to a stylesheet before reloading my page.

I have verified that my database timestamp and filesystem timestamp(s) are in sync.

I spent last evening debugging this issue in the bowels of the latest smarty, and discovered that the compiled template file is 'included' in smarty twice. I think the opcache optimizes this so that no 'real' work is done the second time around.

This causes the stylesheet changes to always be '1 behind' what is actually in the database.

disabling the opcache in my php.ini solved the issue for me.

Now I am preparing a well documented test case (without using CMSMS) to submit as a bug report to the smarty guys. but would like real confirmation that the opcache is the issue.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Bigge

Re: Have to apply design after stylesheet changes

Post by Bigge »

I am using MAMP 3.3 with Apache/2.2.29, php 5.6.10 and cache off, but configured --enable-opcache
opcache-status tells me I "do not have the Zend OPcache extension loaded"
From my php.ini:
[OPcache]
;zend_extension="/Applications/MAMP/bin/php/php5.6.10/lib/php/extensions/no-debug-non-zts-20131226/opcache.so"

Waiting before reload does not help.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Have to apply design after stylesheet changes

Post by calguy1000 »

Okay, then that is not the issue that I experienced.

Once I 'patched' around that particular problem I have no problems with stylesheet changes taking instantaneous effect. Others on the dev team could not reproduce the issue either.

I suggest you look at the system information screen to make sure that your database and filesystem times are all in sync.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Post Reply

Return to “Closed Issues”