Conflicts with Multipage plugin
-
Hi,
We use the Multipage plugin (former SGR Nextpage Titles) together with NextGen 2.1.0 and noticed that for galleries on sub-pages the navigation is not working. Have a look at this site:
Try to navigate through the gallery pages – it won’t work. The link above would match to http://www.planet3dnow.de/cms/index.php?p=14973&paget=alle-folien-lisa-su-grafik.
The Nextgen navigation links to http://www.planet3dnow.de/cms/14973-amd-investorentag-am4-40-ipc-fuer-zen/nggallery/page/2. The correct link would be http://www.planet3dnow.de/cms/14973-amd-investorentag-am4-40-ipc-fuer-zen/subpage-alle-folien-lisa-su-grafik/nggallery/page/2.
To me this seems like a bug in NextGen. It seems to ignore any URL parameters of other plugins.I’ll try to fix this by some custom Javascript that modifies the links after the site has loaded, but I need a proper solution for this issue – either in Nextgen or in Multipage.
Regards
TiKu
-
I’ve implemented some Javascript that fixes the links after the site has loaded. So the sample from above isn’t a sample anymore. But I hope my description is enough to understand the problem.
Regards
TiKu@tiku – Thanks for the update, it would seem you sorted out the conflict with the other plugin. If you would care to share your “fix” as a Gist, pastebin, CloudUp, etc. we would be happy to review it.
Thanks, again!
– Cais.
Well, it is a hack using JavaScript:
jQuery(document).ready(function() { var l = window.location.href.toLowerCase().indexOf('/subpage-'); if(l > -1) { var base = window.location.href.substr(0, window.location.href.toLowerCase().indexOf('/', l + 1)); fix_navigation_links(base, false); } }); function fix_navigation_links(base_url, wait_for_elements) { if(wait_for_elements && jQuery(".ngg-navigation > a[href*='/nggallery/page/']:not('.ngg-link-fixed')").length == 0) { setTimeout(function() { fix_navigation_links(base_url, true); }, 100); } else { jQuery(".ngg-navigation > a[href*='/nggallery/page/']:not('.ngg-link-fixed')").each(function() { var l = this.href.toLowerCase().indexOf('/nggallery/page/'); if(l >= 0) { this.href = base_url + this.href.substr(l); jQuery(this).addClass('ngg-link-fixed'); } }).click(function() { fix_navigation_links(base_url, true); }); } }@tiku – Thanks for sharing it all the same. I’ll make a note for our developers to review it.
– Cais.
Cais, I noticed you did set this issue to “resolved”. In my opinion it is not really resolved. My Javascript hack is just this: a HACK. I would prefer a proper solution.
Regards
TiKu@tiku – The “hack” as you refer to it does resolve the issue you are having … and could be the best go forward method for you to continue to use.
You are solving a specific conflict with a plugin that is not as widely used as ours. This in no way means anything more than our respective user bases may require attention in more pressing areas. It may even be prudent to suggest the Multipage author consider adding your code to their plugin.
– Cais.
Cais, the issue is not a classical incompatibility problem where you could argue that the other plugin is rarely used. NextGEN obviously ignores existing URL parameters. Don’t you agree that this is a bug in NextGEN?
I developed a hack to make my website usable again. But I did not solve the bug in NextGEN. My hack only reduces the priority of a real fix. I understand that other issues might be more important. That’s okay for me. But I don’t consider the problem as resolved.The Multipage plugin does nothing wrong, so no need to ask them to include a hack for working around a NextGEN bug.
Regards
TiKu@tiku – It was only a suggestion to share your findings with the other plugin author … WordPress is an ever growing ecosystem and the code bases used by all of its various plugins (and themes) are almost always in flux.
This topic has been flagged for our developers to review, I am just suggesting it would not hurt for the Multipage author(s) to review it as well.
– Cais.
The topic ‘Conflicts with Multipage plugin’ is closed to new replies.