WordPress.org

Ready to get started?Download WordPress

Forums

GWPG3
WPG3 not displaying photos (10 posts)

  1. alternateroute
    Member
    Posted 3 years ago #

    I have loaded the plugin and inserted the code on the HTML of a post but it didn't work.
    It shows nine placeholders (the number of albums in the top level of my gallery) but it doesn't display the photos of the albums or drill down to the next level when the placeholder is clicked.
    I thought that the tag <WPG3<item/1</WPG2> looked a bit funny so then I changed it to <WPG3>item/1</WPG2> then <WPG3>item/1</WPG3> and then tried substituting item/1 for the gallery name, all to no avail.
    The Rest module is activated and allow guests set to 1.
    Any further hints?

  2. digitaldonkey
    Member
    Plugin Author

    Posted 3 years ago #

    <WPG3>item/1</WPG3> is the right Version. Sorry I'm still fighting with the readme standard ;)

    Do you have an example online?
    What are the links at the Albums?

  3. alternateroute
    Member
    Posted 3 years ago #

    I have a test post on alternateroute.com.au
    I'm not sure what you mean by "What are the links at the albums?"

  4. digitaldonkey
    Member
    Plugin Author

    Posted 3 years ago #

    With links on Images i meant actually two things: The image urls and the Links around the images
    <img src=??? .../>
    But on your page is obviously nothing.

    The Rest seems to Work as you can see http://alternateroute.com.au/gallery3/index.php/rest/item/1?output=html

    I could reproduce your error in my Testsite. Getting the Members at wpg3_class_WPG3_Xhttp.php line 163 don't work. This request returns just '[]' but it should retun the members as described in http://codex.gallery2.org/Gallery3:API:REST#Items


    http://alternateroute.com.au/gallery3/index.php/rest/items?urls=["http://alternateroute.com.au/gallery3/index.php/rest/item/2","http://alternateroute.com.au/gallery3/index.php/rest/item/3","http://alternateroute.com.au/gallery3/index.php/rest/item/4","http://alternateroute.com.au/gallery3/index.php/rest/item/5","http://alternateroute.com.au/gallery3/index.php/rest/item/6","http://alternateroute.com.au/gallery3/index.php/rest/item/7","http://alternateroute.com.au/gallery3/index.php/rest/item/8","http://alternateroute.com.au/gallery3/index.php/rest/item/9","http://alternateroute.com.au/gallery3/index.php/rest/item/11"]

    Which Version of Gallery3 are you using?

  5. digitaldonkey
    Member
    Plugin Author

    Posted 3 years ago #

    For some strange reason it works with one item less in the urls-array.
    Try removing one item of your g3 main album.

    Maybe we discovered a strange REST Error?

    To see the Url uncomment

    echo "<br />getMultipleObjects URI : ".$uri."<br />";

    in WPG3_Xhttp.php

  6. alternateroute
    Member
    Posted 3 years ago #

    I deleted one album and it worked. What a strange error.

  7. alternateroute
    Member
    Posted 3 years ago #

    I am using the latest released version of Gallery 3. I am not able to check the exact version as my server has just gone down. Strangely it went down just as I finished editing the WPG3_Xhttp file.
    Two days ago the server went down after looking at one of those files. At the moment I am putting it down to coincidence.

  8. alternateroute
    Member
    Posted 3 years ago #

    I am using Gallery3.0 (Santa Fe)
    When I say "It worked" up above I meant that the albums appeared in the post. When I drilled down into the sub albums they also appeared as there were not many of them. As soon as I hit an album that had nine items or more, it would only display the placeholders and not the photos.
    Deleting a single album at the top level was OK since it was one I didn't look at much. However to get access to all my photos would mean only having eight pictures per album and no more than eight sub-albums in an album. No very practical.
    I am not a coder but I will have a quick look to see if anything really stands out.
    It is almost like there is a variable that only takes a single digit and but somehow maxes out when you hit nine.

  9. digitaldonkey
    Member
    Plugin Author

    Posted 3 years ago #

    Can you test your REST Api against this:

    http://alternateroute.com.au/gallery3/index.php/rest/items?urls="http://alternateroute.com.au/gallery3/index.php/rest/item/2","http://alternateroute.com.au/gallery3/index.php/rest/item/3","http://alternateroute.com.au/gallery3/index.php/rest/item/4","http://alternateroute.com.au/gallery3/index.php/rest/item/5","http://alternateroute.com.au/gallery3/index.php/rest/item/6","http://alternateroute.com.au/gallery3/index.php/rest/item/7","http://alternateroute.com.au/gallery3/index.php/rest/item/8","http://alternateroute.com.au/gallery3/index.php/rest/item/9","http://alternateroute.com.au/gallery3/index.php/rest/item/11"]

    if you add '&output=html' or use chrome browser you should see all the requested urls in simillar to print_r or var_dump in php.
    This should work with any number of urls as far as I understood the Rest-Specs.

    I resume:
    -if one url is wrong an empty array will e returned.

    So maybe we have a cache problem. There is no clear yet.
    But remove the two slashes the line 117:

    //$xhttp->clear_cache();

    to disable caching.

  10. alternateroute
    Member
    Posted 3 years ago #

    Ich verstehe nicht!
    I'm not sure what you mean by testing the REST API. I cut and pasted that string into my browser (I used Chrome) and it showed only a blank page with the words 'Empty Response' in the top left corner.
    I un-remarked line 117 but it made no difference.

    Is this problem unique to me? No-one else seems to have a problem with the plugin, or perhaps I am one of the pioneers on the bleeding edge blazing the way for those who will follow :-)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags