Resolved
Reported for: Toolset Forms 1.8.3
Resolved in: Toolset CRED 1.8.4
When WPML and CRED are activated and the WPML language URL format is set to A different domain per language
, CRED uploading fails on secondary languages, throwing an error: Invalid NONCE
.
This issue will be fixed in the 1.9 release of Toolset CRED.
In the meantime, add this code to your wp-config.php
file:
header('Access-Control-Allow-Origin: *'); if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') { // return only the headers and not the content // only allow CORS if we're doing a GET - i.e. no saving for now. if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD']) && $_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD'] == 'POST'){ header('Access-Control-Allow-Headers: X-Requested-With'); } exit; }
and download this file, extract it and replace the class.credfile.php
file in:
/cred-frontend-editor/embedded/toolset/toolset-common/toolset-forms/classes/
folder./types/library/toolset/toolset-common/toolset-forms/classes/
folder./views/embedded/toolset/toolset-common/toolset-forms/classes/
folder./layouts/toolset/toolset-common/toolset-forms/classes/
folder./types-access/toolset/toolset-common/toolset-forms/classes/
folder.You have to clean the cache.
Please remember to make a backup of your files and database before doing this.
What code do we add in wp-config?
Thanks arrova.cats for the message.
Please try again now we have fixed tha errata post.