Jump to content


Photo

Dynamic Less generations causing issues with host caching

less compile cache

  • Please log in to reply
21 replies to this topic

#1 experticity

experticity

    Member

  • Members
  • PipPip
  • 28 posts
  • Country: Country Flag

Posted 07 March 2014 - 03:51 PM

I've been having some problems with the dynamic nature of the less css with my host.  My host has various levels of caching in place and whenever I make a change to a page within the DMS and publish it, the site looks broken for 10 min before the cache gets flushed.  Something is happening where when I publish not only does it reference a new css file (which is fine) its deletes the old one or something. 

 

I'm having this issue here:

http://threepointfiv...ms.wpengine.com

http://promotive.exp...ms.wpengine.com

 

I'm working with the tech support for how to resolve this and how they're approaching it is they're bypassing cache here http://threepointfiv...-1394039890.css but it doesn't seem to be doing the trick.  Where is the less file that compiles all the less for the site into that one css file?  I'm wondering if they bypass cache on that it will work.

 

I need my site to not look broken every time I publish. 



#2 James B

James B

    Advocate

  • Members

  • 5126 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 08 March 2014 - 12:30 AM

Hi there, the less files are within each section. So for example if you look in the iboxes section for example, they'll be a less file for there. All those files from every section are then compiled into the main less css file.

 

Are you using the staging area to develop the site? Apparently the caching is only on the production area from what I've end



#3 experticity

experticity

    Member

  • Members
  • PipPip
  • 28 posts
  • Country: Country Flag

Posted 09 March 2014 - 03:36 AM

What file compiles all the less files together?  Is it a php file or a less file?



#4 experticity

experticity

    Member

  • Members
  • PipPip
  • 28 posts
  • Country: Country Flag

Posted 10 March 2014 - 03:30 PM

Although I can work around it in staging its not an ideal workflow for a team to use to make updates to the site. 

 

After extensive discussion with my host it appears that the DMS removes the old css file when it compiles the new one causing the issue of my site looking broken when I publish a page from the DMS. 

 

WP Engine has done something on their end for www.experticity.com to work for the time being but as I try to set up separate themes for our other sites I'm running into the same issue. I don't want to have to call WP Engine every time I set up a new site to disable something on their end to get it to work.  Is there something I can do within the DMS that will solve this issue?

 

I've set up sites for:

66.175.213.137  www.3point5.com   
66.175.213.137  www.promotive.com 
 
Please let me know. Thanks.


#5 experticity

experticity

    Member

  • Members
  • PipPip
  • 28 posts
  • Country: Country Flag

Posted 10 March 2014 - 04:25 PM

I'm having the same issue as I was having a couple months ago here - http://forum.pagelin...lishing-issues/



#6 experticity

experticity

    Member

  • Members
  • PipPip
  • 28 posts
  • Country: Country Flag

Posted 10 March 2014 - 04:55 PM

@James B I really need to issue to be resolved quickly.  Is there any way to expedite the process? Is there a tech support line I can call?



#7 James B

James B

    Advocate

  • Members

  • 5126 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 11 March 2014 - 02:06 AM

Hi there,

 

As far as I know its all compiled through the less.engine.php file in the includes folder within DMS.

 

I'll ask the dev team for you but unfortunately it sounds like any solution you used inside DMS would get overridden at the hosts end by their caching.

 

Do all your client sites go on your own hosting account? If so see if they can disable the caching on the production area for all sites on your account. Have you tried serving a static css file, there's a code you could try in this post, see the post Simon made half way down - http://forum.pagelin...ly-serving-css/

 

Unfortunately there's no technical support telephone number for PageLines.


  • batman likes this

#8 James B

James B

    Advocate

  • Members

  • 5126 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 11 March 2014 - 02:53 AM

Hi there, I've just spoken to the core team about this.

 

They've advised that because the db is getting cached it still shows the old css url (which as you said is deleted and replaced) so you get the 404.

 

Apparently there's an option to Flush the cache inside the wpengine panel which should correct everything in the production area. The core team are following up with WP Engine directly to see what other solutions are possible.



#9 experticity

experticity

    Member

  • Members
  • PipPip
  • 28 posts
  • Country: Country Flag

Posted 11 March 2014 - 10:56 PM

It appears the problem lies in the fact that the Pagelines DMS deletes the existing CSS file whenever I publish a page and the cached site can't find the new css file until cache has been purged.  Is there somewhere that I can tell pagelines to not delete old css files or only delete them two or three versions back?  WP Engine has made the file exempt from caching but that doesn't seem to be resolving the issue. 

 

What I have to do right now is publish from the dms and then publish the page from the wordpress admin to get the css to show up.  This doesn't make sense. 



#10 experticity

experticity

    Member

  • Members
  • PipPip
  • 28 posts
  • Country: Country Flag

Posted 11 March 2014 - 10:59 PM

Here is my conversation that I'm currently having with the WP Engine folks:

 

Hello,
 
Thank you for your patience on this issue. I am currently working on getting this resolved, I will provide an update to the issue once I have more information.
 
Cheers,
 
Edwin | L2 Customer Happiness Specialist
WP Engine - Finely Tuned WordPress
 
March 06, 2014 07:54 PM
User photo Edwin 
WP Engine
Hello Ben,
 
Once again thank you for your continued patience on this issue. I have double-checked and confirmed that this URL is bypassing cache http://threepointfiv...-1394039890.css and is hitting the back end of the server but it still does not seem to be generating correctly. Could there be some setting in pageline that is not set up correctly to dynamically generate these style sheets? Please let me know if you have any additional information about this issue.
 
Cheers,
 
Edwin | L2 Customer Happiness Specialist
WP Engine - Finely Tuned WordPress
 
March 06, 2014 08:35 PM
User photo Ben Peck
 
That file gets replaced every time I publish. So is there any way to bypass caching on files the that start with compiled-css- ?
 
Its like something on your end doesn't allow the page to accept a new file for 10 min.
 
March 07, 2014 10:01 AM
User photo Daniel T. 
WP Engine
Hello Ben,
 
Thanks for your call earlier! As requested, I've put the same cache exclusion rule that in place on the "experticity" site onto the "expertdms" installation, for both site ID's 9 and 10.
 
I've talked with Nick, and it sounds like that didn't help to improve the situation on your end. I'll update you through this ticket once I have more information on this.
 
If there are any other questions that I can answer, please feel free to ask!
 
Daniel T. | Customer Happiness Specialist
WPEngine - Finely Tuned Wordpress
 
Support Hours: Tues.-Sat. 3:00PM-Midnight CST
twitter | @wpengine
 
March 07, 2014 06:50 PM
User photo Daniel T. 
WP Engine
Hello Ben,
 
Thanks for your patience! It appears that the change needs to be made within the DMS interface to be replicated. After doing so, it appears that the DMS theme may be part of the problem. I've attached the list of files within "wp-content/uploads/sites/9/pagelines" after a minor change was made on the site (three different times), then published through the DMS interface:
 
$ ls
compiled-css-1394042690.css  editor-draft.css
$ ls
compiled-css-1394042690.css  compiled-css-1394250688.css  editor-draft.css
$ ls
compiled-css-1394042690.css  editor-draft.css
It appears that the theme is removing the old CSS files on it's own, leading the cached copy of the page to no longer appear properly. Let me know if this is expected behavior for this theme, or if there's extra functionality that's managing these files for your site.
 
As an alternative, designing the site's theme in the staging area should help to get around this issue, as there's no caching enabled there, and the site's CSS references will update right away.
 
If there are any other questions that I can answer, please feel free to ask!
 
Daniel T. | Customer Happiness Specialist
WPEngine - Finely Tuned Wordpress
 
Support Hours: Tues.-Sat. 3:00PM-Midnight CST
twitter | @wpengine
 
March 07, 2014 10:06 PM
User photo Jeremy Jones 
WP Engine
Request #191535 "Theme caching error" was closed and merged into this request. Last comment in request #191535:
 
Unfortunately, its still happening.
 
March 08, 2014 12:10 PM
User photo Ben Peck
I'm still trying to get an answer from Pagelines on what file compiles the less. I'll let you know when I hear back.
 
In the mean time I'm wondering if this file is what is compiling the less on the fly 
wp-content/themes/dms/includes/less.engine.php
 
Would it help if we made that file cache exempt?
 
March 10, 2014 11:37 AM
User photo Bri 
WP Engine
Hi there, Ben!
 
Thank you very much for your patience! As per our phone conversation, the agent assigned to this ticket is currently off duty, so I will be assigning this ticket to another available support tech to ensure a timely response. I also wanted to note that if possible, Ben would prefer a phone call, if you have any questions that would help resolve this issue faster. We appreciate your cooperation, and we will make sure that you will reach a resolution as quickly as possible!
 
Regards,
 
Bri Draffen
WordPress Genie | WP Engine
Monday-Friday 10 a.m. to 7 p.m.
 
March 10, 2014 11:49 AM
User photo Ben Peck
I really need this page live asap 
 
I don't want to go live with this issue still being unsolved.
 
March 10, 2014 02:21 PM
User photo Ben Peck
Tested in staging changing something on the page and publishing it through the DMS (theme) and I'm not having the issue I'm having in production. Production still needs to be fixed.
 
Staging Link: (working fine) 
 
Live Link: (NOT working) 
 
March 10, 2014 02:56 PM
User photo Darrell Yeoman 
WP Engine Support
Hi Ben-
 
I've spent some time looking at this, and it looks like there were some odd things in your DNS/domain mapping settings. I've got my hosts file pointed to the correct IP, and the link you mentioned below is up and running as it should be. Try that one more time for me, and let me know if you're still seeing issues there.
 
Thanks,
 
Darrell Yeoman | Customer Happiness Specialist
WP Engine - Finely Tuned Wordpress
 
March 10, 2014 03:42 PM
User photo Darrell Yeoman 
WP Engine Support
This is what I'm seeing on that sample page. Is this now what I should be seeing?
 
Thanks,
 
Darrell Yeoman | Customer Happiness Specialist
WP Engine - Finely Tuned Wordpress
 
Capture.PNG Capture.PNG (quick view)
March 10, 2014 03:44 PM
User photo Ben Peck
That is what it should look like. So its still not working for me. When trying to replicate the issue these are the steps that you must go through to make sure its fixed:
 
1. Go to http://expertdms.wpe...wpengine-common and "Purge All Caches" 
2. Go to http://www.3point5.com/sample-page/ in a different browser than you are logged in as and make sure it looks correct. Black navbar, tan background, etc 
3. Go to http://www.3point5.com/sample-page/ change "Try #30" to "Try #31" and click publish in the bottom right area of the DMS. 
2. Go to http://www.3point5.com/sample-page/ in a different browser than you are logged in as and refresh to make sure it looks correct. Black navbar, tan background, and the content changed. 
4. If it looked good double check by changing the text again and publish again and Go to http://www.3point5.com/sample-page/ in a different browser and refresh. Does it have a white background and everything is aligned left with all the text and images stacked? Then its still broken.
 
Your screenshot is how it should look. Here is a screenshot of it looking broken when I publish.
 
Screen Shot 2014-03-10 at 3.15.30 PM.png Screen Shot 2014-03-10 at 3.15.30 PM.png (quick view)
March 10, 2014 04:16 PM
User photo Darrell Yeoman 
WP Engine Support
Hi Ben-
 
I'm trying to edit that page, but I'm unable to get to the editing screen. Is this because you're in it as well?
 
Thanks,
 
Darrell Yeoman | Customer Happiness Specialist
WP Engine - Finely Tuned Wordpress
 
March 10, 2014 04:31 PM
User photo Ben Peck
You have to use Chrome to use their editor. What browser are you using? Me being logged in shouldn't cause any problems. I'll log out just in case though.
 
March 10, 2014 04:35 PM
User photo Darrell Yeoman 
WP Engine Support
I'm using the latest version of Chrome. I'm able to access the page, but the editor doesn't appear. Not sure what we're doing differently.
 
Thanks,.
 
Darrell Yeoman | Customer Happiness Specialist
WP Engine - Finely Tuned Wordpress
 
March 10, 2014 04:37 PM
User photo Ben Peck
When logged in to the admin does it redirect you to our live www.3point5.com site that we're not testing?
 
March 10, 2014 04:45 PM
User photo Ben Peck
It looks like you changed the domains mapping for www.3point5.com to be "primary". It won't work that way. I changed it back. Try it again. If that doesn't work, try commenting out the host entry in your host file and while logged in access http://3point5.exper...om/sample-page/ to try and edit it.
 
Let me know if that works.
 
March 10, 2014 04:51 PM


#11 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 11 March 2014 - 11:53 PM

We have a possible patch for WPE in testing, it will be integrated into the next minor release as an option.



#12 experticity

experticity

    Member

  • Members
  • PipPip
  • 28 posts
  • Country: Country Flag

Posted 12 March 2014 - 12:50 AM

That's great.  What will the option be?



#13 experticity

experticity

    Member

  • Members
  • PipPip
  • 28 posts
  • Country: Country Flag

Posted 12 March 2014 - 12:50 AM

I have two installations of the DMS on two sites.  One is live.  The other is about to go live.  Yet the CSS is served two different ways and I don't see any visible differences in the way that the sites are configured. Thoughts? 

 

http://www.expertici...=113-1212212554

http://www.3point5.c...-1394579851.css (to view this you have to put this in your local host file   66.175.213.137  www.3point5.com )



#14 Danny

Danny

    Is Awesome!

  • Moderators
  • 15653 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 12 March 2014 - 11:50 AM

That 3point5 site isn't using DMS, it doesn't even look like it's using Wordpress?



#15 experticity

experticity

    Member

  • Members
  • PipPip
  • 28 posts
  • Country: Country Flag

Posted 12 March 2014 - 02:32 PM

The current 3point5 site that is live is not using wordpress correct.

 

We're planning on moving it over to wordpress and to see that you have to add this line to your host file to see it. 

 

66.175.213.137  www.3point5.com



#16 experticity

experticity

    Member

  • Members
  • PipPip
  • 28 posts
  • Country: Country Flag

Posted 12 March 2014 - 03:00 PM

@Simon_P When will the next minor release be?



#17 experticity

experticity

    Member

  • Members
  • PipPip
  • 28 posts
  • Country: Country Flag

Posted 12 March 2014 - 03:27 PM

@Simon_P I'm trying to find a work around until this patch you speak of is released and @James_B recommended I try adding this to my functions.php in my child theme. 

 

add_filter( 'render_css_posix_', '__return_true' );

 

Suggestion based off this thread:

http://forum.pagelin...ly-serving-css/

 

I implemented it and it doesn't seem to change how the css gets served. 



#18 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 12 March 2014 - 05:33 PM

define( 'PL_NO_DYNAMIC_URL', true );

 

Add to wp-config.php

 

I will create a test version tonite and attach it here for you to test ok?



#19 James B

James B

    Advocate

  • Members

  • 5126 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 13 March 2014 - 12:55 AM

Update: Version 1.1.8 has been released with the patch in place, you can upgrade now. A few members of the developer team have tested this and it seems to solve the problem.

 

In the advanced options panel in the DMS control panel > settings look at the Alternate Css URL method.

 

Please let us know how you get on.



#20 experticity

experticity

    Member

  • Members
  • PipPip
  • 28 posts
  • Country: Country Flag

Posted 17 March 2014 - 08:20 PM

Updated and I see the option but unfortunately its not working for me.  Meaning the problem is still happening.

 

http://www.3point5.c...-for-pagelines/







Also tagged with one or more of these keywords: less, compile, cache