Ticket #4118 (closed defect (bug): fixed)

Opened 5 years ago

Last modified 5 years ago

tinymce language pack loading fails if no locale is defined

Reported by: m0n5t3r Owned by: anonymous
Priority: high Milestone:
Component: TinyMCE Version: 2.1
Severity: major Keywords: has-patch
Cc:

Description

If there is no locale defined, the TinyMCE language setting is empty, which leads to incorrectly generated paths for plugin language packs. The attached patch sets it to "en", which is the TinyMCE default value.

I'm marking this as major because it affects to various degrees all TinyMCE plugins that use language packs (between localization not working and meltdown - in my case it disabled the post publishing i.e. meltdown).

Attachments

mce_locale_fix.diff Download (876 bytes) - added by m0n5t3r 5 years ago.
tiny_mce_config.php.diff Download (512 bytes) - added by filosofo 5 years ago.

Change History

m0n5t3r5 years ago

You're missing an echo.

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

(In [5219]) Default to 'en' for TinyMCE language if get_locale() is empty, to avoid meltdowns. Props m0n5t3r. fixes #4118 for 2.1

  • Status changed from closed to reopened
  • Resolution fixed deleted
  • Milestone changed from 2.1.4 to 2.2

now for 2.2

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

(In [5220]) Default to 'en' for TinyMCE language if get_locale() is empty, to avoid meltdowns. Props m0n5t3r. fixes #4118

  • Version set to 2.1
  • Milestone changed from 2.2 to 2.1.4
  • Status changed from closed to reopened
  • Resolution fixed deleted

This is throwing a PHP error on my local install:

Fatal error: Can't use function return value in write context in ...\wp-includes\js\tinymce\tiny_mce_config.php on line 52

I've attached a patch that should fix that problem: I think the argument passed to empty has to be a variable.

  • Milestone changed from 2.1.4 to 2.2

Well, that's retarded ;). Fixing.

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

(In [5224]) empty() only takes variables. Props filosofo. fixes #4118

(In [5225]) empty() only takes variables. Props filosofo. fixes #4118 for 2.1

  • Milestone changed from 2.2 to 2.1.4
  • Milestone 2.1.4 deleted

Milestone 2.1.4 deleted

Note: See TracTickets for help on using tickets.