File Block with PDF embed only works with admins
-
WordPress v5.8.3
Adding a File block with a PDF logged not as an admin the block gets broken.
This is what the console shows:Block validation: Block validation failed for core/file Content generated by save function: <div class="wp-block-file"><object class="wp-block-file__embed" data="https://mysite.go-vip.net/wp-content/uploads/2022/01/first-test.pdf" type="application/pdf" style="width:100%;height:600px" aria-label="Embed of first-test."></object><a href="https://mysite.go-vip.net/wp-content/uploads/2022/01/first-test.pdf">first-test</a><a href="https://mysite.go-vip.net/wp-content/uploads/2022/01/first-test.pdf" class="wp-block-file__button" download>Download</a></div> Content retrieved from post body: <div class="wp-block-file"><a href="https://mysite.go-vip.net/wp-content/uploads/2022/01/first-test.pdf">first-test</a><a href="https://mysite.go-vip.net/wp-content/uploads/2022/01/first-test.pdf" class="wp-block-file__button" download>Download</a></div>
Steps to test
- Log in as an editor
- Create a new page
- Add the File block and select a PDF
- Save the changes
- Reload the current page
This will show the block with the Attempt Block Recovery button.
We’ve also tested logged as an admin and this works just fine. The issue is with the rest of the roles.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘File Block with PDF embed only works with admins’ is closed to new replies.