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

Convert a classic post with a non-ascii named image to Gutenberg block, breaks the image #11284

Closed
iamgabrielma opened this issue Oct 31, 2018 · 4 comments
Labels
[Block] Classic Affects the Classic Editor Block [Feature] Block Transforms Block transforms from one block to another [Feature] Paste [Type] Bug An existing feature does not function as intended

Comments

@iamgabrielma
Copy link
Contributor

Describe the bug
Originally discovered when testing this other issue .

By creating a post via the classic editor, adding an image with a non-ascii name (in this case img-nön-ñàsc'íi-แปลภาษา), and then switching this to Gutenberg editor by clicking on "convert to block" breaks the image.

Also in the front-end seems that the div for the image is not generated:
screen shot 2018-10-31 at 13 35 55

To Reproduce
Steps to reproduce the behavior:

  1. Go to Posts , create a new post using the classic editor.
  2. Add an image with non-ascii characters, for example img-nön-ñàsc'íi-แปลภาษา.png
  3. Save the post
  4. Go back to your posts, click on the post you're going to edit, select the block and click on "convert to block"
  5. See how the image breaks

Expected behavior

The image to keep showing up in both the editor and the post

Screenshots

screen shot 2018-10-31 at 13 28 28

  • WordPress 4.9.8
  • Gutenberg 4.1.1
@johngodley
Copy link
Contributor

I wasn't able to reproduce this using 4.2.0 RC 1 so it's possible it may have been fixed. Can you try with 4.2?

@iamgabrielma
Copy link
Contributor Author

iamgabrielma commented Nov 1, 2018

I wasn't able to reproduce this using 4.2.0 RC 1 so it's possible it may have been fixed. Can you try with 4.2?

I'm getting a bunch of unrelated errors due to the testing environment and how files are built, will re-test as soon as a new version is deployed in the .org repo :)

@designsimply designsimply added the Needs Testing Needs further testing to be confirmed. label Nov 5, 2018
@designsimply
Copy link
Member

Tested and confirmed that images with non-ascii filenames break after block conversion from classic to image block. (2min)

screen shot 2018-11-07 at 10 16 22 am
Seen at http://alittletestblog.com/wp-admin/post.php?post=15585&action=edit running WordPress 4.9.8 and Gutenberg 4.2.0 using Firefox 63.0 on macOS 10.13.6.

Note: the image urls before an after look exactly the same to me but the one from before the conversion works for me and the one from after the conversion results in a 404 with this error showing in the console when viewing the image directly in Firefox:

The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol.

screen shot 2018-11-07 at 10 16 33 am
http://alittletestblog.com/wp-content/uploads/2018/11/nön-300x225.jpg (before)

screen shot 2018-11-07 at 10 16 29 amhttp://alittletestblog.com/wp-content/uploads/2018/11/nön-300x225.jpg (after)

@designsimply designsimply added [Type] Bug An existing feature does not function as intended [Feature] Paste [Block] Classic Affects the Classic Editor Block and removed Needs Testing Needs further testing to be confirmed. labels Nov 7, 2018
@mtias mtias added the [Feature] Block Transforms Block transforms from one block to another label Nov 21, 2018
@youknowriad
Copy link
Contributor

I'm not able to reproduce this issue. I used the same image name here. please reopen if you still experience the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Classic Affects the Classic Editor Block [Feature] Block Transforms Block transforms from one block to another [Feature] Paste [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

5 participants