WPIntell

Source evidence

Please enter at least 2 characters

VS Contact Form · support · 2023-12-12T21:36:00+00:00

mixedsentiment
highseverity
0.95relevance
7replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

7 / 27 rows with source links

25.9% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

20 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
skirridsystems resolved
Hi Guido, Another problem which I’ve seen intermittently. I fill in all the form fields, click submit, and get back the same form with all fields blank and an error message by each one saying e.g., please enter at lest 2 characters. I looked at the POST data and all fields seem to be filled in, so my only guess is that in the form validation the $rand_suffix value doesn’t match for some reason. I’m using the Siteground caching plugin and if I exclude the page from caching then form submission seems to work OK. I can see that the suffix is handled using a transient but I’m not exactly sure how it works and it seems quite complicated. Looking at other contact forms I can see they don’t do this. There is an ID for the form, 1 for the first form, 2 for the second, etc. in case you have more than one on a page, but no random component. I’ve done something similar myself for a maps plugin, adding a suffix to differentiate between maps on the same page. Do you actually need the random suffix as it seems to introduce other problems? Simon Hi Simon, Caching causes this I guess. I’ve added a transient recently that holds the sum values. These values are also being used for a prefix for form and field ID. They change upon successful submission. This way you cannot resubmit form over and over again, or go back (via back button) to filled in form after successful submission It’s strange that caching is causing this, because I’m using a native WP feature (transient). Which plugin are you using? Guido Which plugin are you using? Sorry, you mention Siteground. Do you mean the Speed Optimizer plugin perhaps? It’s strange that caching is causing this I guess the prefix of form and fields doesn’t change after submission? This means cache is using the “old” version of form. Guido Yes, it’s that plugin. I know I have to disable caching for any page which uses VS Event List and I was hoping not to have to do that for contact forms too. Simon Hi Simon, I will install this plugin and start testing.. Will keep you informed. But I think many other plugins that display non-static content run into this issue. Or do you have an example of a form plugin that works fine with caching enabled? Maybe I can learn from it.. And thank you for your patience, and for investigating it. You may think this form plugin is quite simple, but because you can abuse a form in many ways, I had to include all kinds of security related features. That’s the reason for the random form and field name prefix and the use of transients to temporary store sum data. Guido Hi again, Just installed Speed Optimizer, but I cannot activate Dynamic Caching and Memcached, because I’m not on Siteground environment. But it seems that the File-Based Caching is causing this. As I already mentioned in a previous reply: This means cache is using the “old” version of form. It returns a form with the old prefix. For now only solution is to exclude this page from caching. The validation of other plugins is often JS based. My plugin needs a new pageload to process and validate data. That’s causing this cache issue. Guido OK, understood. I’ll disable caching for that page. Hi Simon, Unfortunately I cannot fix this easily, other plugins use JS/AJAX for form processing. My plugin depends on the default PHP page reload, and with caching enabled the cached version of that page is being returned. Until I have a solid solution/fix I will add some info about caching in the readme file. Guido

Comments

7 shown
Guido 2023-12-12T22:52:00+00:00

Hi Simon, Caching causes this I guess. I’ve added a transient recently that holds the sum values. These values are also being used for a prefix for form and field ID. They change upon successful submission. This way you cannot resubmit form over and over again, or go back (via back button) to filled in form after successful submission It’s strange that caching is causing this, because I’m using a native WP feature (transient). Which plugin are you using? Guido

Guido 2023-12-13T06:04:00+00:00

Which plugin are you using? Sorry, you mention Siteground. Do you mean the Speed Optimizer plugin perhaps? It’s strange that caching is causing this I guess the prefix of form and fields doesn’t change after submission? This means cache is using the “old” version of form. Guido

skirridsystems 2023-12-13T18:45:00+00:00

Yes, it’s that plugin. I know I have to disable caching for any page which uses VS Event List and I was hoping not to have to do that for contact forms too. Simon

Guido 2023-12-13T20:05:00+00:00

Hi Simon, I will install this plugin and start testing.. Will keep you informed. But I think many other plugins that display non-static content run into this issue. Or do you have an example of a form plugin that works fine with caching enabled? Maybe I can learn from it.. And thank you for your patience, and for investigating it. You may think this form plugin is quite simple, but because you can abuse a form in many ways, I had to include all kinds of security related features. That’s the reason for the random form and field name prefix and the use of transients to temporary store sum data. Guido

Guido 2023-12-13T20:39:00+00:00

Hi again, Just installed Speed Optimizer, but I cannot activate Dynamic Caching and Memcached, because I’m not on Siteground environment. But it seems that the File-Based Caching is causing this. As I already mentioned in a previous reply: This means cache is using the “old” version of form. It returns a form with the old prefix. For now only solution is to exclude this page from caching. The validation of other plugins is often JS based. My plugin needs a new pageload to process and validate data. That’s causing this cache issue. Guido

skirridsystems 2023-12-15T14:14:00+00:00

OK, understood. I’ll disable caching for that page.

Guido 2023-12-16T13:52:00+00:00

Hi Simon, Unfortunately I cannot fix this easily, other plugins use JS/AJAX for form processing. My plugin depends on the default PHP page reload, and with caching enabled the cached version of that page is being returned. Until I have a solid solution/fix I will add some info about caching in the readme file. Guido