Make WordPress Core

Opened 9 months ago

Closed 9 months ago

Last modified 9 months ago

#59771 closed defect (bug) (reported-upstream)

6.4 Sharing Patterns Possible Bug

Reported by: plr-videos's profile PLR Videos Owned by:
Milestone: Priority: normal
Severity: normal Version: 6.4
Component: Editor Keywords:
Focuses: Cc:

Description

Hello,
I am a WordPress user not a developer so I may have done something wrong but here is what I found.

I made a video:
https://www.youtube.com/watch?v=f6-kaB6aisQ

In 6.4, I created a pattern and then tried to export the JSON file from the site editor window where the 'My Patterns' are displayed and got the error when I tried to import that JSON file into a different site.

When I tried the same export but NOT from the Site Editor but from within the My Patterns management page and the export/import worked perfectly.

The entire process is shown in the video but I kinda messed up the volume a bit so you may have to turn up the speakers a little.

So I'm not sure if I did something wrong or if this is a bug in need of a repair.

Thank you.

Also - This is in 6.4 so I selected "Trunk" for the version because I have not done this before and since there is not a 6.4 to select.

  • Steve D.

Attachments (2)

not-working-2-row-2-column-media-text-pattern.zip (1.2 KB) - added by PLR Videos 9 months ago.
working-2-row-2-column-media-text-pattern.zip (1.2 KB) - added by PLR Videos 9 months ago.

Download all attachments as: .zip

Change History (19)

#1 @hellofromTonya
9 months ago

  • Component changed from General to Editor
  • Keywords reporter-feedback added
  • Milestone changed from Awaiting Review to 6.4

Hello @plr-videos,

Welcome to WordPress Core's Trac :)

Thank you reporting this issue. And the video you shared is very helpful.

I attempted to reproduce by coping the TT4 Hero template, but could not reproduce on my Mac. I noticed you're on Windows. Wondering if there's an issue related to it.

Are you using 6.4 RC2? If no, which 6.4 version are you using?

I'm pulling this issue into 6.4 for investigation, since the enhancement was added in this cycle, though may also need to be reported upstream in Gutenberg.

Pinging editor release leads for broader awareness @mikachan @siobhyb @karmatosed @bph @annezazu.

#2 @PLR Videos
9 months ago

Hello,
Yes, 6.4-RC2 and Windows 11 machine.

I'm new to this bug reporting thing so if you need anything else please let me know and I pinky-promise to remember this for the next time.

  • Steve D.

#3 @pbiron
9 months ago

Thanx @plr-videos .

I can't reproduce the error on a Win 11 machine, using the latest versions of Chrome, Edge, and Firefox.

Is the WordPress running on a Windows machine as well, or it on a Linux server?

Also, can you please attach the JSON files to this ticket? Just click the Attach file button above, and upload one JSON that gives you the error, and then do so again with a JSON file that you are able to successfully import.

#4 @PLR Videos
9 months ago

Hi,
I've attached both the working and non-working JSON files and here is a quick video showing me demonstrating these working and non-working files:

https://www.youtube.com/watch?v=jehGv8mC71U

  • Steve D.

#5 follow-up: @PLR Videos
9 months ago

Sorry - Yes, WordPress is running on my Windows 11 machine.

  • Steve D.

#6 in reply to: ↑ 5 @pbiron
9 months ago

Replying to PLR Videos:

Sorry - Yes, WordPress is running on my Windows 11 machine.

Thanx for confirming that. My tests were also with 6.4-RC2 running on Windows + Windows browser.

Also, thanx for the JSON files. Yes, they certainly different...and one is valid JSON and the other isn't.

I think the problem has to do with the encoding in the non-working JSON file: the pattern contains UTF-8 (non-ASCII) chars. I haven't yet figured out why it's not being encoded correctly.

Last edited 9 months ago by pbiron (previous) (diff)

This ticket was mentioned in Slack in #core-editor by pbiron. View the logs.


9 months ago

#8 @PLR Videos
9 months ago

Hi,
I probably do not have to mention this but I'll do it anyway - those two different JSON files are from the same Pattern but the non-working one was generated from the site editor (as shown in the first video) and the working one is generated from what I call the "my patterns management page" - as shown in the first video.

  • Steve D.

#9 @hellofromTonya
9 months ago

Hmm, not able to reproduce either. But there's clearly a difference in the 2 files a @pbiron noted.

I wonder:

  • Are there browser console errors?
  • Does it happen when deactivating all plugins and using TT4 (Twenty Twenty-Four) theme?

At this point to move it forward, I think this needs to be reported upstream in the Gutenberg repository as this section of code is maintained within Gutenberg, not in Core.

@plr-videos do you mind opening an issue in Gutenberg? You can do that here https://github.com/WordPress/gutenberg/issues/new/choose.

Once opened, can you please copy and paste the URL to the issue here? That will wire / link the 2 reports together.

Last edited 9 months ago by hellofromTonya (previous) (diff)

#10 @pbiron
9 months ago

@hellofromTonya as far as I can tell, the problem has to do with the encoding of the em-dash character (which occurs twice in the pattern). The other non-ASCII chars seem fine. Why the em-dash is not encoded correctly when exporting from w/i the site editor I haven't yet been able to figure out.

#11 @hellofromTonya
9 months ago

Interesting. Thanks for sharing more information @pbiron. Let's make sure that same information is added to the Gutenberg issue.

Hey @pbiron, thinking more about it, you've dug into the issue and worked with @plr-videos on it. Do you have time to open an issue in Gutenberg and share your findings?

#12 @pbiron
9 months ago

I will have time in a hour or two...I'm dealing with a day-job semi-emergency at the moment.

This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.


9 months ago

#14 @pbiron
9 months ago

  • Milestone 6.4 deleted
  • Resolution set to invalid
  • Status changed from new to closed

Reported upstream in GB Github Issue 55746.

We should probably keep this ticket open, at least until some progress has been made on the GitHub issue.

#15 @pbiron
9 months ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

#16 follow-up: @hellofromTonya
9 months ago

  • Keywords reporter-feedback removed
  • Resolution set to reported-upstream
  • Status changed from reopened to closed

We should probably keep this ticket open, at least until some progress has been made on the GitHub issue.

Hmm, thinking this ticket can be closed as reported upstream. Why?

  • If a fix is needed, it'll happen in Gutenberg and then be brought to Core in a npm package update. Those package updates are tracked in a different Trac ticket.
  • Gutenberg issues are also tracked separately.
  • The discussions, testing, etc. should happen in Gutenberg.

So I'll reclose this ticket. Let's move to the Gutenberg issue.

#17 in reply to: ↑ 16 @pbiron
9 months ago

Replying to hellofromTonya:

Hmm, thinking this ticket can be closed as reported upstream. Why?

fine by me.

Note: See TracTickets for help on using tickets.