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

    (@norbusan)

    Interesting. Especially the case that within the actual post only one or two images are shown.

    Can you check the server logs for some error messages? This is purely a PHP thingy, since the shortcodes are expanded on the server.

    Can you also check the generated *source* code (html). There are normally some code surrounding the images.

    Please send me a link to a blog entry where there should be at least 3 or more photos, and where at the moment only 1/2 are shown.

    Thanks

    Thread Starter L-B

    (@l-b)

    Hello Norbert,

    Thanks for your reply!

    You can visit my blog https://laneb.re and especially the last post : https://laneb.re/site/le-soleil-se-leve-leruption-se-termine/.
    Only 2 pictures are shown.

    I activate display_errors=on but nothing appears on the screen (not sure I do this correctly)

    Firefox’s inspector shows nothing for the missing pictures :
    <div id=”Photo-2388-la” class=”PiwigoPress_photoblog”>
    <!– PiwigoPress Started –>
    </div>

    Not sure it helps you more….?
    Best regards,
    L B

    Plugin Author Norbert

    (@norbusan)

    Can you please send me the text of the used shortcodes. There seems to be a problem in the generation. The source code cotains several

    <div id="Photo-2395-la" class="PiwigoPress_photoblog"><!-- PiwigoPress Started --></div><!-- PiwigoPress Ended -->

    Can you please get the following piwigopress.php from https://raw.githubusercontent.com/norbusan/piwigopress/master/piwigopress.php and (after making a backup) replace yours with that one. It should print some debugs.

    The problem is that $response = pwg_get_contents( $url . 'ws.php?method=pwg.images.getInfo&format=php&image_id=' . $id); does return some kind of error.

    Thanks

    Thread Starter L-B

    (@l-b)

    Shostcodes I always put manually is for example:
    [PiwigoPress id=2395 url=’https://laneb.re/photos/&#8217; size=’th’ class=”img-drop-cap img-shadow” lnktype=’none’] for thumbnail
    and
    [PiwigoPress id=2390 url=’https://laneb.re/photos/&#8217; class=”img-shadow” lnktype=’none’] for following pictures.

    I changed piwigopress.php with the github’s one but it doesn’t print any information…

    Thanks for your help!

    Plugin Author Norbert

    (@norbusan)

    Ok, I can reproduce this here with

    [PiwigoPress id=2398 url='https://laneb.re/photos/' class="img-shadow" lnktype='none']

    I get a warning: Notice: unserialize(): Error at offset 0 of 409 bytes in /home/norbert/Debian/Piwigo/piwigopress.git/piwigopress.php on line 122

    I will investigate, but I am currently on a business trip with intermittent internet connection. I will try to find out the reason.

    Thanks

    Plugin Author Norbert

    (@norbusan)

    Ok, found the reason. THere seems to be a rate limiting going on on your site.

    When debugging the response I see:

    <html>
    <head><title>503 Saturation Requetes</title></head>
    <body bgcolor="white">
    <center><h1>Saturation Temporaire</h1></center>
    <center>Si vous etes le webmaster du site concerne, merci de contacter le support technique de votre hebergeur.</center>
    <center>Il semble qu'un probleme technique individuel au contenu que vous hebergez existe.</center>
    <hr><center>Serveur Web</center>
    </body>
    </html>

    So this is a problem with your web server rate-limiting the access I guess. Can you disable this? At least when it comes from your site?

    Norbert

    Thread Starter L-B

    (@l-b)

    Hi Norbert,

    I think it is because of my htaccess. It limits websites that can display pictures. In use since the first day of my blog.

    If you want test with my piwigo gallerie, I should add an access for your website. You can post it there or contact me on https://laneb.re/site/auteur/

    Many thanks for your help!
    L B

    Plugin Author Norbert

    (@norbusan)

    Hmm, I think just allowing me to access your site will not fix anything. Every client watching your blog site will be hit by the rate limit.

    Are you limiting the access to all pages, or only to some?s

    Can you *again* download the piwigopress.php from the github site and replace it on your server. I have now added DEBUG statements (printed in the *SOURCE* only via <!-- DEBUG ... ->) that should help.

    Thank

    Thread Starter L-B

    (@l-b)

    I just uploaded your last piwigopress.php.

    My htacces settings are just to avoid hotlinking, ie displaying my pictures (except the lowest res. file) in other websites but it has no effect on my own website, as it has always display my pictures comming from my Piwigo gallerie.
    So it should not be a problem with PiwigoPress?

    Plugin Author Norbert

    (@norbusan)

    Bummer, that was rubbish and broke the site. Please get a new version from github, or remove one of the two dots in the “..”, that should have been only “.” (two times) (mixing lua with php, bad).

    Sorry, thanks.

    Norbert

    Thread Starter L-B

    (@l-b)

    I put your last piwigopress.php. Sounds better! ??

    But it still shows only 1 or 2 pictures… ??

    I appreciate your help. Good luck!
    L B

    Plugin Author Norbert

    (@norbusan)

    The problem is again the rate limiting. But since the HTML code is generated on your server, the rate limiting is surprising.

    It is definitely not a problem in piwigopress.

    I can only see two possible sources of the problem:

    * You are blocking/rate limiting access from *your*own* server. In this case you need to fix the blocking.

    * The other idea I have is a caching system (keeping pre-generated hmtl pages to speed up delivery). In this case, if the caching was done of a bad html page, no new one will be generated.

    Did you start using some caching system recently?

    Can you verify that the server that generates the HTML code (i.e., running the wordpress installation), has *unlimited* access to the photo site?

    Norbert

    Thread Starter L-B

    (@l-b)

    Hi Norbert,

    Sorry I missed your last reply.

    Thanks for your advises but I have no cache and the only limit I know is the htaccess to prevent hotlonking from other websites.
    Both WP and Piwigo are on the same server. And the website has shown PiwigoPress until a few days or weeks.
    Could it depend on a WordPress minor upgrade? (the problem appears when WP was still 3.4.x)

    To achieve some tests, on a sub WP site, I changed the post https://laneb.re/site/test/la-jolivave-une-jolie-liane/ to have both :
    – PiwigoPress’s pictures : can’t show more than one or two.
    – 2 other way to have external pictures :
    – – by the WP Media Gallery
    – – or with HTML code. Theses two ways show correctly pictures.

    So I don’t find where can be the problem… ??

    Plugin Author Norbert

    (@norbusan)

    Hi,

    I am really surprised about all that. I have added new debug code to PiwigoPress_get.php and I see the following DEBUG output in the source code:

    <!-- DEBUG pwg_get_contents: calling wp_remote_get fullurl = https://laneb.re/photos/ws.php?method=pwg.images.getInfo&format=php&image_id=2395 -->
    <!-- DEBUG long output of json from your server -->
    <!-- DEBUG pwg_get_contents: calling wp_remote_get fullurl = https://laneb.re/photos/ws.php?method=pwg.images.getInfo&format=php&image_id=2390 -->
    <!-- DEBUG again long output of json from your server -->
    <!-- DEBUG pwg_get_contents: calling wp_remote_get fullurl = https://laneb.re/photos/ws.php?method=pwg.images.getInfo&format=php&image_id=2398 -->
    <!-- DEBUG <html>
    <head><title>503 Saturation Requetes</title></head>
    <body bgcolor="white"> ...

    That means that the first and second request worked, but not the third.

    I am using nothing else but WordPress’ builtin wp_remote_get($fullurl); so I would be surprised that something is wrong here.

    I cannot do anything more than that, something on your server side is blocking the requests.

    Thread Starter L-B

    (@l-b)

    Hi,

    I ask my website provider. They suggest it can be a security issue with wp_remote_get.

    They suggest about a possible curl use without userAgent or empty userAgent or with “-“.

    Is it possible ?

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Display only one picture per post’ is closed to new replies.