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
(@lauraevoluted)
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
Hi @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
(@lauraevoluted)
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.
Hi @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, refer back to this forum thread, and let them know Gaby referred you.
Thanks!
– Gaby, Customer Support.
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.