• Resolved Chrissy

    (@paperkawaii)


    Hi there, I’d love to keep using your plugin.

    I use varnish cache, and just noticed that your plugin prevents it from being cached.

    I unticked the create javascript cache but that had no effect.

    Is there a reason for this, or is this an error?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello,

    Actually, the plugin should not prevent or affect the use of varnish cache, however, I recommend you activate the option: “Activate Javascript Cache” in the settings page of the plugin (accessible through the menu option: “Settings/Calculated Fields Form”).

    Could you send me the link to the webpage where the form is inserted, please?

    Best regards.

    Thread Starter Chrissy

    (@paperkawaii)

    Hi, thanks for your reply ??

    Ok, well I had that option ticked from the beginning but tried it with and without.
    I have enabled the plugin again and you can view a form here.

    I have been through and already deactivated all plugins and used a default theme and this plugin is the only one to effect the varnish cache.

    However, it could be that the varnish ‘status’ is incorrect, I am not sure how to check it is working or not, I can only go by what the status message is, I uploaded a screenshot of what it says here. After deactivating the plugin, the error messages do not come up.

    Plugin Author codepeople

    (@codepeople)

    Hello @paperkawaii,

    I guess the issue may be caused by the use of cookies. There are many plugins that clear the session variables, and has been a necessity emulate the session with transients and store the session id as a cookie.

    Please, tries the following modification, and let me know if the modification solves the conflict.

    1. Open the “/wp-content/plugins/calculated-fields-form/inc/cpcff_session.inc.php” file with the text editor of your choice.

    2. Go to the piece of code:

    if(!headers_sent())

    and edit it as follows:

    if(false && !headers_sent())

    Best regards.

    Thread Starter Chrissy

    (@paperkawaii)

    Hey, I made the change however it did not help.

    I also checked on a varnish cache checking website, and it’s definitely preventing the cache from working.

    Thread Starter Chrissy

    (@paperkawaii)

    Why set this topic as resolved? It is not…

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Honest question because as a moderator I get a different view than you get: can you unresolve your topic on the right sidebar?

    Thread Starter Chrissy

    (@paperkawaii)

    @jdembowski ah, sure I didn’t know I could do that…. yes it is not solved ??

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Cool! I wasn’t sure you could. ??

    Plugin and theme authors can do that but so can the person who opened the topic as you just found out.

    Plugin Author codepeople

    (@codepeople)

    Hello @paperkawaii,

    Please, follow the steps below:

    1. Open the “/wp-content/plugins/calculated-fields-form/inc/cpcff_session.inc.php” file with the text editor of your choice.

    2. Go to the piece of code:

    if( session_id() == "" ) @session_start();

    and edit it as follows:

    id(!is_admin()) return;
    if( session_id() == "" ) @session_start();

    Best regards.

    Plugin Author codepeople

    (@codepeople)

    I’m sorry, I’ve a typo in the code:

    if(!is_admin()) return;
    if( session_id() == "" ) @session_start();

    Best regards.

    Thread Starter Chrissy

    (@paperkawaii)

    It’s working! That’s great, thanks!

    Will these things be overwritten in future updates though?

    Plugin Author codepeople

    (@codepeople)

    Hello @paperkawaii,

    In the free version of the plugin the session is not essential in the public forms, but for the other distributions (the Professional, Developer, and Platinum) the session variables are needed. So, we can include the modification in the free version of the plugin but not in the other distributions.

    I’ll mark this topic as resolved.

    Best regards.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Creating no-cache headers?’ is closed to new replies.