Skip to content

Fix missing nonce in regenerate pages action#2835

Open
Arafat-plugins wants to merge 2 commits intosovware:developmentfrom
Arafat-plugins:missing-nonce
Open

Fix missing nonce in regenerate pages action#2835
Arafat-plugins wants to merge 2 commits intosovware:developmentfrom
Arafat-plugins:missing-nonce

Conversation

@Arafat-plugins
Copy link
Copy Markdown
Contributor

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Security fix
  • Improvement
  • New Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Text changes
  • Other... Please describe:

Description

How to reproduce the issue or how to test the changes

This fixes the Directorist settings "Regenerate Pages" action failing because the admin AJAX request did not include directorist_nonce.

The PHP handler for atbdp_upgrade_old_pages already verifies directorist_nonce, but the settings manager JS only submitted the action value. As a result, the request failed the security check and the UI showed a generic "Sorry, something went wrong" message.

This change adds the missing directorist_nonce to the admin settings AJAX request in both the normal and minified settings manager bundles.

  1. Go to Directorist -> Settings -> Page Setup.
  2. Click Regenerate Pages.
  3. Confirm the request completes successfully instead of failing with the generic error message.
  4. Verify the AJAX request payload includes both:
    • action=atbdp_upgrade_old_pages
    • directorist_nonce=<value>

Any linked issues

Fixes # https://taiga-sovware-u10698.vm.elestio.app/project/directorist/issue/2874

Screenshot

Checklist

@Arafat-plugins Arafat-plugins changed the base branch from trunk to development April 26, 2026 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant