Page 1 of 1

Have to apply design after stylesheet changes

Posted: Wed Jul 15, 2015 6:51 pm
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

Re: Have to apply design after stylesheet changes

Posted: Thu Jul 16, 2015 3:00 pm
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.

Re: Have to apply design after stylesheet changes

Posted: Thu Jul 16, 2015 3:59 pm
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.

Re: Have to apply design after stylesheet changes

Posted: Thu Jul 16, 2015 6:26 pm
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.

Re: Have to apply design after stylesheet changes

Posted: Thu Jul 16, 2015 6:47 pm
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.