Using wp_editor() when not logged stopped working
-
I’ve build myself a custom page template. Within this template I’m using the
wp_editor()
function. Sadly, when I logout now from my wp site and go now to the page I want to see, I’m getting an error in my console:Uncaught ReferenceError: tinymce is not defined
When I log back in, everything works quite fine. I’ve also tried to enqueue the editor script if a user isn’t logged in this way:
if ( ! is_user_logged_in() ) { wp_enqueue_script( 'wp-tinymce' ); }
But this don’t solved my issue. I’ve cleaned the cache every time and restarted the server.
So does anyone has an idea how I can get the
wp_editor()
function runnning with non-logged-in users?Update
I’ve also tried:
wp_enqueue_editor()
With using the above function, I’m getting now another error. The first error is still there:
Failed to load plugin url: https://develop.pami.de/wp-includes/js/tinymce/langs/de.js
- The topic ‘Using wp_editor() when not logged stopped working’ is closed to new replies.