PEAK XOOPS - duplicated photos when viewing in englishin japanese

duplicated photos when viewing

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum
Previous post - Next post | Parent - Children.1 .2 | Posted on 2006/2/10 8:39
foozhawk  二等兵   Posts: 6
Hello,
First off, thanks for the module!
I use myAlbum-p v 2.84.

My problem is that there are a number of photos that appear more than once when paging through a particular category. The image file on the back end is not duplicated -- but when viewing, I see it twice.

A screenshot of what I see can be seen in this screenshot:
http://img132.imageshack.us/img132/8422/myalbumduplicationssshot1fy.jpg

What can I do to fix the viewer?
Thanks,
newbie/Foozhawk/Dave
Votes:1 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/2/10 13:07
GIJOE  先任軍曹   Posts: 4110
1st, check the photos id (lid).

If lid is different each other, it is caused by double posting.
Upload myAlbum-P again, and check your browser.

If lid is the same, it is caused by the wrong template.
Check myalbum*_index.html or mylaubm*_viewcat*.html

The tplsadmin module is specially useful for you.
Votes:51 Average:9.80
Previous post - Next post | Parent - Children.1 | Posted on 2006/2/10 23:46
foozhawk  二等兵   Posts: 6
Thank you for the quick replly.

I checked the lids. The lids are the same between the two duplicated photos, therefore not double-posted.

I downloaded a fresh myalbum module to my own harddrive and compared the official template files to the template files from my web server. Although the files had different datestamps, there were NO differences in any of the template html files. I have not tweaked any of them.

When viewing an album's category, the navigation info such as, "Photo No. 1-8 (out of 8 photos hit)" DOES display the correct NUMBER of photos that exist in the category -- in this case 8 -- however, it is showing each of the first 5 photos twice and therefore doesn't show all 8.

I double-checked the content of the database table and there are no duplicated rows in the xoops_myalbum_photos table. (No surprise here due to lid as primary key.)

The photo files are not duplicated in the file system (uploads\photos) folder. (No surprise here, either, since lid is used in filename.)

I'm stuck.


Votes:1 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/2/10 23:54
foozhawk  二等兵   Posts: 6
I also compared the contents of the newly-downloaded myalbum module's admin, blocks, class, include, and sql folders against the contents of those same folders from my webserver. Aside from datestamp differences, the files were all identical.
Votes:1 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/2/11 4:49
GIJOE  先任軍曹   Posts: 4110
Have you read my post?

Try tplsadmin.
It looks DB template problem.
Votes:1 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/2/11 8:19
foozhawk  二等兵   Posts: 6
GIJoe,
I did try tplsadmin -- but admittedly, I don't really understand tplsadmin. I am a user, not a xoops developer.

Here is a screenshot of using tplsadmin on my myalbum. As far as I can tell, tplsadmin is telling me that there are no differences. It is similar for every file I check. (No diffs block is displayed)
I have tried every file and have tried every combination of "diff from file" or "diff from default" and there are no differences shown.

http://img470.imageshack.us/img470/7449/tplsadminsshot27gg.jpg

I'm willing to PM you logon credentials if you'd like.



Thanks.
Votes:1 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/2/11 8:40
foozhawk  二等兵   Posts: 6
Note: I turned on SQL debugging and see that I am getting a cartesian product from the highlighted query in this screenshot:

http://img447.imageshack.us/img447/3880/myalbumsqldebuggingsshot4ux.jpg

The sql is:
SELECT l.lid, l.cid, l.title, l.ext, l.res_x, l.res_y, l.status, l.date, l.hits, l.rating, l.votes, l.comments, l.submitter, t.description
FROM xoops_myalbum_photos l
LEFT JOIN xoops_myalbum_text t ON l.lid = t.lid
WHERE cid =4
AND l.status >0
ORDER BY lid DESC
LIMIT 0 , 10


Votes:1 Average:0.00
Previous post - Next post | Parent - No child | Posted on 2006/2/12 6:19
GIJOE  先任軍曹   Posts: 4110
see the "diff from file".
default template is identical defautl template, of course.
Votes:1 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/2/12 6:21
GIJOE  先任軍曹   Posts: 4110
Can you check the table xoops_myalbum_text by phpMyAdmin or etc.?
Votes:1 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2006/2/12 7:35
foozhawk  二等兵   Posts: 6
Hi, GIJoe,

Yeah, the myalbum_text table was interesting. It was not surprising to find that there were fewer rows in the _text table than in the _photos table. (That part makes sense.) However, I was surprised to find that the _text table had an index on the lid table -- but the lid column was not a primary key.

Also, I found that there were at least two rows in the text table with the same exact lid.

Maybe that is as designed, but it seemed odd to me. As a work-around -- since I did not know how else to fix it -- I made the _text table's lid column the primary key, removed any duplicates, and inserted a row in the _text table for every row in my _photos table. That may be a clumsy fix, but it prevented the cartesian product in the select query.



Votes:1 Average:0.00
Previous post - Next post | Parent - No child | Posted on 2006/2/14 5:31
GIJOE  先任軍曹   Posts: 4110
I know the structure of tables of myAlbum-P is not well-designed. (because of the full compatibility with the original myAlbum released bluetopia.homeip.net)

If you can, change the column of `lid` to UNIQUE or PRIMARY KEY. (phpMyAdmin or mysql command)

Though I don't know why lids of text table are duplicated in your environment, almost myAlbum-P works perfectly with such wrong table designing
Votes:1 Average:0.00

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!