• Resolved eugenio2023

    (@eugenio2023)


    Hello,

    We have problems with the forms that we have on our website, the entries that are registered are registered with the wrong date. We think it is something related to the cache. We have installed the Fresh Forms for Gravity plugin but we are still having problems with wrong date registrations. Can you help us?

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Samuel Aguilera

    (@samuelaguilera)

    Hi @eugenio2023

    Troubleshooting the entry date issue falls out of the scope of this plugin support.

    But that said, checking your page headers I found that the page is still being cached. If you have Fresh Forms still enabled, that would indication that you are using a embedding method not supported or that you don’t have a supported caching plugin installed.

    Checking the source code for the page it seems that you are using SG Optimizer, which is supported, so it must be embedding method.

    You can add the following snippet to your theme functions.php file to force Fresh Forms to run for that page:

        add_filter( ‘freshforms_post_has_gform’, ‘fffg_fresh_these_posts’ );

        function fffg_fresh_these_posts(){

            // Force Fresh Forms to run for page id 38608.

            return array( 38608 );

        }

    Thread Starter eugenio2023

    (@eugenio2023)

    Would that function work for all new forms created on that page?

    Plugin Author Samuel Aguilera

    (@samuelaguilera)

    The cache exclusion is done per page ID, it doesn’t matter how many forms you have in the page.

    By the way, I forgot to mention that after adding the snippet, you need to flush the host cache to allow the snippet to run.

    Thread Starter eugenio2023

    (@eugenio2023)

    When I put that function in the child theme’s function.php it gives me this error.

    Warning: Use of undefined constant ‘freshforms_post_has_gform’ – assumed ‘‘freshforms_post_has_gform’’ (this will throw an Error in a future version of PHP) in?/../../../../public_html/wp-content/themes/child-theme/functions.php?on line?200

    Warning: Use of undefined constant ‘fffg_fresh_these_posts’ – assumed ‘‘fffg_fresh_these_posts’’ (this will throw an Error in a future version of PHP) in?/../../../../public_html/wp-content/themes/child-theme/functions.php?on line?200

    Warning: Cannot modify header information – headers already sent by (output started at /home/customer/www/laserum.pt/public_html/wp-content/themes/child-theme/functions.php:200) in?/../../../../public_html/wp-content/mu-plugins/eos-deactivate-plugins.php?on line?2184

    Plugin Author Samuel Aguilera

    (@samuelaguilera)

    It seems that the WordPress forum altered the quotes for the add_filter line, changing straight quotes to curly quotes. This time should be displayed with the correct quotes, replace the add_filter line with the one below:

    add_filter( 'freshforms_post_has_gform', 'fffg_fresh_these_posts' );

    Thread Starter eugenio2023

    (@eugenio2023)

    Hey, Samuel. I have been observing if the inputs of the forms entered correctly, but it has not. If I don’t clean the Siteground cache, the entries continue to enter with the wrong date, that is, if today is 4, they enter with the date 3. Can you help me, please?

    Plugin Author Samuel Aguilera

    (@samuelaguilera)

    Hi Eugenio, the assistance in this support forum is limited to Fresh Forms features.

    Have you added the snippet with the correct add_filter line and flushed the host cache after doing so as suggested?

    Thread Starter eugenio2023

    (@eugenio2023)

    Yes, I have followed the instructions as you suggested.

    Plugin Author Samuel Aguilera

    (@samuelaguilera)

    Do you have the SG Optimizer plugin enabled too? Note that this plugin must be enabled in order for Fresh Forms to be able to exclude the page from cache.

    Thread Starter eugenio2023

    (@eugenio2023)

    Yes, and I have cleared the cache from the Siteground server itself. I have checked if the Siteground cache works correctly and if it works.

    Plugin Author Samuel Aguilera

    (@samuelaguilera)

    We have two options at this point:

    A) You can grant me access to a staging clone of your site to take a look.

    B) You can just exclude the URL of your page from the host cache using the SG Optimizer plugin, see here. If the page is not excluded from cache using this method either, then you would need to reach your host support as this would indicate something is not working as expected between your host and the SG Optimizer plugin, which is designed to control your host cache.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Problems saving dates in gravity forms’ is closed to new replies.