You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's always added with the same ajax action name, regardless of which plugin loads it. As such, when it's checking the nonce, it's checking it against whichever plugin loaded it first (Flux, in this case). Subsequently, the nonce check fails.
Potential solution:
We likely need each plugin to have its own ajax method (using the group name from Config). We can then pass the same group name to the js file with localize_script.
Note that notices.js will also only ever be loaded from the first plugin. The way this works means it isn't an issue, however, there could be a conflict in the future if that script is being loaded from an outdated plugin. We likely want to use plugin-specific handles for all scripts?
The text was updated successfully, but these errors were encountered:
Steps to reproduce:
feature/uplink
branches).Issue:
The license check will fail because the nonce is invalid.
The ajax check is added here: https://github.com/stellarwp/uplink/blob/main/src/Uplink/Admin/Provider.php#L41
It's always added with the same ajax action name, regardless of which plugin loads it. As such, when it's checking the nonce, it's checking it against whichever plugin loaded it first (Flux, in this case). Subsequently, the nonce check fails.
Potential solution:
We likely need each plugin to have its own ajax method (using the group name from Config). We can then pass the same group name to the js file with localize_script.
The scripts will all need unique, plugin-based handles, too: https://github.com/stellarwp/uplink/blob/main/src/Uplink/Admin/License_Field.php#L94
Note that
notices.js
will also only ever be loaded from the first plugin. The way this works means it isn't an issue, however, there could be a conflict in the future if that script is being loaded from an outdated plugin. We likely want to use plugin-specific handles for all scripts?The text was updated successfully, but these errors were encountered: