Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access Denied while editing block #6425

Closed
marvinde opened this issue Feb 13, 2018 · 3 comments · Fixed by #6497
Closed

Access Denied while editing block #6425

marvinde opened this issue Feb 13, 2018 · 3 comments · Fixed by #6497
Labels
Status:Available Reviewed issue, it’s real, we’d review a pull request. Type:Bug Existing functionality not performing as expected.
Milestone

Comments

@marvinde
Copy link
Contributor

Steps to reproduce :

  1. Add a new File block to a page
  2. Select the file and enter the Link Text
  3. Publish the page
  4. Enter the Edit Mode on this page
  5. Edit the file block and empty the field link text
  6. When you save the first time, you have the normal error, but when you save another time, the following error appears :

Error
An unexpected error occurred. Access Denied

When showing the debug error output I have the following in the console :

Exception: Access Denied in file concrete/controllers/backend/user_interface/block.php on line 55

This has been tested in 8.3.3a1

@dbuonomo
Copy link

dbuonomo commented Feb 14, 2018

I'm seeing the same intermittently on v8.3.2 with content blocks. Some of the exception are occurring in different file locations:

Exception Occurred: .../concrete/controllers/backend/user_interface.php:38 Access Denied (0)
Exception Occurred: .../concrete/controllers/backend/user_interface/block.php:55 Access Denied (0)
Exception Occurred: .../concrete/controllers/backend/user_interface/block.php:68 Access Denied (0)

I have advanced permissions enabled for this site.

@aembler
Copy link
Member

aembler commented Feb 14, 2018

This is because editing the block when it's approved actually causes a new version of the block to be created on the new version of the page. Then, the next time we do the submit, we're still passing the old block ID to the form submission.

I bet if we send back the block ID in the error response, and update the hidden bID input field, we could fix this.

@aembler aembler added Status:Available Reviewed issue, it’s real, we’d review a pull request. priority:like to have labels Feb 14, 2018
@aembler aembler added this to the 8.3.3 milestone Feb 14, 2018
@aembler aembler added the Type:Bug Existing functionality not performing as expected. label Feb 14, 2018
@haeflimi
Copy link
Contributor

editing the block when it's approved actually causes a new version of the block to be created

Why is the new Block Version created when we open the edit Dialog in the first place? - Does it need to be that way? - Isn't that the underlaying issue here?

I think it only needs to create a new Block Version when validation passes. - As long as validation on a block Editing operation fails the block does not change. - So why creating a new Block Version?

That way the Error could be avoided without having to build some sort of "workaround" to update the blockID in the DOM from the validation Error message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status:Available Reviewed issue, it’s real, we’d review a pull request. Type:Bug Existing functionality not performing as expected.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants