Piwigo Bugtracker

Piwigo bug tracker has moved to Github

This bugtracker is kept to provide history on old issues.


View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002825Piwigoalbumspublic2013.01.26 00:552013.02.19 21:12
Reporterplg 
Assigned Toplg 
PrioritynormalSeverityblockReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version2.4.5 
Target Version2.5.0RC2Fixed in Version2.5.0RC2 
Summary0002825: missing album thumbnail breaks multiple size engine
DescriptionOn a gallery I sometimes have:

Notice: Undefined index: 3261 in .../include/category_cats.inc.php on line 313
...
Fatal error: Call to a member function has_size() on a non-object in .../include/derivative.inc.php on line 198
Steps To ReproduceI think this is because the photo is an album thumbnail and the photo is deleted. But it must be confirmed by some tests.
Additional InformationFixing the bug is easy with a simple purge of user cache.
TagsNo tags attached.
browserany
Database engine and version
PHP version
Web serverApache 1.3.x
Attached Files

- Relationships

-  Notes
(0006814)
plg (manager)
2013.01.28 13:38

The problem occured once more today. With a deeper investigation I have found:

mysql> select * from categories where id=148;
+-----+-----------------------+-------------+---------+------+------+--------+---------+---------+---------------------------+-----------+-------------+-------------+-------------+-----------+
| id | name | id_uppercat | comment | dir | rank | status | site_id | visible | representative_picture_id | uppercats | commentable | global_rank | image_order | permalink |
+-----+-----------------------+-------------+---------+------+------+--------+---------+---------+---------------------------+-----------+-------------+-------------+-------------+-----------+
| 148 | Clin d'oeil Finistère | NULL | NULL | NULL | 22 | public | NULL | true | 3262 | 148 | false | 22 | NULL | NULL |
+-----+-----------------------+-------------+---------+------+------+--------+---------+---------+---------------------------+-----------+-------------+-------------+-------------+-----------+
1 row in set (0.00 sec)

mysql> select * from image_category where category_id=148;
+----------+-------------+------+
| image_id | category_id | rank |
+----------+-------------+------+
| 3261 | 148 | NULL |
| 3262 | 148 | NULL |
| 3263 | 148 | NULL |
| 4065 | 148 | NULL |
| 4078 | 148 | NULL |
| 4296 | 148 | NULL |
| 4413 | 148 | NULL |
| 4512 | 148 | NULL |
| 10808 | 148 | 1 |
| 10809 | 148 | 2 |
| 10810 | 148 | 3 |
+----------+-------------+------+
11 rows in set (0.00 sec)

mysql> select image_id, id from image_category left join images on id=image_id where id is null;
+----------+------+
| image_id | id |
+----------+------+
| 3261 | NULL |
| 4469 | NULL |
+----------+------+
2 rows in set (0.02 sec)

mysql> delete from image_category where image_id in (3261,4469);
Query OK, 2 rows affected (0.00 sec)

photo 3261 was deleted from #images BUT was still in #image_category (and also another photo 4469). I don't know how it can be possible.

I recommend:

1) to check that deleting a photo always cleans #image_category (I'm 99.4% sure it's OK)
2) add an orphan check in the maintenance option "photo data"
3) add an action "purge user cache" on maintenance screen
(0006829)
svn (reporter)
2013.02.04 12:28

[Subversion] r20544 by plg on trunk

-----[Subversion commit log]----------------------------------------------------
bug 2825: add maintenance action to clean the database and avoid integrity errors

- Issue History
Date Modified Username Field Change
2013.01.26 00:55 plg New Issue
2013.01.26 00:55 plg Status new => assigned
2013.01.26 00:55 plg Assigned To => plg
2013.01.26 00:55 plg browser => any
2013.01.26 00:55 plg Web server => Apache 1.3.x
2013.01.26 00:56 plg Additional Information Updated
2013.01.28 13:38 plg Note Added: 0006814
2013.02.04 12:28 svn Checkin
2013.02.04 12:28 svn Note Added: 0006829
2013.02.19 21:12 plg Status assigned => closed
2013.02.19 21:12 plg Resolution open => fixed
2013.02.19 21:12 plg Fixed in Version => 2.5.0RC2
2013.02.19 21:12 plg Target Version 2.4.7 => 2.5.0RC2


Copyright © 2000 - 2017 MantisBT Team
Contact
Powered by Mantis Bugtracker