Make WordPress Core

Opened 5 years ago

Last modified 15 months ago

#43668 new defect (bug)

Image cropping fails for many PHP locales, if set

Reported by: knutsp's profile knutsp Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Media Keywords: dev-feedback
Focuses: javascript Cc:

Description

If{{{#!php
<?php
setlocale( LC_NUMERIC /*or LC_ALL */, 'nb_NO' );
}}}

is used then Media image cropping fails and selection input fields show Infinity. It works fine with 'en_US', btw.

If #17268 is implemented, I guess it includes use of `setlocale'.

Anyway, image cropping, and other internal passing of numeric data insede an application, should work independently of how numbers are to displayed according to a locale.

I don't know which file or script to look into, to suggest a patch. Any help appreciated.

Change History (3)

#1 @joemcgill
4 years ago

  • Keywords reporter-feedback added

Hi @knutsp,

I'm not able to reproduce this bug in WP 5.2-beta3. Can you confirm that this is still an issue, and if so, clarify the steps you used to reproduce this bug?

Thanks.

#2 @knutsp
4 years ago

  • Keywords dev-feedback added; reporter-feedback removed

The bug is still there in latest beta.

Install on PHP 7.3.3. Add ´setlocale´ to ´wp-config.php´ with a valid PHP locale string (important).

Using Firefox latest, upload an image to Media. Click "Edit Image" button. Drag the mouse pointer on the image to make a rectangle. Observe Selection field values being filled with Infinity.

Last edited 4 years ago by knutsp (previous) (diff)

#3 @marcelschulz
15 months ago

This bug still exists as of March 2022 (5.9.2).

Have you ever found a solution to it?

Version 0, edited 15 months ago by marcelschulz (next)
Note: See TracTickets for help on using tickets.