Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#45547 closed defect (bug) (fixed)

Minified RTL package styles are not loaded due to wrong file name

Reported by: vj1221's profile vj1221 Owned by:
Milestone: 5.0.2 Priority: normal
Severity: normal Version: 5.0
Component: Script Loader Keywords: has-patch commit fixed-5.0
Focuses: rtl Cc:

Description (last modified by ocean90)

WordPress version 5 calls for "style.min-rtl.css" file while the actual file name is "style-rtl.min.css".
Therefor an error registered in the console with a 404 code.

File location: /wp-includes/css/dist/block-library/style.min-rtl.css?ver=5.0
Should be: /wp-includes/css/dist/block-library/style-rtl.min.css?ver=5.0

Attachments (3)

צילום מסך 2018-12-09 ב-10.00.07.png (24.0 KB) - added by vj1221 6 years ago.
45547.patch (986 bytes) - added by ocean90 6 years ago.
45547.2.patch (2.9 KB) - added by ocean90 6 years ago.
Alternative patch which reuses $rtl_styles

Download all attachments as: .zip

Change History (21)

#1 follow-up: @sebastienserre
6 years ago

Hello @vj1221 and many thanks for your ticket.

How can we reproduce this bug?

#2 in reply to: ↑ 1 @vj1221
6 years ago

Replying to sebastienserre:

Hello @vj1221 and many thanks for your ticket.

How can we reproduce this bug?

Hello @sebastienserre,
Just set the wordpress to RTL language (Hebrew/Arabic). Refresh the frontend and open developer tools in your browser. You will see the error caught in the console.

#3 @sebastienserre
6 years ago

OK I've reproduced it on WP5.0 but not in the dev version which is WP 5.1-alpha-43678 so I think there's a closed ticket somewhere (but i'm quiet new on Core Contributing and don't find it)
I think you'll have a better answer once everyone will be come back from WCUS ;-)

#4 @ocean90
6 years ago

#45549 was marked as a duplicate.

#5 @ocean90
6 years ago

  • Component changed from General to Script Loader
  • Description modified (diff)
  • Milestone changed from Awaiting Review to 5.0.1
  • Summary changed from Wrong css file name to Minified RTL package styles are not loaded due to wrong file name

@ocean90
6 years ago

#6 @ocean90
6 years ago

  • Keywords has-patch added

45547.patch ensures the suffix is passed to the handle so the replacement for RTL styles can work correctly.

Last edited 6 years ago by ocean90 (previous) (diff)

@ocean90
6 years ago

Alternative patch which reuses $rtl_styles

#7 @ocean90
6 years ago

#45577 was marked as a duplicate.

#8 @baraklevy
6 years ago

IS there a solution for this issue?
Does this sometimes cause pages to load empty and you need to click Refresh to see content?

#9 @only.sadeghi
6 years ago

hi,
i have the same problem. two files that named “style-rtl.min.css” and “theme-rtl.min.css” in directory “wp-includes/css/dist/block-library” is ok.
but when two files loaded, changed name in address to “style.min-rtl.css” and “theme.min-rtl.css”.
so error “net::ERR_ABORTED 404” show in inspect element.
i fixed this issue by change file name. please fixed it.
thanks

#10 @pento
6 years ago

  • Milestone changed from 5.0.1 to 5.0.2

#11 @ocean90
6 years ago

#45646 was marked as a duplicate.

#12 @desrosj
6 years ago

#45652 was marked as a duplicate.

#13 @ocean90
6 years ago

In 44231:

Script Loader: Pass the suffix to package style handles to ensure correct file names for minified RTL stylesheets.

See #45547.

#14 @ocean90
6 years ago

  • Keywords commit fixed-5.0 added

#15 @ocean90
6 years ago

#45682 was marked as a duplicate.

#16 @ocean90
6 years ago

#45685 was marked as a duplicate.

#17 @desrosj
6 years ago

In 44314:

Script Loader: Pass the suffix to package style handles to ensure correct file names for minified RTL stylesheets.

Props ocean90.

Merges [44231] into trunk.

See #45547.

#18 @SergeyBiryukov
6 years ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.