WordPress.org

Make WordPress Core

#45288 closed defect (bug) (fixed)

Block Editor: check style-editor-rtl.css in RTL languages

Reported by: mostafa.s1990 Owned by: youknowriad
Milestone: 5.0 Priority: normal
Severity: major Version: 5.0
Component: Editor Keywords: has-patch fixed-5.0
Focuses: rtl Cc:
PR Number:

Description

Keep in mind that all our themes don't have the style-editor-rtl.css file! Because the new version gives the following error.

PHP Warning: file_get_contents(beta/wp-content/themes/twentynineteen/style-editor-rtl.css): failed to open stream: No such file or directory in beta\wp-admin\edit-form-blocks.php on line 204

Attachments (2)

45288.diff (741 bytes) - added by mostafa.s1990 12 months ago.
themes.patch (683 bytes) - added by youknowriad 11 months ago.

Download all attachments as: .zip

Change History (13)

#1 @SergeyBiryukov
12 months ago

  • Focuses rtl added
  • Milestone changed from Awaiting Review to 5.0

#2 @desrosj
12 months ago

  • Keywords needs-testing added

#3 @youknowriad
11 months ago

Do you have an exemple of theme causing this, to check properly? as the logic seems to apply only when there's a defined editor style. And also the editor styles is opt-in, so this won't break any existing them unless they opt-in.

#4 @youknowriad
11 months ago

  • Milestone changed from 5.0 to 5.0.1

I'm punting this for now. We can reconsider if we have more information.

#5 @youknowriad
11 months ago

  • Milestone changed from 5.0.1 to 5.0

Moving back to 5.0.0 as it seems it happens in all themes with Gutenberg support in RTL languages.

#6 @youknowriad
11 months ago

  • Keywords needs-testing removed

Patch was valid thanks @mostafa.s1990 I updated it with a slightly simpler version. Should be good to go.

#7 @youknowriad
11 months ago

I created this Gutenberg issue to backport it into the plugin https://github.com/WordPress/gutenberg/issues/12196

#8 @matveb
11 months ago

Looks good.

#9 @youknowriad
11 months ago

  • Owner set to youknowriad
  • Resolution set to fixed
  • Status changed from new to closed

In 43923:

Block Editor: Fix PHP warning showing up when loading editor styles while in RTL.

In RTL languages, WordPress adds style-editor-rtl.css editor styles to the global $editor_styles
This patch ignores handling these styles if the file is not preset.

Props desrosj, mostafa.s1990.
Fixes #45288.

#10 @youknowriad
11 months ago

  • Keywords fixed-5.0 added
  • Resolution fixed deleted
  • Status changed from closed to reopened

#11 @desrosj
10 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 44270:

Block Editor: Fix PHP warning when loading editor styles while in RTL.

In RTL languages, WordPress adds style-editor-rtl.css editor styles to the global $editor_styles.
This patch ignores handling these styles if the file is not preset.

Also, clarify the docs for the return value of the block_version function.

Props mostafa.s1990, desrosj, mukesh27.

Merges [43923] and [43924] to trunk.

Fixes #45288, #45342.

Note: See TracTickets for help on using tickets.