WPBakery CSS Caching

Hi,

We have an issue that css from wpbakery (mostly margins, paddings, colors, etc.) is not always rendered in the front end.
I contacted the hosting to check if this is cache related and they told me it is not related to server cache and may be related to the WPBakery’s own cache or css system.

I contacted WPBakery support which investigated this issue and concluded it is related to the theme. They activated the WP default theme and the issue was solved.

Steps to reproduce are unknown, it’s just appears sometimes without us doing any known actions.
Are you familiar with that issue? how can that be fixed?

Thanks.

Hi @Amir.Caspi,

Thanks for reaching out.

Would you mind providing the exact URL where the issue is present? Screenshot will be helpful as well.

Thanks!

These are two examples where you can see the issue:

Summary

http://lumenis6.onpressidium.com/aesthetic/
http://lumenis6.onpressidium.com/surgical

The CSS from wpbakery is not rendered at the front end.
If I will go ahead and just click on update in the page edit it will fixt the problem so I think it is related to some caching or something similar. WPBakery support insist that their plugin is not creating this issue and that I should contact the theme’s support.

Hey @Amir.Caspi,

The only cache system in Pro is its Style Cache. But, that is unlikely to cause an issue since its only for Pro’s V2 Elements.

If the issue happens again, try the following steps to check if they’re causing the issue:

  1. Go to Pro > Settings and clear the Style Cache
  2. Disable X Integration in WPBakery Page Builder > X Integration

Did you monitor the behavior in the default WP theme? You said the issue is intermittent so it could be that it coincidentally worked in default theme when you tested. Please try spending some testing time monitoring it also.

Thanks.

I tried to clear the style cache but as you thought, it did not affect the problem.

The integration between the theme and WPBakery is already disabled, I also tried to enable it to see if it solves the issue but it did not.

I did try to monitor the behavior with default theme and the CSS was loaded correctly - you are right though, the problem source is not clear so it is not 100% related to the theme. I’m relying here on the WPBakery support team which told me that.

Regular posts/pages can be updated and the issue is being solved but It is still very problematic for me because on some areas of the website the WPBakery editor is being used in a waw that there is no update button which clears the issue and whenever the CSS is not loaded correctly we are not able to do anything about it.

Please let me know if you can think of anything it may relate to?
When the CSS is loaded correctly it is wrapped in the following style:
<style type="text/css" data-type="vc_shortcodes-custom-css" class=""></style>

On pages that the CSS is not loaded, this style element does not exist in the markup at all.

Thanks.

That looks like this is a Visual Composer issue. Please relay the message to them that you have monitored in the default WP Theme yet the issue persists.

Also copying your site over to other hosts to see if it’ll work as your host might also play a role in this issue though they said it’s not server caching.

Thanks.

I mentioned before that using the default theme the CSS was loaded correctly, so this is may be related to the theme.
I’m in an endless loop with WPBakery and the hosting regarding this issue and no one is taking responsibility.
I’m not saying 100% that this is theme related but it is probable that it is. Other installations we have with different themes does not create this issue.

Hi Amir,

It’s hard to replicate if it is random. Also can you check your PHP version and make sure to use PHP v5.6.x or later to avoid incompatibility issues.

I suggest you to setup a staging site by following our guide here (https://theme.co/apex/forum/t/cornerstone-content-builder-migration/126) and share your WordPress credentials to your staging site along with your FTP credentials in a secure note, so that we can try to isolate the issue.

Thanks!

Hi, It is not exactly random, it mostly happens when leaving a page in edit mode for several minutes or more and then closing it without an update. But as I mentioned above it is my assumption, it may be reproduced in other ways.

We’re using high quality enterprise hosting with PHP V7:

Hey @Amir.Caspi,

First, please always post sensitive information in a Secure Note. This is for your own security and privacy.

Now regarding the issue, I checked this page’s source code and I don’t see the <style type="text/css" data-type="vc_shortcodes-custom-css" class=""></style> added. I went to the page editor and clicked the Update button and checked the source again and like you said, it was added.

I did what you have described and I have replicated the issue. What really happens is, you are only saving the element. Though it looks like VC does have some auto-saving feature because when checking the front-end, the text is updated, it is not the standard procedure when updating the page. You would really need to click the Update button. Otherwise, you would wait for several minutes just for your page to get updated.

If you have a custom system where the Update button is not available, regretfully, you would need to consult with a third party developer to integrate the button or its function for you. This is a unique use case and would need custom work.

Thank you for understanding.

Hi Christian and thank you for your response.
It is great that you understand what the issue is as it is wasn’t simple for the hosting and the WPBakery support to understand it.

We’re not using this as an actual method or procedure of updating content, it is just by chance that editors may leave a page on edit mode and it will create the problem.

WPbakery insist that the issue comes from the theme/environment and they pointed out the integration of the pro theme with the WPBakery plugin as a possible cause. I noted to their support that the integration is disabled in our environment but they still believe it can be the cause of the issue.
That is why I ask you to step in and really rule out this possibility and if it is indeed related to the theme I would kindly ask you to help solve it as this bug causes us many problems.

Thanks.

Hey Amir,

I sincerely understand your situation. Regretfully, as I’ve said, this is a unique case and troubleshooting this deeply would require custom work which is not a part of our support service.

Moreover, clicking on Update button solves the issue and that is the standard procedure in WordPress. I also could not replicate this in my test site so I have no evidence to report.

I would give one last tip but please note that this is not recommended. Please follow this at your own risk. In pro\framework\functions\plugins open setup.php and comment out this block of code:

if ( X_VISUAL_COMOPSER_IS_ACTIVE ) {
  require_once( $plgn_path . '/visual-composer.php' );
}

That basically totally cuts off the theme from Visual Composer. But again, please note that there might be conflicts and we will not be responsible for that.

Hope that helps and thank you for understanding.

There seems to be other situations where we can’t fix this issue with an update button
We used the 404 page extension that comes with the theme and the CSS from WPBakery is not loaded at that page at all.

Summary

https://lumenis-staging.com/404

Please help.

Hi @Amir.Caspi,

I did what @christian_y do and it’s the same on the default theme. Hence, this is not X theme related. Perhaps you can provide a video recording of the exact procedures? May I’m just missing something.

Though, it might best if we can check it directly from your site. Just to confirm the issue on your video as we compare it on our installation. Could be cache or Visual Composer’s issue.

Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.