SmartForms - Could not find valid unique request id

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
webform
Power Poster
Power Poster
Posts: 518
Joined: Sat Nov 25, 2006 3:39 pm

SmartForms - Could not find valid unique request id

Post by webform »

I have made my own Visitor Management Software with SmartForms and LISE.
Visitors check in on an iPad standing at the reception, but I often get reports that when visitors submit the form they are met with the error message "Could not find valid unique request id".

The registration itself goes through and an entry is saved in LISE and an email receipt is sent to the visitor and the reception.

At first I thought it was because the form was on the screen for too long before a visitor filled out the form, so I divided the process into several pages, where you are first met with a welcome screen, where the visitor must choose what type of guest they are. Only here is the page with the form retrieved.

I have set a timer on the page so that it redirect back to the welcome page after 3 minutes if idle, but visitors are still met with the SmartForms error.

Recently, following an old post here on the forum, I added {$smtfm_requestid} to the email template, but still get messages about the error.

I have tested several times myself, but funnily enough I can't get the error myself, so I am at a loss as to what is happening and what needs to be done to solve it?

Code: Select all

Cms Version: 2.2.22
LISE: 1.5.6
SmartForms: 2.1.0
CMSMSExt: 1.4.5
phpversion: 8.3.27
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1817
Joined: Wed Feb 25, 2009 4:25 am

Re: SmartForms - Could not find valid unique request id

Post by DIGI3 »

I think this is typically called by it failing csrf, so a temporary workaround would be adding this to your config file:

Code: Select all

$config['xt_ignore_csrf'] = true;
This isn't recommended but if it makes the problem go away at least you'll have it narrowed down. Then you might just need to set up a duplicate of the site and have some volunteers test it to see if you can narrow it down to particular actions, devices, browsers, etc., and then put in a bug report if you can reliably recreate it (you are not alone with this issue, but more tests will make it easier for JoMorg to fix).
Not getting the answer you need? CMSMS support options
User avatar
webform
Power Poster
Power Poster
Posts: 518
Joined: Sat Nov 25, 2006 3:39 pm

Re: SmartForms - Could not find valid unique request id

Post by webform »

Thanks for the suggestion!

I have tried countless times to test after I have received a complaint. But I can never provoke the error myself. So I am really in the dark about what is going on.

It seems that only our visitors can provoke the error and get it on the Form Output page, after submitting the form.

Full error text:

Code: Select all

SmartForms error: Sorry, something has gone wrong. We could not find a valid unique request id in the posted data
Could it be how the Form Output page is set up? I do have an UDT getting the Visitor Card ID.

Code: Select all

<div class="row justify-content-center text-center">
	<div class="col-12">
		<h3 class="display-4 fw-bolder mb-3">Welcome {$firstname}</h3>
		<p>You have been assigned visitor card: <strong>{CardNumber visitor_id=$visitor_id}</strong></p>
		<p>Please remember to return visitor card when you leave.</p>        
		<a href="{cms_selflink href='visitor-check-in'}" class="button button-circle button-red button-xlarge w-75 mb-4">Finish (<span class="countdown countdown-inline" data-second="10" data-format="S" data-redirect="{cms_selflink href='visitor-check-in'}"></span>)</a>
		<div class="w-100"></div>
		<p>An email has been sent to {$email}, which you can show at the reception desk to receive your visitor card.</p>
	</div>
</div>
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1817
Joined: Wed Feb 25, 2009 4:25 am

Re: SmartForms - Could not find valid unique request id

Post by DIGI3 »

It's likely not anything you've done. I can sometimes recreate it when submitting the same form multiple times in a short period, but not reliably enough to see a pattern. In most cases I have just disabled csrf and will continue to do so until/if the module is improved to have fewer false-positives.
Not getting the answer you need? CMSMS support options
Post Reply

Return to “Modules/Add-Ons”