Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].
Hello
Since I updated the SiteOrigin Widgets Bundle plugin from v1.12.1 to v1.15.9 I have a problem with my text editor.
When I want to insert a link, I click on the dedicated button but the window to insert the link is not displayed.
Here are the versions :
– WordPress 5.3.2
– SiteOrigin Page Builder 2.10.14
– SiteOrigin Widgets Bundle 1.15.9
– Widgets for SiteOrigin 1.2.2
Did you have the problem? If so, how to solve it?
Thanks in advance
Have a nice day.
Julie
Hi Julie
Thanks for reaching out.
Try checking for a working baseline by temporarily deactivating all plugins not authored by SiteOrigin. Does the issue resolve in that state?
Hi Andrew
Even when disabling all plugins (except SiteOrigin Page Builder, SiteOrigin Widgets Bundle and Widgets for SiteOrigin) I still encounter the error.
Have a nice day
Hi Julie
Please, try repeating the test but this time also switch to a default theme like Twenty Nineteen. Temporarily switch to a default theme and deactivate all non-SiteOrigin plugins, can you find a working baseline in this state?
Hi Andrew
Indeed, it is a side effect with our theme…
Thank’s for your quick answers and look at this.
Have a nice day.
Super, glad to hear you’re making progress. To help diagnose the issue you can check the browser console for errors and send a screenshot of the errors, if present, to the theme developers.
Hi Andrew
The problem I encounter with SiteOrigin is that I create a widget with the “wp_editor()” function and this one causes the error on the wysiwyg.
Have you ever had this problem before?
Have a nice day.
Hi, I haven’t. Please, check both PHP and JS error logs.
https://www.wpbeginner.com/wp-tutorials/how-to-set-up-wordpress-error-logs-in-wp-config/
https://wordpress.org/support/article/using-your-browser-to-diagnose-javascript-errors/#step-3-diagnosis
Hopefully, there will be a specific error, let us know how tig goes.
Hi Andrew
Here is the error code I get when I click on the “add link” button in wysiwyg :
Thanks, what happens when you deactivate all Yoast plugins?
Hi
I don’t have the error anymore, but the button still doesn’t work….
Please, check PHP error logs.
Hi
I don’t have PHP errors…
For information, it doesn’t work anymore since the update of the plugin “SiteOrigin Widgets Bundle” from version 1.12.1 to version 1.15.9.
The plugin updated before “SiteOrigin Widgets Bundle” is “Livemesh SiteOrigin Widgets” (from version 2.5.1 to version 2.5.7).
Thanks for the update.
Please, send us a copy of the theme or plugin you’ve authored containing the widget using
wp_editor()
. Wetransfer.com is an easy way to send.Hi
Unfortunately, I can’t provide you with the whole theme. Here is the widget file with the
function that causes problems.
Link : https://we.tl/t-D0OznGBxe1
Have a nice day
Thanks for the update.
I’ll have Alex from SiteOrigin comment further here when he’s available later today. I don’t believe it’s possible to use
wp_editor
as you are attempting to. Please, see https://developer.wordpress.org/reference/functions/wp_editor/.Once initialized the TinyMCE editor cannot be safely moved in the DOM. For that reason running wp_editor() inside of a meta box is not a good idea unless only Quicktags is used. On the post edit screen several actions can be used to include additional editors containing TinyMCE: ‘edit_page_form’, ‘edit_form_advanced’ and ‘dbx_post_sidebar’. See https://core.trac.wordpress.org/ticket/19173 for more information.
Also, see https://core.trac.wordpress.org/ticket/20264, specifically https://core.trac.wordpress.org/ticket/20264#comment:4
Unfortunately TinyMCE cannot be moved in the DOM once it’s initialized. That makes it impossible to use wp_editor() directly in a widget. Was thinking to add another method to wp_editor() that would make it work in two steps:
first enqueue scripts and output the hidden html for the dialogs (all that goes at the bottom of the page),
second output the html around the editor and some JS to initialize it, leaving out the actual init call so it can be initialized on demand.
That would make it possible to add the editor with ajax too.
Thanks.
This code worked correctly before the plugins were updated. Did you change anything to your code?
If I disable the SiteOrigin Page Builder plugin, the “link” button works correctly.
Hi Julie,
I’m sorry to hear you’re having issues after updating your plugins.
You mentioned you were previously using SiteOrigin Widgets Bundle 1.12.1. That version was released on the 17th of July 2018 so there’s been a large number of changes made since then – according to GitHub, there have been 701 commits since then. At this stage, we really need to take a look at your theme files to work out what’s going wrong. It’s okay if you would prefer not to provide us with your theme, but please note we’re very limited in how we can help you without them as we have no way of reliable of identifying what in your theme isn’t compatible with SiteOrigin Widgets Bundle anymore.
Can you please show me a screenshot of the link button you’re having issues using? We don’t support attachments os you’ll need to upload your screenshot to a third-party image hosting site like Imgur.
Hi Alex
I’ve reproduced the problem with the WordPress default theme “twentysixteen” :
– by adding these 2 lines in the function file :
– and in a ‘widgets’ folder I put the file I sent you earlier.
Then in the pages, I have the following error: when you select a text or an image to add a link, the popin to add it doesn’t display.
Here is the screenshot : https://we.tl/t-1mUHCLT1Fd
Have a nice day
Hi Julie,
Thanks for checking. Was the provided widget file the complete widget? Is this file any different to the file you’re using? I ask as I’ve replicated the step you outlined in your last reply and added the provided widgets file and no widget is showing for me.
Hi Alex
Yes, the file I sent you is the full widget. It is displayed in the “Widgets” part of WordPress and has no interaction in pages or posts with your plugin.
Have a nice day
Hi Julie44,
Thanks. By no interaction, do you mean you’re not using SiteOrigin Page Builder to add your widget?
Does this issue occur if you disable all non-SiteOrigin plugins? You’ll need to test this through the WordPress Widgets page at WP AdminAppearanceWidgets.
Hi Alex
Yes that’s right, I don’t use SiteOrigin Page Builder to add my widget. My widget is only available in Admin / Appearance / widget.
When I disable non-SiteOrigin plugins I always get the same error.
Have a nice day
Hi Julie,
Thank you for clarifying. We’re not too sure why your widget has stopped working, but we suspect the issue you’re facing was caused after a recent WordPress update. We recommend posting a thread on WordPress.org about the issues you’re having with your custom widget and they’ll be able to be of assistance with this.
We’d like to assist further but operate with limited resources. As noted in your testing, the issue doesn’t appear to be linked to SiteOrigin plugins. We do all we can within our free support scope but don’t normally assist with advanced troubleshooting. Hopefully, someone on the WordPress forums can shed some light on what the issue might be
Hi Alex
Thank’s, however, as said above, this code causes an error with your SiteOrigin Page Builder plugin. If I disable it I don’t have any more error….
Have a nice day
Hi Julie
Thanks for hanging in there with us. Apologies for misunderstanding your replies earlier regarding plugin conflict testing. We can confirm the issue with your widget exists at AppearanceWidgets when Page Builder is activated.
For reference, here is the test theme we used: https://siteorigin.com/wp-content/uploads/2020/03/test.zip. And here are the JS errors present the first time the widget is added: https://imgur.com/a/f3XsgG4.
We’d very much like to offer a solution but, at this time, neither Alex or I know why this issue is occurring. If it was our widget in the same position, the only thing we can think to try would be to use the Editor JS API instead of the server-side method of initializing the WP Editor.
https://make.wordpress.org/core/2017/05/20/editor-api-changes-in-4-8/
https://gist.github.com/rheinardkorf/aec4d46d3833d2f7a6a27c4481ba0b44
Alternatively, the SiteOrigin Editor widget can be used or if you aren’t using the SiteOrigin Widgets Bundle and would prefer a smaller plugin, Black Studio TinyMCE is also an option.
Hi
There’s no problem, with the number of messages, there’s bound to be some loss of information…
Thank you for your answer, I’ll see about making different calls.
Have a nice day
Thanks for your understanding, we hope you can find a solution that works for this project.