Ticket #4118 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

tinymce language pack loading fails if no locale is defined

Reported by: m0n5t3r Assigned to: 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 (0.9 kB) - added by m0n5t3r on 04/09/07 16:19:48.
tiny_mce_config.php.diff (0.5 kB) - added by filosofo on 04/10/07 03:40:06.

Change History

04/09/07 16:19:48 changed by m0n5t3r

  • attachment mce_locale_fix.diff added.

04/09/07 16:29:07 changed by rob1n

You're missing an echo.

04/09/07 16:32:07 changed by rob1n

  • 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

04/09/07 16:32:21 changed by rob1n

  • status changed from closed to reopened.
  • resolution deleted.
  • milestone changed from 2.1.4 to 2.2.

now for 2.2

04/09/07 16:33:45 changed by rob1n

  • 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

04/09/07 16:40:49 changed by foolswisdom

  • version set to 2.1.
  • milestone changed from 2.2 to 2.1.4.

04/10/07 02:51:37 changed by Viper007Bond

  • status changed from closed to reopened.
  • resolution 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

04/10/07 03:40:06 changed by filosofo

  • attachment tiny_mce_config.php.diff added.

04/10/07 03:41:38 changed by filosofo

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

04/10/07 04:27:35 changed by rob1n

  • milestone changed from 2.1.4 to 2.2.

Well, that's retarded ;). Fixing.

04/10/07 04:28:44 changed by rob1n

  • status changed from reopened to closed.
  • resolution set to fixed.

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

04/10/07 04:29:58 changed by rob1n

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

04/10/07 09:04:51 changed by Nazgul

  • milestone changed from 2.2 to 2.1.4.

05/19/07 20:32:00 changed by

  • milestone deleted.

Milestone 2.1.4 deleted