Photo Organizer

  • Status Closed
  • Percent Complete
  • Task Type Bug Report
  • Category Backend / Core → Import
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version 2.35
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Photo Organizer
Opened by Marcus Hinz - 2008-02-10
Last edited by Solomon Peachy - 2008-02-12

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

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.

Closed by  Solomon Peachy
2008-02-12 22:16
Reason for closing:  Fixed
Additional comments about closing:  reporter confirmed fixed.
Solomon Peachy commented on 2008-02-11 03:30

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?)

Marcus Hinz commented on 2008-02-11 07:17

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.

Solomon Peachy commented on 2008-02-11 13:47

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.

Solomon Peachy commented on 2008-02-11 14:03

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)
Marcus Hinz commented on 2008-02-11 21:14

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.

Solomon Peachy commented on 2008-02-12 06:46

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.

Marcus Hinz commented on 2008-02-12 19:06

Now it seems to work correct.


Available keyboard shortcuts


Task Details

Task Editing