Photo Organizer

This is the bug tracker for Photo Organizer.
Tasklist

FS#321 - Error when add a new version of a photo

Attached to Project: Photo Organizer
Opened by Marcus Hinz (marcus) - Sunday, 10 February 2008, 12:38 GMT-4
Last edited by Solomon Peachy (pizza) - Tuesday, 12 February 2008, 17:16 GMT-4
Task Type Bug Report
Category Backend / Core → Import
Status Closed
Assigned To No-one
Operating System All
Severity Low
Priority Normal
Reported Version 2.35
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

When a a new version of a picture the database couldn't been updated.

Importing '01022008018.jpg' (Joint Photographic Experts Group JFIF format) as a new version of 420.

* Extracting Image Metadata (ORIENT) ... done
* Failed to update database.
*

insert into photo_version (identifier, key, photo, master, original_image_name, comment, colorspace, orientation)
values (, '1', '420', 'f', '01022008018.jpg', '', 99, 1)

* Cleaning up the mess.
This task depends upon

Closed by  Solomon Peachy (pizza)
Tuesday, 12 February 2008, 17:16 GMT-4
Reason for closing:  Fixed
Additional comments about closing:  reporter confirmed fixed.
Comment by Solomon Peachy (pizza) - Sunday, 10 February 2008, 22:30 GMT-4
Okay... I can't seem to figure out how this is happening.

So, can you post the contents of the httpd error_log when this error occurs?

Also, are you adding a new version via the "add version" page, or is it being imported at the same time as the master?

(is it a master?)
Comment by Marcus Hinz (marcus) - Monday, 11 February 2008, 02:17 GMT-4
Hm, the httpd error_log. I'm now at work. I tested it at your stable demo system 5 minutes before I wrote the bug report. Later at home I could sent your my error.log if necessary.

I add a new version with the "add version" page. It doesn't matter if the new picture should be the master or not.

Comment by Solomon Peachy (pizza) - Monday, 11 February 2008, 08:47 GMT-4
I just had a successful test on my personal site (which is -devel + changes).

But the -stable demo site just broke.

Hmm. I didn't think I'd made any changes to that code.

Time to figure out what went wrong.
Comment by Solomon Peachy (pizza) - Monday, 11 February 2008, 09:03 GMT-4
Okay, I just committed a fix (r1872) -- it affects both -trunk and -stable.

The problem was that the DB field indices were all off. Oddly enough, it worked on my personal site because my userid just happened to also be a valid folderid.

This fix will go into 2.35a, but in the mean time the patch is attached.
   fix.diff (1.8 KiB)
Comment by Marcus Hinz (marcus) - Monday, 11 February 2008, 16:14 GMT-4
OK, now it's possible to add versions. But there is another mistake:

If you try to edit the versions (for example to add a remark) you get everytime a "Failed to update database." error after clicking "save changes" even if you change nothing. I have tested it a few minutes ago at your stable deomo site.

Comment by Solomon Peachy (pizza) - Tuesday, 12 February 2008, 01:46 GMT-4
Okay, the 'edit' has been fixed too. (r1873)

I also discovered a bug in the 'delete' code, albeit a purely cosmetic (but no less annoying) one.

The patch I committed is attached.
Comment by Marcus Hinz (marcus) - Tuesday, 12 February 2008, 14:06 GMT-4
Now it seems to work correct.

Loading...