Concrete5: Access Denied while editing block

Created on 13 Feb 2018  路  3Comments  路  Source: concrete5/concrete5

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

Available Bug

Most helpful comment

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.

All 3 comments

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.

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.

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

iampedropiedade picture iampedropiedade  路  4Comments

gavthompson picture gavthompson  路  6Comments

hissy picture hissy  路  4Comments

joe-meyer picture joe-meyer  路  4Comments

katzueno picture katzueno  路  6Comments