Information on "No images" bug
-
WordPress: Fresh Install 3.6
Nextgen Gallery: v2.0
Browser: ChromeI have set up roles so that subscribers can create and manage their own galleries. I then set up a gallery template page to simply list all of the galleries that have been created by users.
(I did this so that it dynamically updates the gallery page whenever someone creates a gallery instead of having to manually add the gallery to an album)
The following is the code I used in case anyone is interested:
<?php $galleries = $wpdb->get_results( "SELECT gid, title, author FROM ".$wpdb->prefix."ngg_gallery ORDER BY gid ASC", ARRAY_A); /*Create a comma separated array of gids*/ foreach ($galleries as $gallery) { $gid_list[] = $gallery['gid']; } echo do_shortcode('[ngg_images source="albums" gallery_ids="'.implode(',',$gid_list).'" display_type="photocrati-nextgen_basic_compact_album"]'); ?>
I also set up a test page where I simply copied the shortcode from the site’s shortcode help page: Nextgen Gallery Shortcodes
I copied the shortcode example:
To retrieve galleries 3 & 5, custom sorted, in album view:
[ ngg_images source=”albums” gallery_ids=”3,5″ display_type=”photocrati-nextgen_basic_compact_album” ]directly in to the page editor in wordpress for the test page and modified the gallery id’s to ones that I have.
So I now have a Gallery page that dynamically pulls the galleries through php and a Test page where I’ve manually defined which galleries to pull. I’m also using the compact album display type for both.
When I open both pages, everything looks good. All of the galleries are displayed in a compact album view; however, when you try and click on them they reload the page and display “no images were found” multiple times.
I clicked around and went back and forth and mysteriously got the pictures to display so I started looking at everything and found that it’s in the url link that’s created. I noticed when it works, the links are different. There must be something in the scripts that you all are using that is goofing up the url created by the link.
Please feel free to take a look at my test site to see:
Test SiteIf you click on Gallery and hover over the water gallery the following link information appears:
otorikazuko.com/test-wordpress/index.php/nggallery/water?page_id=42
If you try clicking on it, the page will load and display “no images were found” twice.
If you click on the Gallery Link again to go back to the main page and hover over the Wind gallery you get the same results.
Now, instead of clicking on one of the links try typing in the following:
https://otorikazuko.com/test-wordpress/index.php/nggallery/water/water?page_id=42
You will now see that the water gallery displays correctly!
The difference between the link generated by your code and the one that you manually type in is that the manually typed in link adds the name of the gallery after nggallery followed by a / and the name of the gallery again. It’s easier to see side by side.
https://otorikazuko.com/test-wordpress/index.php/nggallery/water/water?page_id=42
https://otorikazuko.com/test-wordpress/index.php/nggallery/water?page_id=42I’m trying to get a new site up fairly quickly for a group and I would really love to use this gallery. I haven’t dug into any code yet but I might a little later. I’m not sure if this issue is just with me but if not hopefully this helps the dev team debug some. If anyone finds a fix for this please post it as it’s really the only issue I’ve had thus far and it’s a bit of a show stopper for me.
Thanks!
~E
- The topic ‘Information on "No images" bug’ is closed to new replies.