processwire / processwire-issues

ProcessWire issue reports.
44 stars 2 forks source link

When settings tab of template is disabled, lock status is not respected #1930

Closed kiwigringo closed 1 week ago

kiwigringo commented 1 month ago

Short description of the issue

When the settings tab of a template is disabled either through UI in advanced mode, or via third party module, changes to a locked page can be saved.

Expected behavior

Attempting to save a locked page should generate a warning, and changes should not save.

Actual behavior

Locked page saves as if it were unlocked.

Steps to reproduce the issue

  1. On the Sytem Tab of a template in advanced mode, check disable settings tab
  2. Create a page from the template.
  3. Set the status of the page to locked (in tree view or lister - obviously not available via settings)
  4. Edit the page and attempt to save.
  5. Edit the template again and uncheck disable settings tab.
  6. Attempt to edit and save page. (Page shouldn't save).

Setup/Environment

ryancramerdesign commented 1 week ago

@kiwigringo Thanks, I've pushed a fix for this. You mentioned via 3rd party module, and I don't know which one that would be or how it works, so if you are able to, please test that 3rd party module with this update.

adrianbj commented 1 week ago

@ryancramerdesign - he noted the use of my RestrictTabView module.

kiwigringo commented 1 week ago

I've tested and can confirm this works now both through the built-in system tab in template config, and Adrian's third party module.

ryancramerdesign commented 1 week ago

@kiwigringo Great! Thanks for testing it out.