• Resolved ronnyrook

    (@ronnyrook)


    Hi there,

    I’ve enabled “Ajax pagination” for my gallery. But when I navigate to a new page in the front end of my website, it shows a blank page and the nng html div is deleted (using Google Chrome console). I also do not see any javascript errors in the Chrome console.

    Is this a familiar problem?
    Thanks for the help.

    https://wordpress.org/plugins/nextgen-gallery/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor photocrati

    (@photocrati)

    @ronnyrook – Can you provide a link to the page where you are seeing this?

    – Cais.

    Thread Starter ronnyrook

    (@ronnyrook)

    Hi Cais,

    On this page you can find the gallery on the right. Hopefully you can help, thanks.

    Plugin Contributor photocrati

    (@photocrati)

    @ronnyrook – I’m not certain what is generating the specific URL: http://mvokennisseminar.nl/?view=1 for your site but have you tried using a standard WordPress Permalink structure such as “Post name” or “Month and name”?

    Also, how are you inserting the display into the page?

    – Cais.

    Thread Starter ronnyrook

    (@ronnyrook)

    Hi,

    Because I’m currently developing the website you have to visit /?view=1. This set’s a cookie which makes it possible to visit the website with album. I’m using the standard WordPress permalink structure, so nothing special about that. If you view the website for the second time without the ?/view=1 the homepage is displayed.

    I’ve inserted the display by the shortcut in the visual editor. The code created is <img class="ngg_displayed_gallery mceItem" src="http://domain.nl/index.php/nextgen-attach_to_post/preview/id--205" alt="" />

    In my template I’ll use <?= apply_filters('the_content', $page->post_content) ?> after I’ll used get_pages.

    Plugin Contributor photocrati

    (@photocrati)

    @ronnyrook – You’re putting a lot of balls into the air with your “development” environment. Have you looked at how NextGEN Gallery works without all of these different site adjustments you are making?

    My first thought, based on your explanation is there is a routing/path/URL issue being created by using the /?view=1 for your development. The “index.php” in the path generally points to a Windows server, although this shouldn’t be an issue I would recommend not using “index.php” in the Permalinks structure in most cases.

    As to the template using an apply_filters call to the_content you could end up triggering a current WordPress core bug to do with recursive call to the_content filter (which will hopefully be resolved in WP 4.2).

    Thanks!

    – Cais.

    Thread Starter ronnyrook

    (@ronnyrook)

    @cais – Again, thanks for your reply. At the moment I’ve deleted the “development” environment and I’ll changed the permalink structure to /%postname%/ but the same problem still appears.

    Now when I hover the second page button it links to /hello-world/nggallery/page/2, and on click again a blank page shows up.

    What else can I use instead of the apply_filter for the_content?

    Plugin Contributor photocrati

    (@photocrati)

    @ronnyrook – Have you tried the Reset Option under Gallery > Other Options to see if that helps sort out the remaining path issues?

    As to a different approach to filtering the_content that would likely be something much more relevant to the theme versus anything else … the recursive issue is not something that just affects NextGEN Gallery it just happens to be part of an outstanding issue that will be finally resolved when WordPress pushes the fix to core.

    You could try the work-around we built into NextGEN Gallery of defining NGG_DISABLE_FILTER_THE_CONTENT as “true” but it could cause issues elsewhere … and should be checked after every update to see if it is still needed in your specific case(s).

    Thanks!

    – Cais.

    Thread Starter ronnyrook

    (@ronnyrook)

    I’ve did a reset on the options. Now the standard fancybox is enabled which causes the following errors:

    jquery.fancybox-1.3.4.pack.js:18 Uncaught TypeError: Cannot read property 'msie' of undefined
    nextgen_fancybox_init.js?ver=4.1:5 Uncaught TypeError: undefined is not a function

    With lightbox enabled the same problem as before appears..
    I seriously don’t know what to do anymore..

    Edit:
    I did fix the fancybox errors using jQuery migrate. But now fancybox also shows a blank page on Ajax pagination..

    With jQuery migrate added I’ll get the following warning on pagination:
    JQMIGRATE: $(html) HTML strings must start with '<' character

    Edit 2:
    I’ve fixed the problem.
    The gallery was linking to /hello-world/nggallery/page/2, but that page is empty and not even showing on the homepage. So why the gallery permalink was /hello-world/ I don’t know. But by deleting the standard post the problem was solved.

    Plugin Contributor photocrati

    (@photocrati)

    @ronnyrook – Thanks for the follow-up and multiple edits (*grin*).

    – Cais.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Ajax pagination shows blank page’ is closed to new replies.