I’ve found out why this problem is happening. There is a conflict between this plugin and the “Better WP Security” plugin, which has an option to rename the “wp-content” directory. When that happens, the VSBW plugin stil looks in “wp-content” so the following javaScript error is generated: “NetworkError: 404 Not Found – http://…../wp-content/plugins/video-sidebar-widgets/vsw_tinymce/editor_plugin.js?ver=358-24486” The VSBW should examine ‘WP_CONTENT_URL’ to get the proper base URL.
Or maybe it’s the “Better WP Security” plugin that should set ‘WP_PLUGINS_URL’ appropriately.
Anyway, adding a ‘WP_PLUGINS_URL’ definition to the wp-config.php file, in addition to the existing ‘WP_CONTENT_URL’ definition, fixes it. Here is an example:
define( 'WP_CONTENT_URL', 'http://your.domain.name/your-content' );
define( 'WP_PLUGINS_URL', 'http://your.domain.name/your-content/plugins' );
Hi Michelpelletier07,
Thanks for the findings..
In my plugin file vsw_tinymce.php at line 35, I am using WordPress core defined constant WP_PLUGIN_URL to construct the url to editor_plugin.js
$url_to_plugin = WP_PLUGINS_URL."/video-sidebar-widgets/vsw_tinymce/editor_plugin.js";
And in WordPress core file default-constants.php at line 104..shows the constant WP_PLUGIN_URL is actually defined using WP_CONTENT_URL
/**
* Allows for the plugins directory to be moved from the default location.
*
* @since 2.6.0
*/
if ( !defined('WP_PLUGIN_URL') )
define( 'WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins' ); // full url, no trailing slash
Therefore, the plugin did examine the WP_CONTENT_URL..
I don’t see anything wrong with my code.
Perhaps something is wrong with “Better WP Security” plugin.
It should at least set WP_CONTENT_URL correctly when it does any modifications.
And for the record..
I did a screencast to prove that under normal circumstances..my plugin does not break the editor..
http://screencast-o-matic.com/watch/cIiloGVahG
Thanks for your findings and feedback..
Thanks!
Denzel
There’s only one problem though. Your code checks for ‘WP_PLUGINS_URL’ instead of ‘WP_PLUGIN_URL’. See vsw_tinymce.php at line 32.
Hi Michelpelletier07,
Thank you very much!
Sorry, I did not see my typo error.
I always assume I am using the correct name.
Will correct it now and put up a new version.
Thanks for the finding!
Thanks!
Denzel
I have updated the plugin.
Please use version 5.6
Thanks!
Denzel
I will. Thank you for resolving the issue so rapidly. Keep up the good work.
Michel.