schenk / responsive-flickr-gallery

Responsive galleries from your Flickr photos for your WordPress site.
http://wordpress.org/plugins/responsive-flickr-gallery/
GNU General Public License v3.0
1 stars 3 forks source link

Error when using photo galleries #6

Closed sgtravelinfo closed 10 years ago

sgtravelinfo commented 10 years ago

I am getting following error while using photo gallery option with [RFG_gallery id='1'] option. I have already added gallery and link with Flickr.

Warning: Illegal string offset '_content' in /home/habibdxb/public_html/melakatravel.info/wp-content/plugins/responsive-flickr-gallery/index.php on line 188

The default photostream is appearing fine with no error. I am using WP 3.8 (latest) and at the moment I am also not using WP Cache Plugin.

Please check and this is an awesome plugin to pull images from Flickr :)

larsschenk commented 10 years ago

Thx for the feedback and bug report.

Can you please let me know the php version that you are using?

I can't reproduce the bug yet. Can you please also check if there are photos in the gallery that you are using.

The error that you report is in this line: $total_photos = $rsp_obj['gallery']['count_photos']['_content'];

I assume the gallery that you refer does not have photos in it. Or at least no public visible photos. That might result in trouble here even though that shouldn't happen...

Thx in adv. for you feedback.

larsschenk commented 10 years ago

Ok I can reproduce the bug now. With an empty set you'll get "Responsive Flickr Gallery Error - Photoset not found" as expected. But using a gallery (instead of a set) give the bug that you have reported. Error is acknowledged and will be fixed soon.

larsschenk commented 10 years ago

Fixed with the next update!

If you were in a hurry you can simple change the line above to

$total_photos = $rsp_obj['gallery']['count_photos'];
sgtravelinfo commented 10 years ago

Thanks :) It works perfect now.

So I basically created photo gallery based on Flickr member photos who had given me permission and none of the photo in that photo gallery is part of my photostream (my own upload). So probably this is what triggered the error?

larsschenk commented 10 years ago

Great! It wasn't a problem on your side. The result from the flickr API has changed and the code needed to be adjusted.

sgtravelinfo commented 10 years ago

Thanks for the update and the plugin is awesome.

Have a good new year :)