silverstripe / silverstripe-elemental

Create pages in Silverstripe CMS using content blocks
http://dna.co.nz
BSD 3-Clause "New" or "Revised" License
110 stars 115 forks source link

Saving images when using inline blocks causes JS errors. #1063

Open swytch opened 1 year ago

swytch commented 1 year ago

Adding a new image / updating an image, fires a POST to a missing url and then errors in javascript. Same repo to replicate here : https://github.com/swytch/bugs.

This doesn't inhibit saving the block.

However using the nested block in the same repo, and adding an image inside will stop the image from saving. Uncaught SyntaxError: Unexpected token '<', " - which looks like it's returning the HTML for the editform instead of JSON. I think these are related, so I'm sticking both issues in here.

GuySartorelli commented 1 year ago

Adding a new image / updating an image, fires a POST to a missing url and then errors in javascript

I can't reproduce this. Please add a series of explicit step-by-step instructions for reproducing this.

using the nested block in the same repo, and adding an image inside will stop the image from saving. Uncaught SyntaxError: Unexpected token '<', "

I can't reproduce this either. Please add a second set of step-by-step instructions for reproducing this one.

baukezwaan commented 1 week ago

We are experiencing probably the same issue. Maybe we can shed some light on how to reproduce this.

First some context / findings:

Reproduction steps

Maybe the screencast makes it a little better to understand. The first part is editing in the Blog-section, the second part in the Pages-section (yet it is the same blogpost / page):

https://github.com/user-attachments/assets/4dba21c9-138b-4e6a-9979-593a057944fd