WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Bakery Shop => Topic started by: mgeene on February 08, 2016, 09:51:36 AM

Title: Bakery Slider does not load all images
Post by: mgeene on February 08, 2016, 09:51:36 AM
I installed the Baker Slider but it does not load all the thumbs pictures in, sometimes you see 4 loaded thumbs and then 3 he can not find, etc.
Does anyone know what the problem is? I gecheckd all the images and they are good. I use Bakery 1.76.

Thanks for your respons.
Title: Re: Bakery Slider does not load all images
Post by: Gast on February 08, 2016, 01:34:40 PM
give me some more informations

Quote
sometimes you see 4 loaded thumbs and then 3 he can not find, etc

everytime or realy sometimes?
do you check the picture-links from the "not-found"-Pictures?
is it possible, to post a link to a working page?

normalize, the script reads the database table bakery_images and use from every active item the first picture (your main picture).
all readed pics goes into a list
the "picture-not-found-problem" is only possible, if the picture name in the database is not exact the same name in your picture folder.
i'm sure, that you see a problem like this in your bakery pages and you say, the picture is okay, - its easy to check: a not founding picture in the slider is also a not founding picture on bakery overview or item detail page

please check the picture names for the conflict pic's.
- dont use special chars like äöü or other special chars from other countrys like é, ê or å
- dont use white spaces in the picture name like "chrismas 2016.jpg"

if you look into the source code from the page with the slider, you see there a html-list, starting with
<div id="jCarouselLite">..<div class="slider">..

in this list are all pictures from the slider. in the firefox-addon firebug you can check all the pictures very easy. only going with the mouse over a picture link
(https://i.gyazo.com/5df665732a2293a65a28443c366b9f8c.png)
Title: Re: Bakery Slider does not load all images
Post by: mgeene on February 08, 2016, 04:26:44 PM
Thanks for your reply Jacobi22.

Ik think the problem is that the site owner uese jpg and png files. Is it possible that that the slider works with both fils?
Title: Re: Bakery Slider does not load all images
Post by: Gast on February 08, 2016, 04:39:46 PM
Quote
Ik think the problem is that the site owner uese jpg and png files. Is it possible that that the slider works with both fils?

there is no file-type-limit in the PHP-Code of this snippet, but maybe in the jquery-plugin
i'll test it

if its possible, send me here or via PM a link to the page
Title: Re: Bakery Slider does not load all images
Post by: Gast on February 08, 2016, 06:20:09 PM
i found the problem, but no solution...   :roll:

all pictures with problems has a png-picture-link to the folders media / bakery / your-item / thumbs, but there are jpg-files in the thumbs-folder, not png's

example:
full image: http://xxxxxxxxx/media/bakery/images/item497/751-065.png

thumb: http://xxxxxxxxx/media/bakery/thumbs/item497/751-065.png (picture not exist)
real path: http://xxxxxxxxx/media/bakery/thumbs/item497/751-065.jpg

the slider-script reads only the picture name for the full image and use it in the thumb-path, normalize its the same pic with the same file-type

i remember, that in older bakery-versions png's are renamed to jpg, and i remember also, that we discous about this, because, some users needs the transparence of the png-files

in my bakery-version 1.76 everythings works - is it possible, that you upgrade a older version of bakery, which use the old variant with the jpg-thumbs only?


from my point, i see only one chance - upload the main images again, if its a png-file..  :roll:
so that you have the same file-type for image and thumb.
Title: Re: Bakery Slider does not load all images
Post by: mgeene on February 08, 2016, 07:55:32 PM
Hi Jacobi22,

Thanks foor your reply.
I was afraid of that. I did an upgrade from 1.6 to 1.76 and this will probably cause the problem. I'm going to work on refreshing the images.
Title: Re: Bakery Slider does not load all images
Post by: Gast on February 09, 2016, 12:26:10 PM
not really a problem, but a "hard work" if you have a lot of items in the shop (not sure, but i think, you have more than 600 items?)

from my point:
- download the complete picture folder for bakery (standard: media / bakery)
- open at first the image folder of one item and check, if its png or jpg
- if its jpg, go to the next item
- if its png, open the thumb-folder for this item
to open the pics and changing the file type, i use the free viewer irfanview (http://www.irfanview.com/), a very good and small prog for this job
- open the thumb und save it without changes as a png-file in the same folder (its recommened, to check all pic's for this item, not only the main pic)
- do the same for every item
- if you finish, upload the complete bakery-image folder to your server

another method is a direct upload from every fixed pic, but i think, it goes very slow and makes you crazy  :wink:

i add a little script here, unzip this file to your bakery module folder and call it in your browser.
the script read all main pictures from your active items (like the slider) and show all thumbs on a page like a picture gallery
if you go with the mouse over a broken image, you see the ITEM-ID and the used picture name and you can go with a click on this image to this item page.
this script will help you to found the "problem pics"
but dont forget:  this script and also the slider shows only the actual main image for this item. if you change the main image in the picture list of the item (move up or down) , the new image can also be a jpg

dont use a batch-converter to change the file type (in one step). of course, it goes very fast, but it makes only trouble
you have actually a mix of jpg's and png's and maybe the converter change all pic's to png and then, you have to upload all!!! pics to all items again.

my maximum for a job like this was ~1000 pics at one day, but after this, i was down for the next day's  :-D :-D

TIP: if you make a download from media/bakery, build a backup-zip from this folders before you start with the work
to have it is better than need it

Title: Re: Bakery Slider does not load all images
Post by: Gast on February 09, 2016, 12:37:49 PM
P.S.: if you remove the LIMIT 1 in line 19 of the script in the last post, it will show all pic's from active items - not only the main picture of an item