Dear Parallels Support,
We have updated the Site Builder to 4.5 Hotfix 7 (i.e. the latest one).
However for the following item (fixed in hotfix 7) -
--
We found that inside Image Gallery, the Next/Previous Image link Images are not in position sequence.
As reported, when we navigate the end-user website http://www.hkperpetual.com/allwatches.php?view=thumbnailList&category=1 , it is inside category=1, choose the first image (image=7), then choose next image (image become 13), then choose next image (image become 58), then choose next image (image become 60).
I tried to browse the sqlite database table module_xxxx_gallery_relations, and spooled the SQL
The following is the sqlite database table screen capture for your reference.
If we browse the image with id=7 and position=1,
the next image should be the image with id=8 and position=2,
the next next image should be image with id=12 and position=4
am I right? I think so.
Then, I tried to turn on DEBUG flag and spool the SQL to have a look -
I believe the red-highlighted one are the SQL to get the next and previous Image Id.
However the use of "position > '1'" and "position < '1'" may not get the correct position in order.
If I execute the red-highlighted SQL in the SQLite database browser, it return image id 13 (that with position id 48), instead of image id 8 (that with position 2) as below -
May I suggest, say , add one more SQL to fetch the correct next/previous position id before you get the image id, e.g.
Then, the next and previous image are in sequence.
If necessary, we may pass you the sqlite database for you to have a look (if the end-user permits)
Please help and advise.
Thank you very much for your kind attention.
Regards
George
Website Solution Limited
http://www.website-solution.net/
We have updated the Site Builder to 4.5 Hotfix 7 (i.e. the latest one).
However for the following item (fixed in hotfix 7) -
ref.: http://autoinstall.plesk.com/SiteBu.../sitebuilder-4.5.7_build2009060500_linux.html[Image Gallery] The issue with navigation in Image Gallery has been resolved: behavior of the Previous Image button has been corrected.
--
We found that inside Image Gallery, the Next/Previous Image link Images are not in position sequence.
As reported, when we navigate the end-user website http://www.hkperpetual.com/allwatches.php?view=thumbnailList&category=1 , it is inside category=1, choose the first image (image=7), then choose next image (image become 13), then choose next image (image become 58), then choose next image (image become 60).
I tried to browse the sqlite database table module_xxxx_gallery_relations, and spooled the SQL
The following is the sqlite database table screen capture for your reference.

If we browse the image with id=7 and position=1,
the next image should be the image with id=8 and position=2,
the next next image should be image with id=12 and position=4
am I right? I think so.
Then, I tried to turn on DEBUG flag and spool the SQL to have a look -
---------------- Start select -------------------
Open connection to sqlite database
Result: true
Execute time: 0.000590085983276
Try execute query...
Result: true
Execute time: 0.0001220703125
SELECT
*
FROM modules_3ilp1vgj0dj_category
WHERE
(modules_3ilp1vgj0dj_category.storage_state<3)
ORDER BY
position ASC
---------------- End select -------------------
---------------- Start select -------------------
Open connection to sqlite database
Result: true
Execute time: 2.59876251221E-5
Try execute query...
Result: true
Execute time: 0.000169038772583
SELECT
modules_3ilp1vgj0dj_gallery_images.id as id,
modules_3ilp1vgj0dj_gallery_images.title as title,
modules_3ilp1vgj0dj_gallery_images.image as image,
modules_3ilp1vgj0dj_gallery_images.description as description,
modules_3ilp1vgj0dj_gallery_relations.position as position,
category_id as category
FROM modules_3ilp1vgj0dj_gallery_images
LEFT JOIN modules_3ilp1vgj0dj_gallery_relations ON ( image_id = modules_3ilp1vgj0dj_gallery_images.id AND modules_3ilp1vgj0dj_gallery_relations.storage_state<3)
WHERE
(id = '7'
AND category_id = '1')
AND (modules_3ilp1vgj0dj_gallery_images.storage_state<3)
---------------- End select -------------------
---------------- Start select -------------------
Open connection to sqlite database
Result: true
Execute time: 1.81198120117E-5
Try execute query...
Result: true
Execute time: 0.000128984451294
SELECT
modules_3ilp1vgj0dj_gallery_images.id as id,
category_id as category
FROM modules_3ilp1vgj0dj_gallery_images
LEFT JOIN modules_3ilp1vgj0dj_gallery_relations ON ( image_id = modules_3ilp1vgj0dj_gallery_images.id AND modules_3ilp1vgj0dj_gallery_relations.storage_state<3)
WHERE
(modules_3ilp1vgj0dj_gallery_relations.position > '1'
AND category_id = '1')
AND (modules_3ilp1vgj0dj_gallery_images.storage_state<3)
LIMIT 0, 1
---------------- End select -------------------
---------------- Start select -------------------
Open connection to sqlite database
Result: true
Execute time: 1.81198120117E-5
Try execute query...
Result: true
Execute time: 0.00129580497742
SELECT
modules_3ilp1vgj0dj_gallery_images.id as id,
category_id as category
FROM modules_3ilp1vgj0dj_gallery_images
LEFT JOIN modules_3ilp1vgj0dj_gallery_relations ON ( image_id = modules_3ilp1vgj0dj_gallery_images.id AND modules_3ilp1vgj0dj_gallery_relations.storage_state<3)
WHERE
(modules_3ilp1vgj0dj_gallery_relations.position < '1'
AND category_id = '1')
AND (modules_3ilp1vgj0dj_gallery_images.storage_state<3)
ORDER BY
id DESC
LIMIT 0, 1
---------------- End select -------------------
---------------- Start select -------------------
Open connection to sqlite database
Result: true
Execute time: 2.50339508057E-5
Try execute query...
Result: true
Execute time: 0.000121116638184
SELECT
*
FROM modules_3ilp1vgj0dj_category
WHERE
(modules_3ilp1vgj0dj_category.storage_state<3)
ORDER BY
position ASC
---------------- End select -------------------
I believe the red-highlighted one are the SQL to get the next and previous Image Id.
However the use of "position > '1'" and "position < '1'" may not get the correct position in order.
If I execute the red-highlighted SQL in the SQLite database browser, it return image id 13 (that with position id 48), instead of image id 8 (that with position 2) as below -
SELECT
modules_3ilp1vgj0dj_gallery_images.id as id,
category_id as category
FROM modules_3ilp1vgj0dj_gallery_images
LEFT JOIN modules_3ilp1vgj0dj_gallery_relations ON ( image_id = modules_3ilp1vgj0dj_gallery_images.id AND modules_3ilp1vgj0dj_gallery_relations.storage_state<3)
WHERE
(modules_3ilp1vgj0dj_gallery_relations.position > '1'
AND category_id = '1')
AND (modules_3ilp1vgj0dj_gallery_images.storage_state<3)
LIMIT 0, 1

May I suggest, say , add one more SQL to fetch the correct next/previous position id before you get the image id, e.g.
select * from modules_3ilp1vgj0dj_gallery_relations where category_id = '1' AND position > '1' ORDER BY position LIMIT 0,1
Then, the next and previous image are in sequence.
If necessary, we may pass you the sqlite database for you to have a look (if the end-user permits)
Please help and advise.
Thank you very much for your kind attention.
Regards
George
Website Solution Limited
http://www.website-solution.net/