0

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. enter image description here

But with TinyMCE Advanced when I wrote post, alert message shows enter image description here

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?

  • 1
    easiest way to fix it is not to change the plugin dir in the first place? – Mark Kaplun Jul 18 '17 at 13:25
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.

  • It means I can't rename folder plugins right? @Rarst – Pirates Vũ Jul 18 '17 at 15:22
  • You can?.. I don't see how that would follow out of my answer. – Rarst Jul 18 '17 at 15:28
  • I changed code in function wp_plugin_directory_constants() default-constants.php and it's working.really fun – Pirates Vũ Jul 18 '17 at 16:05
  • You shouldn't ever change core files. You should properly configure this with constants, as per answer. – Rarst Jul 18 '17 at 16:19
  • I put this code in wp-config.php i.imgur.com/JAe99TT.png And I realized when I updated wordpress core, this code in file default-constants.php will be deleted..I laughed at yourself..Thank you – Pirates Vũ Jul 18 '17 at 17:02
-1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.