Wordpress and TinyMCE Advanced: Failed to load javascript

admin2025-06-04  3

When I change WP_PLUGIN_DIR example:

define( 'WP_PLUGIN_DIR', $_SERVER['DOCUMENT_ROOT'] . '/../wp-content/renamefolder' );

All plugins are shown and I can activate them.

But with TinyMCE Advanced when I wrote post, alert message shows

Failed to load plugin: insertdatetime from url ../../wp-content/plugins/tinymce-advanced/mce/insertdatetime/plugin.min.js

How to change code in tinymce-advanced.php or how to fix it?

When I change WP_PLUGIN_DIR example:

define( 'WP_PLUGIN_DIR', $_SERVER['DOCUMENT_ROOT'] . '/../wp-content/renamefolder' );

All plugins are shown and I can activate them.

But with TinyMCE Advanced when I wrote post, alert message shows

Failed to load plugin: insertdatetime from url ../../wp-content/plugins/tinymce-advanced/mce/insertdatetime/plugin.min.js

How to change code in tinymce-advanced.php or how to fix it?

Share Improve this question edited Jan 26, 2019 at 6:23 fuxia 107k39 gold badges255 silver badges461 bronze badges asked Jul 18, 2017 at 10:53 Pirates VũPirates Vũ 131 silver badge2 bronze badges 1
  • 1 easiest way to fix it is not to change the plugin dir in the first place? – Mark Kaplun Commented Jul 18, 2017 at 13:25
Add a comment  | 

2 Answers 2

Reset to default 0

WP_PLUGIN_DIR customizes the location of files in filesystem.

Most likely you also need to customize WP_PLUGIN_URL, which customizes client–facing URL location. If you omit this one, WP will decide it based on WP_CONTENT_URL, which might not at all point to your new location.

Another possibility is that plugin/code in question simply cannot handle a custom location. Generally this shouldn't happen under a normal WP API usage and such should be reported to developers as a possible bug.

I had the same problem an copied the en.js to de.js and voila - it works.

for some reason tinymce seams to ignore the language and defaults to en

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1748973730a315291.html

最新回复(0)