Serious Bug in submission process: "A variable mismatch has been detected."
Stack:
Unbuntu 18
Apache2
PHP 7.3
MySQL 5.7
WordPress 5.2.4
JobRoller 1.9.3
No other plugins activated
Issue:
During the job submission process, once a user gets past the "Preview" step, they can't click the "Back" button. If the do, then they will get the following error:
Code:
A variable mismatch has been detected.
variable mismatch.jpg
I have also tested with the latest version of WordPress (5.3) which was released yesterday.
How to replicate:
1. Setup default install of WordPress and JobRoller, no settings modification required
2. Complete the first two steps of the job submission processs ("Enter Job Details", "Preview")
3. Click the "Go Back" button. (Note: if you use your browser back button, it works fine)
Fix that can be implemented in your child theme
Note to other JobRoller users: I would not treat this as a permanent fix, this approach should only be a temporary measure and should be undone once the JobRoller team implements a bug fix.
Add the following two files to your theme:
select-plan-packs-form.php
select-plan-single-form.php
Find the following input:
PHP Code:
<input type="submit" name="goback" class="goback" value="<?php _e('Go Back',APP_TD) ?>" />
Replace with:
PHP Code:
<button id="go-back" class="goback" onclick="window.history.back()">Go Back</button>
This fix is not the greatest if you have a step in between the preview and confirm steps (eg plan select step).
If a user goes to the confirm step then goes back to the plan step, then clicks the newly implemented "Go Back" button, they will actually go back to the confirm step not the preview step.
So definitely not the greatest fix however better than the default behavior.