• Resolved richardwcms

    (@richardwcms)


    Hi
    I’ve been using Photonic on this site for over 4 years without any trouble. However, I’ve just noticed that only one of the galleries (2014) linked from https://www.paddockwoodac.co.uk/gallery is showing any collections. All the pages use this shortcode [pgallery type=’flickr’ user_id=’1250xxxxx@xxx’ collection_id=’7215766217xxxxxxx’ ]with just a different collection ID – the collection ID is for the parent collection under which there are a number of sub collections. I don’t know when this started to happen, but I can’t find a solution.
    Any help is much appreciated.
    Regards
    Richard

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Sayontan Sinha

    (@sayontan)

    Can you enable debug logging (Photonic → Settings → Generic Options → Advanced → Turn on debug logging)? That will print some messages within comments that will help me troubleshoot.

    Also, please follow these steps and let me know what you are seeing:

    1. Go to Photonic → Settings → Flickr → Flickr Settings → Default User and put in your user id.
    2. Now open one of your posts in the editor (e.g. the post for 2018).
    3. Select the Photonic shortcode you have on that page. If you are using the Visual Editor or Gutenberg then a dialog will automatically open up, and if you are using the Text Editor you can click on the button that says “Add / Edit Photonic Gallery”
    4. Your settings should be pre-selected on each screen. Click through the screens till you get to the one that lists your collections. Do you see your collection listed? Is it pre-selected?

    If your collection is not listed or pre-selected, it is likely that you have an invalid collection id.

    Thread Starter richardwcms

    (@richardwcms)

    Hi

    Thanks for your reply. I’ve run through the steps you’ve suggested (I had previously added the default user), all my collections were listed (as they have always been). Unfortunately, even with the updated shortcode nothing is shown.

    This has been working perfectly for over 4 years without any problem.
    Regards
    Richard

    Plugin Author Sayontan Sinha

    (@sayontan)

    Did you turn on the debug logging? I am not seeing the messages.

    Thread Starter richardwcms

    (@richardwcms)

    I have now – can you see them?

    Plugin Author Sayontan Sinha

    (@sayontan)

    Hmm… not seeing anything, so let’s try something else. Can you provide me the exact shortcode you are using on 2018? When you are responding to this thread make sure you encase it in the “code” tags by clicking the buttons above.

    Thread Starter richardwcms

    (@richardwcms)

    This is the generated shortcode
    [pgallery type='flickr' view='collections' collection_id='124939132-72157662171328537' user_id='125031945@N08' collections_display='lazy' columns='auto' popup='hide' layout='square']

    my original one that’s been working since the beginning of this year
    [pgallery type='flickr' user_id='125031945@N08' collection_id='72157662171328537' ]

    and the one from the 2014 page which is working
    [pgallery type='flickr' user_id='125031945@N08' collection_id='72157645011383904' ]

    Richard

    Plugin Author Sayontan Sinha

    (@sayontan)

    From what I can discern the issue occurs when you have collections within collections, and no sets directly under the top level collection. Now, you might point out that your 2014 collection has no sets directly under it, so why is that showing up? From what I can see by calling each of your shortcodes individually is that for 2014, the API returns an empty node of “sets”, but for 2018 it doesn’t. And that causes all the difference.

    It looks like this bug has been there for a while. It is also likely that Flickr used to provide an empty node of sets at one point of time but stop doing so, and that is when the bug manifested itself.

    I will fix it for the next cycle (should happen later this week). If you want a patch for now, you will have to edit some code:

    1. Go to wp-content/plugins/photonic/extensions/Photonic_Flickr_Processor.php, line 453. You will see this:
      $processed[] = $inner_collection->id;
    2. Comment out the line (by prefixing it with //, or delete it.
    3. Add these two lines in its place:
      $inner_ret = $this->get_nested_collections($inner_collection, $processed);
      $ret = array_merge($ret, $inner_ret);

    Once you save you should be good to go.

    Thread Starter richardwcms

    (@richardwcms)

    That’s worked perfectly. I’ll look forward to the next release and I’ll let you know if I have any other issues.

    Thanks for your help.
    Richard

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Flickr collection issue’ is closed to new replies.