Unyson icon indicating copy to clipboard operation
Unyson copied to clipboard

wp-editor in theme settings doesn't work after last update 2.5.7

Open RodalErmakov opened this issue 10 years ago • 16 comments

Hi) I use wp-editor option in my theme settings: err1 And it worked. After last update 2.5.7 wp-editor doesn't work: err2 tinyMCEPreInit is not defined

Please help. Thanks)

RodalErmakov avatar Jul 04 '16 05:07 RodalErmakov

@RodalErmakov Please show the contents of the tinyMCEPreInit here.

Are you developing locally? Can you somehow give me access to your setup?

andreiglingeanu avatar Jul 04 '16 07:07 andreiglingeanu

Yes, I've sent you (to:[email protected]) an access to my wordpress site. Thanks)

RodalErmakov avatar Jul 04 '16 07:07 RodalErmakov

@RodalErmakov Problem is reproduced. Thanks.

Fix to come soon.

andreiglingeanu avatar Jul 04 '16 08:07 andreiglingeanu

Thank you very much)

On Mon, Jul 4, 2016 at 1:08 PM, Andrei Glingeanu [email protected] wrote:

@RodalErmakov https://github.com/RodalErmakov Problem is reproduced. Thanks.

Fix to come soon.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ThemeFuse/Unyson/issues/1705#issuecomment-230229394, or mute the thread https://github.com/notifications/unsubscribe/ANph7FcPpxNV27xImkp4SSiDbabx7klVks5qSL91gaJpZM4JEEg7 .

RodalErmakov avatar Jul 04 '16 08:07 RodalErmakov

@moldcraft The problem here is once again because we don't have wp-editor anywhere else besides the popup. In this case it doesn't know it will have to enqueue wp-editors static.

andreiglingeanu avatar Jul 04 '16 08:07 andreiglingeanu

The temporar fix to this problem is to temporary add a hidden wp-editor anywhere in your Theme Settings. It doesn't have to be hidden, you should hide it just if you don't want him to be around.

This will do the trick.

Frankly, there should be a better way of doing this but I don't have time to get to this now.

We should be ready to close.

andreiglingeanu avatar Jul 04 '16 08:07 andreiglingeanu

Ok, thanks)

On Mon, Jul 4, 2016 at 1:23 PM, Andrei Glingeanu [email protected] wrote:

The temporar fix to this problem is to temporary add a hidden wp-editor anywhere in your Theme Settings. It doesn't have to be hidden, you should hide it just if you don't want him to be around.

This will do the trick.

Frankly, there should be a better way of doing this but I don't have time to get to this now.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ThemeFuse/Unyson/issues/1705#issuecomment-230233399, or mute the thread https://github.com/notifications/unsubscribe/ANph7NM2pyfyDs8pmVTrRkcjShtClJR9ks5qSMMdgaJpZM4JEEg7 .

RodalErmakov avatar Jul 04 '16 08:07 RodalErmakov

The problem here is once again because we don't have wp-editor anywhere else besides the popup

Option-type popup? It does enqueue for inner options https://github.com/ThemeFuse/Unyson/blob/v2.5.7/framework/includes/option-types/popup/class-fw-option-type-popup.php#L34

ghost avatar Jul 04 '16 08:07 ghost

@moldcraft Addable popup. It also does enqueue for inner options but it doesn't worked, for some reason.

andreiglingeanu avatar Jul 04 '16 09:07 andreiglingeanu

It does enqueue https://github.com/ThemeFuse/Unyson/blob/v2.5.7/framework/includes/option-types/addable-popup/class-fw-option-type-addable-popup.php#L31

So why it doesn't work?

ghost avatar Jul 04 '16 09:07 ghost

Steps to reproduce

Add in {theme}/framework-customizations/theme/options/settings.php

$options = array(
    'p' => array(
        'type' => 'addable-popup',
        'popup-options' => array(
            'w' => array('type' => 'wp-editor'),
        ),
    ),
);

ghost avatar Jul 04 '16 10:07 ghost

@moldcraft This doesn't work. I have to add every time one more wp-editor in TS in order to make it working. Not sure why. Maybe the check is not correct.

andreiglingeanu avatar Jul 04 '16 13:07 andreiglingeanu

I didn't say that is the solution.

ghost avatar Jul 04 '16 14:07 ghost

https://github.com/ThemeFuse/Unyson/issues/1715

ghost avatar Jul 05 '16 14:07 ghost

25a102a

andreiglingeanu avatar Jul 09 '16 12:07 andreiglingeanu

Please test again https://github.com/ThemeFuse/Unyson-Extensions-Approval/issues/232

ghost avatar Jul 09 '16 12:07 ghost