Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Works with multiple WYSIWYG boxes and Content Fields? #7

Closed
ryansnowden opened this issue Dec 18, 2014 · 9 comments
Closed

Works with multiple WYSIWYG boxes and Content Fields? #7

ryansnowden opened this issue Dec 18, 2014 · 9 comments
Assignees
Labels
Milestone

Comments

@ryansnowden
Copy link

I have multiple WYSIWYG fields added via Content Fields plugin, and I hide the body.

screen shot 2014-12-18 at 4 57 05 pm

@AndiDittrich
Copy link
Member

Dear ryan,

thank's for your report. please try to apply this patch: https://wordpress.org/support/topic/switching-between-visualtext-editor-is-broken-loading-code#post-6254328
it will be included into the next release.

what do you mean with "i hide the body" ?

best regards, Andi

@ryansnowden
Copy link
Author

Hi Andi!

In the Custom Fields plugin has an option to hide other fields on the page, including the content body, excerpt, all other meta boxes etc. I was just describing my setup incase you're aware of it.

I'll try the patch,
Thanks!
Ryan

On 18 Dec 2014, at 6:22 pm, Andi Dittrich [email protected] wrote:

Dear ryan,

thank's for your report. please try to apply this patch: https://wordpress.org/support/topic/switching-between-visualtext-editor-is-broken-loading-code#post-6254328 https://wordpress.org/support/topic/switching-between-visualtext-editor-is-broken-loading-code#post-6254328
it will be included into the next release.

what do you mean with "i hide the body" ?

best regards, Andi


Reply to this email directly or view it on GitHub #7 (comment).

@ryansnowden
Copy link
Author

Some feedback after replacing the file:

The page loads but there is no toolbar.
There is an error where I don't have line numbers selected as an option so the output is an error:

config: {
theme: "enlighter",
language: "html",
linenumbers: ,
indent: 4
}

If I enable line numbers, this breaks the WYSIWYG editors being loaded and there are js errors with TinyMCE.js:

Uncaught TypeError: Cannot read property 'disabled' of null
Line 339: editMenuButton.disabled(true);

On 18 Dec 2014, at 6:22 pm, Andi Dittrich [email protected] wrote:

Dear ryan,

thank's for your report. please try to apply this patch: https://wordpress.org/support/topic/switching-between-visualtext-editor-is-broken-loading-code#post-6254328 https://wordpress.org/support/topic/switching-between-visualtext-editor-is-broken-loading-code#post-6254328
it will be included into the next release.

what do you mean with "i hide the body" ?

best regards, Andi


Reply to this email directly or view it on GitHub #7 (comment).

@AndiDittrich
Copy link
Member

Oh that's really a bad bug... i will fix it as soon as possible!
Thank's ryan!

@AndiDittrich AndiDittrich self-assigned this Dec 18, 2014
@AndiDittrich AndiDittrich added this to the 2.5 milestone Dec 18, 2014
@AndiDittrich AndiDittrich modified the milestones: 2.5, 2.4 Dec 18, 2014
@AndiDittrich
Copy link
Member

Bug is fixed in v2.4 - and should not appear again
The package is available here on GitHub: https://github.com/AndiDittrich/WordPress.Enlighter/releases

Please tell me if it's working in your case - then i will update the plugin on WordPress.org

@ryansnowden
Copy link
Author

Thanks Andi,

Still some errors when multiple WYSIWYG editors on the page. The PHP warning appears on all. The plugin works on a single page ie. When there is a normal TinyMCE editor as the body. e.g. Adding a new post. The plugin doesnt work with multiple WYSIWYG editors added through Custom Fields plugin.

PHP:
( ! ) Warning: file_put_contents(/Applications/MAMP/htdocs/awesome-presentation.com/trunk/wp-content/plugins/enlighter/cache/userthemes.cache.php): failed to open stream: No such file or directory in /Applications/MAMP/htdocs/awesome-presentation.com/trunk/wp-content/plugins/enlighter/class/ObjectCache.php on line 73

JS:
Uncaught TypeError: Cannot read property 'disabled' of null

// show hide edit menu button
if (isEnlighterCode(node)){
editMenuButton.disabled(false);
}else{
editMenuButton.disabled(true); // <---- line 339
}

On 18 Dec 2014, at 7:53 pm, Andi Dittrich [email protected] wrote:

Bug is fixed in v2.4 - and should not appear again
The package is available here on GitHub: https://github.com/AndiDittrich/WordPress.Enlighter/releases https://github.com/AndiDittrich/WordPress.Enlighter/releases
Please tell me if it's working in your case - then i will update the plugin on WordPress.org


Reply to this email directly or view it on GitHub #7 (comment).

@AndiDittrich
Copy link
Member

Well...the PHP warning can be caused by an inaccessable cache directory - are any warnings appearing on the Enlighter Settings Page ? It should be look like this:
enlighter_sysinfo

Is your cache path /Applications/MAMP/htdocs/awesome-presentation.com/trunk/wp-content/plugins/enlighter/cache/ available & writeable ?

But generally.. Enlighter is not designed to work with multiple TInyMCE Instances - i have to do some research what's going wrong and im not sure if it's possible to fix without deeper modifications of the plugin - could you please provide the url of your used plugin ? i have to setup an testing environment

@ryansnowden
Copy link
Author

Understood on the cache - wasn't too worried.

For multiple editors, you can replicate by installing Custom Fields plugin - https://wordpress.org/plugins/advanced-custom-fields/ https://wordpress.org/plugins/advanced-custom-fields/ and creating a WYSIWYG field:

Basically it's a common plugin. To see an example of it working, it works on Crayon syntax highlighter ;)

Thanks for your help anyway,
Cheers,
Ryan

On 18 Dec 2014, at 8:19 pm, Andi Dittrich [email protected] wrote:

Well...the PHP warning can be caused by an inaccessable cache directory - are any warnings appearing on the Enlighter Settings Page ? It should be look like this:
https://cloud.githubusercontent.com/assets/1474107/5487936/c6350828-86b7-11e4-8669-fd6fe70425e1.png
Is your cache path /Applications/MAMP/htdocs/awesome-presentation.com/trunk/wp-content/plugins/enlighter/cache/ available & writeable ?

But generally.. Enlighter is not designed to work with multiple TInyMCE Instances - i have to do some research what's going wrong and im not sure if it's possible to fix without deeper modifications of the plugin - could you please provide the url of your used plugin ? i have to setup an testing environment


Reply to this email directly or view it on GitHub #7 (comment).

@AndiDittrich
Copy link
Member

It seems to work now in my setup (second wysiwyg editor) - i've added an additional check to ensure that the "Enlighter Edit Button" is available

Please try the updated release. https://github.com/AndiDittrich/WordPress.Enlighter/releases/tag/v2.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants