Reputation: 351
I’m using the Tutor LMS plugin. When a user clicks to generate/download their certificate, they receive an alert box in the browser with the error “Nonce not matched. Action failed!” and thus are unable to download the certificate. I’ve tried the following but to no avail!
I'm editing this question to include the error (below) that appears in my WordPress error log... I'm not sure if this provides more clues to the issue?
WordPress database error Can't create table `meatresources_wp77`.`wpm2_tutor_subscriptionmeta` (errno: 150 "Foreign key constraint is incorrectly formed") for query CREATE TABLE IF NOT EXISTS wpm2_tutor_subscriptionmeta (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
subscription_id BIGINT(20) UNSIGNED NOT NULL,
meta_key VARCHAR(255) NOT NULL,
meta_value LONGTEXT,
PRIMARY KEY (id),
KEY subscription_id (subscription_id),
KEY meta_key (meta_key),
CONSTRAINT fk_tutor_subscriptionmeta_subscription_id
FOREIGN KEY (subscription_id)
REFERENCES wpm2_tutor_subscriptions(id)
ON DELETE CASCADE
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci made by do_action('admin_init'), WP_Hook->do_action, WP_Hook->apply_filters, TutorPro\Subscription\Database->migration, dbDelta
Any help would be greatly appreciated! Thank you
Upvotes: -1
Views: 41
Reputation: 191
It sounds like Tutor LMS is failing to verify the nonce (a security token used to prevent unauthorized actions). Here are some potential causes and solutions:
Clear Cache If you're using a caching plugin (e.g., WP Rocket, W3 Total Cache), clear the cache. Purge any server-side cache (e.g., Cloudflare or hosting cache).
Regenerate Permalinks Go to WordPress Dashboard > Settings > Permalinks Click "Save Changes" (without making changes).
Check for JavaScript Errors Open the browser console (F12 > Console tab) and check for errors. If you see an error, it might indicate a conflict with JavaScript.
Check Nonce Verification Issue Tutor LMS may be failing to generate or verify the nonce properly. Try: Manually refreshing the nonce: Log out and back into WordPress. Testing with a different user account: Try using another admin/student account.
Debug with WordPress Logs
Update Tutor LMS Make sure you’re on the latest version of Tutor LMS. If you’ve recently updated it, try rolling back to a previous version.
Check for Custom Code Conflicts If you've customized any functions related to certificates or nonces, try disabling them.
Upvotes: 0