Title: Failed to load plugin
Last modified: February 13, 2019

---

# Failed to load plugin

 *  Resolved [Laura](https://wordpress.org/support/users/lauraevoluted/)
 * (@lauraevoluted)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/failed-to-load-plugin-9/)
 * I get this error message:
 * `Failed to load plugin url: /https://[DOMAIN]/wp-content/plugins/nextgen-gallery/
   products/photocrati_nextgen/modules/attach_to_post/static/ngg_attach_to_post_tinymce_plugin.
   min.js?ver=3.1.6`
 * I’ve seen an old thread mentioning Advanced Custom Fields, but when I deactivate
   the plugin the error is still there.
 * I’m running version 3.1.6 of your plugin, and version 5.0.3 of WordPress.

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [Mihai Ceban](https://wordpress.org/support/users/mihaiimagely/)
 * (@mihaiimagely)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/failed-to-load-plugin-9/#post-11204327)
 * Hi,
 * Let’s first check to see if there is a plugin conflict happening. Temporarily
   deactivate all plugins, then reactivate NextGEN Gallery only. Does the issue 
   still appear? If so, temporarily switch to a WordPress default theme (this deactivation
   is only intended to quickly check to see if the issue goes away or is still present).
   If by deactivating the other plugins the issue does go away, reactivate each 
   of the other plugins one at a time to locate the culprit. Keep me posted on your
   results 🙂
 * Mihai
 *  Thread Starter [Laura](https://wordpress.org/support/users/lauraevoluted/)
 * (@lauraevoluted)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/failed-to-load-plugin-9/#post-11206803)
 * Hi Mihai,
 * Thanks for your comment about debugging. I’ve figured out it is because the theme
   supports root relative urls and this is causing an issue.
    I think it’s because
   you use `$router->get_static_url()` to load scripts in your plugin.
 * `enqueue_tinymce_resources()` in `/nextgen-gallery/products/photocrati_nextgen/
   modules/attach_to_post/module.attach_to_post.php`
 *  [Mihai Ceban](https://wordpress.org/support/users/mihaiimagely/)
 * (@mihaiimagely)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/failed-to-load-plugin-9/#post-11208711)
 * Hi [@lauraevoluted](https://wordpress.org/support/users/lauraevoluted/),
 * Thanks for letting us know. Can you please let us know where your theme is using
   root relative urls in the code?
 * Mihai
 *  Thread Starter [Laura](https://wordpress.org/support/users/lauraevoluted/)
 * (@lauraevoluted)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/failed-to-load-plugin-9/#post-11209340)
 * Hi,
 * Lots of places:
 *     ```
       $root_rel_filters = array(
           'bloginfo_url',
           'the_permalink',
           'wp_list_pages',
           'wp_list_categories',
           'roots_wp_nav_menu_item',
           'the_content_more_link',
           'the_tags',
           'get_pagenum_link',
           'get_comment_link',
           'month_link',
           'day_link',
           'year_link',
           'tag_link',
           'the_author_posts_link',
           'script_loader_src',
           'style_loader_src'
         );
       ```
   
 * If I add this to /products/photocrati_nextgen/modules/attach_to_post/module.attach_to_post.
   php:
 *     ```
       /**
       * Get the plugin url.
       *
       * @return  string  The plugin url.
       */
       public function plugin_url()
       {
       	return untrailingslashit( plugins_url( '/', __FILE__ ) );
       }
       ```
   
 * And change anything like
    `$router->get_static_url('photocrati-attach_to_post#
   ngg_attach_to_post_tinymce_plugin.js')` to `$this->plugin_url() . '/static/ngg_attach_to_post_tinymce_plugin.
   js'` this solves it. This feels a lot more like a standard WP way of doing it
   too.
 * Would you consider doing this? It will work for sites using the relative URLs
   and standard.
    -  This reply was modified 7 years, 3 months ago by [Laura](https://wordpress.org/support/users/lauraevoluted/).
 *  [gabyimagely](https://wordpress.org/support/users/gabyimagely/)
 * (@gabyimagely)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/failed-to-load-plugin-9/#post-11218973)
 * Hi [@lauraevoluted](https://wordpress.org/support/users/lauraevoluted/)
 * We’d like to take a closer look to that problem loading our plugin. We may need
   to temporarily deactivate plugins and switch the theme while troubleshooting.
   Would you feel OK with that? If so, please send us a bug report here: [http://www.imagely.com/report-bug](http://www.imagely.com/report-bug),
   refer back to this forum thread, and let them know Gaby referred you.
 * Thanks!
 * – Gaby, Customer Support.
 *  [gabyimagely](https://wordpress.org/support/users/gabyimagely/)
 * (@gabyimagely)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/failed-to-load-plugin-9/#post-11439560)
 * Because it has been a month or more since your last reply, I am going to mark
   this as resolved as I assume you have found a solution. Please feel free to reply
   again if you still have questions.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Failed to load plugin’ is closed to new replies.

 * ![](https://ps.w.org/nextgen-gallery/assets/icon-256x256.png?rev=2083961)
 * [Photo Gallery, Sliders, Proofing and Themes - NextGEN Gallery](https://wordpress.org/plugins/nextgen-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextgen-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextgen-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/nextgen-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextgen-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextgen-gallery/reviews/)

## Tags

 * [Failed](https://wordpress.org/support/topic-tag/failed/)
 * [load](https://wordpress.org/support/topic-tag/load/)
 * [script](https://wordpress.org/support/topic-tag/script/)
 * [url](https://wordpress.org/support/topic-tag/url/)

 * 6 replies
 * 3 participants
 * Last reply from: [gabyimagely](https://wordpress.org/support/users/gabyimagely/)
 * Last activity: [7 years, 1 month ago](https://wordpress.org/support/topic/failed-to-load-plugin-9/#post-11439560)
 * Status: resolved