Experiencing a 401 Unauthorized Error During Update?
If you're seeing a 401 Unauthorized error when trying to update your Joomla extension, it's likely due to our new two-factor authentication (2FA) security measure for your Download ID.
To resolve this, check your email (Spam folder?) for a message to approve your server or device, or read our detailed blog post here(
onlinecommunityhub.nl/best-practice/new-...-extension-downloads) to understand the steps involved. This will guide you through approving your server for future updates.
Implemented Rare Cases of Generated Images with Zero Bytes length
- Markus Bruhn
- Onderwerp Auteur
- Offline
Minder
Meer
- Berichten: 6
- Ontvangen bedankjes 0
2 jaren 4 maanden geleden - 2 jaren 4 maanden geleden #2052
door Markus Bruhn
Rare Cases of Generated Images with Zero Bytes length werd gestart door Markus Bruhn
Hi Ruud,
I use your pugin with Joomla 3.10 and my Website has a lot of Traffic and a huge amount of images in total (>10.000).
When I enabled the Plugin for the first time (including webp conversion), some pages ran in timeouts and returned only a blank site. After limiting the cache Images creation to only one picture per request I did not experinced furthor timeouts.
But I found some pages where the image is missing. The img Tag is set including the srcset looks fine. One image link (for the largest one) in the srcset is defect, the image is found but it is an empty ressource. In the imagecache folder, I found some images with an filesize of zero. After deleting these images, they where regenerated and show correctly in the page.
From time to time I found new images with an filesize of zero in the image cache folder. I am worry that some users might see these images as blank image too.
My guess is that in case of timeouts or other temporary exceptions there is a chance that the cached image is generated with zero bytes file size. It would be great, when those corrupt images are not delivered to clients over and over. I have two ideas to do so:
1) check not only the exist of the file but also if the filesize is greather zero
2) generate the image with temporary filename (eg. with postfix) and rename the file to the final file. The file would only be renamed if no exception occours.
Regards
Markus
DOWNLOADLINK to test version
I use your pugin with Joomla 3.10 and my Website has a lot of Traffic and a huge amount of images in total (>10.000).
When I enabled the Plugin for the first time (including webp conversion), some pages ran in timeouts and returned only a blank site. After limiting the cache Images creation to only one picture per request I did not experinced furthor timeouts.
But I found some pages where the image is missing. The img Tag is set including the srcset looks fine. One image link (for the largest one) in the srcset is defect, the image is found but it is an empty ressource. In the imagecache folder, I found some images with an filesize of zero. After deleting these images, they where regenerated and show correctly in the page.
From time to time I found new images with an filesize of zero in the image cache folder. I am worry that some users might see these images as blank image too.
My guess is that in case of timeouts or other temporary exceptions there is a chance that the cached image is generated with zero bytes file size. It would be great, when those corrupt images are not delivered to clients over and over. I have two ideas to do so:
1) check not only the exist of the file but also if the filesize is greather zero
2) generate the image with temporary filename (eg. with postfix) and rename the file to the final file. The file would only be renamed if no exception occours.
Regards
Markus
DOWNLOADLINK to test version
Dit bericht bevat vertrouwelijke informatie
Laatst bewerkt 2 jaren 4 maanden geleden door Ruud van Lent. Reden: added link to test version
Onderwerp is gesloten.
- Ruud van Lent
- Offline
Minder
Meer
- Berichten: 1640
- Ontvangen bedankjes 107
2 jaren 4 maanden geleden #2053
door Ruud van Lent
Beantwoord door Ruud van Lent in topic Rare Cases of Generated Images with Zero Bytes length
Hi Markus, currently on holidays so short reply
Both your suggestions make sense! I will look into this and see what is best without generating extra overhead for each visitor
Both your suggestions make sense! I will look into this and see what is best without generating extra overhead for each visitor
Onderwerp is gesloten.
- Ruud van Lent
- Offline
Minder
Meer
- Berichten: 1640
- Ontvangen bedankjes 107
2 jaren 4 maanden geleden #2059
door Ruud van Lent
Beantwoord door Ruud van Lent in topic Rare Cases of Generated Images with Zero Bytes length
Hi Markus,
I have implemented the filesize check.
So now when one or more of the images in a fileset have filesize 0, they will be regerated on next visit of the page. When 0, the srcset will not be implemented, it wil then use the element unaltered (and thus always showing the image).
Test version (I have this version currently on this site), is available in the first post (yours) of this topic.
Let me know if this works for you.
thanks for your patience
regards,
Ruud.
I have implemented the filesize check.
So now when one or more of the images in a fileset have filesize 0, they will be regerated on next visit of the page. When 0, the srcset will not be implemented, it wil then use the element unaltered (and thus always showing the image).
Test version (I have this version currently on this site), is available in the first post (yours) of this topic.
Let me know if this works for you.
thanks for your patience
regards,
Ruud.
Onderwerp is gesloten.
- Markus Bruhn
- Onderwerp Auteur
- Offline
Minder
Meer
- Berichten: 6
- Ontvangen bedankjes 0
2 jaren 4 maanden geleden #2060
door Markus Bruhn
Beantwoord door Markus Bruhn in topic Rare Cases of Generated Images with Zero Bytes length
Hi Ruud,
I had test your new version and it looks fine. I had created a second cache folder and intentionally use a slightly to hight image creation limit so the side has experinced sometimes a timeout. In the cachefolder a few images has a zero lenght but after a while they become a new size, so these . I also did not see any missing images on the site. Correct resized images won't be resized over and over.
Thanks for your fix!
Markus
I had test your new version and it looks fine. I had created a second cache folder and intentionally use a slightly to hight image creation limit so the side has experinced sometimes a timeout. In the cachefolder a few images has a zero lenght but after a while they become a new size, so these . I also did not see any missing images on the site. Correct resized images won't be resized over and over.
Thanks for your fix!
Markus
Onderwerp is gesloten.
- Ruud van Lent
- Offline
Minder
Meer
- Berichten: 1640
- Ontvangen bedankjes 107
2 jaren 3 maanden geleden #2065
door Ruud van Lent
Beantwoord door Ruud van Lent in topic Rare Cases of Generated Images with Zero Bytes length
Hi Markus,
thanks for testing. Change will be in in next release.
regards,
Ruud.
thanks for testing. Change will be in in next release.
regards,
Ruud.
Onderwerp is gesloten.
- Ruud van Lent
- Offline
Minder
Meer
- Berichten: 1640
- Ontvangen bedankjes 107
2 jaren 3 maanden geleden #2071
door Ruud van Lent
Beantwoord door Ruud van Lent in topic Rare Cases of Generated Images with Zero Bytes length
Just released version 1.16.0 with this change implemented
Onderwerp is gesloten.