• Resolved Alyaron

    (@alyaron)


    Hello and thanks for this great plugin!

    I’m trying to display some specific Google Photos albums on a page. Our account has 50+ different albums. There are 3 different cases:

    1) Normal case: I choose 5 recent albums, the 5 display correctly. All good.

    2) I choose 1 recent album and 4 old albums (buried way down in the list), I get 1-2 to display immediately, and the others require to click on “Load more”. Not perfect but expected as per your documentation:

    “Google sometimes returns less than the value specified in count, but even in such cases the “Load More” button will continue showing up till appropriate.”

    3) I choose 5 old albums. NONE shows, and there’s no “Load more” button (although I always have the option more=”Load more”). It’s probably due to the fact that the API call returns nothing, maybe the plugin imagines that these albums don’t exist.

    What could I do to display 5 old albums that are probably not returned in the first API call the script makes?
    Thanks very much!

    Alyaron

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

    (@sayontan)

    Your assessment here is correct on all fronts. There is no way to achieve what you are looking to do, i.e. group album thumbnails that are a mix of those showing in the first page vs those that are considerably older.

    There are two underlying reasons for this:

    1. There is a hard constraint that I have in place to prevent API calls unless triggered by explicit user action. The situation you have outlined in point 3 would require additional API calls, which, unfortunately cannot be triggered by a “More” button. Basically the plugin first searches, then filters (Google doesn’t offer a way to do a filtered search). As it would happen, Google’s limit of 50 albums per result is rather lame (SmugMug’s is 200 and Flickr and Zenfolio have no limit), and it means additional API calls have to be made to fetch more albums – something that Photonic doesn’t do automatically. So when the first page returns no matches, Photonic assumes there is nothing more to find.
    2. As far as requirements go, surprisingly this is pretty rare; you are the first person to request this in over 10 months that Photonic has offered Google Photos support.

    I can consider this feature request as it is a basic usability challenge. There is a catch though. Consider this corner-case scenario: you might have 500 albums and 5 specified in the filter, with the first of them might visible on page 1, but the others not actually existing. In that case the plugin would have made 9 additional calls without finding a match.

    That being said, you should be able to display photos from an album directly, regardless of how old the album is; just fetching the album thumbnail as a part of a group of albums doesn’t work.

    Plugin Author Sayontan

    (@sayontan)

    The latest release (2.24) fixes this.

    Wow, great, thanks again Sayontan!

    Plugin Author Sayontan

    (@sayontan)

    Hi,
    I had to make a tweak to this behaviour in 2.25 (released earlier today) because the change made was causing quite a few sites to run into API quota issues.

    You will now need to explicitly enable this behaviour via Photonic → Settings → Google Photos → Google Photos settings → Chain queries, and things will work as you expect.

    benoit42

    (@benoit42)

    I Sayontan,

    I also encountered this problem, and I checked the “Chain queries” option.

    As a result, I got immediately an error from Google Photos API saying that my quota has been exceeded (10000 per days). The related API is google.photos.library.v1.PhotosLibrary.ListAlbums.
    My Google Photos account has 264 albums.

    Have you an idea why I exceeded the quota so fast ?

    Thanks for your time.

    Regards,
    Benoît.

    Plugin Author Sayontan

    (@sayontan)

    The exceeding of the quota happens two ways: either by going over 10000 a day, or by exceeding a certain number of calls per second (Google doesn’t document this).

    benoit42

    (@benoit42)

    Sayontan,
    On the web site, I got an error related tho the number of requests pet minute.
    On the Google API console, I see that the number of requests for google.photos.library.v1.PhotosLibrary.ListAlbums is 32 54.

    benoit42

    (@benoit42)

    Sorry, 32 542 requets, in the last hour, after I checked “Chain queries”.

    Plugin Author Sayontan

    (@sayontan)

    Yes, that is what happens when you chain queries: multiple calls are executed in a few seconds. And if multiple people or search engines are accessing the site, this multiplies.

    benoit42

    (@benoit42)

    I’m surprised with such a number of requests. I’ve only a few visitors each week.

    Plugin Author Sayontan

    (@sayontan)

    I really cannot comment without knowing how you have set up your galleries. If you are using multiple instances of the filter attribute (i.e. you are explicitly listing multiple albums) each instance will trigger multiple simultaneous calls. That will eat up your quota.

    benoit42

    (@benoit42)

    Sayontan,

    Yes, I wanted to list my album by year. I wrote a page with 3 instances of photonic plugin for 2019, 2018 and 2017, explicitly selecting albums for each year.
    Then I faced the initial problem of this thread.
    I splited in 3 pages, having the same problem.
    After reading this thread, I checked the chain queries option, testing on one page.
    And I got this quota problem.

    I will try again tomorrow when my quota will come back.

    Thanks for your time 🙂

    benoit42

    (@benoit42)

    Hi Sayontan,

    I tried again to display a gallery of my google photo albums. Here is the configuration of the plugin :
    – display multiple albums
    – display selected albums (approx 10-15)
    – Chain request option checked

    There is only one instance of photonics plugin in my page.

    Then I launched the page preview. It ran for about 5mins, I stopped it. On my Google console, I see that more than 26000 requests have been sent to google.photos.library.v1.PhotosLibrary.ListAlbums API, since 5 minutes 🙁
    This is not heavy traffic on my site, I’m the only one that can see that page.

    I don’t see what is going wrong… If you have some time to help me, I’d be very glad.

    Regards,
    Benoît.

    • This reply was modified 5 months ago by benoit42.
    • This reply was modified 5 months ago by benoit42.
    Plugin Author Sayontan

    (@sayontan)

    benoit42,
    Since this is a closed thread from another user, can you start a new support topic, please?

    benoit42

    (@benoit42)

Viewing 15 replies - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.