Skip navigation

iPhoto '11 referenced library problems

6672 Views 29 Replies Latest reply: Jan 2, 2014 10:34 AM by Old Toad RSS
1 2 Previous Next
Pascal Mah Calculating status...
Currently Being Moderated
Jul 27, 2011 5:32 AM

I have a huge iPhoto library containing 40 000+ images, as well as a large amount of metadata (comments, Faces,...). Since I need to read-access the image files with other software, I use a referenced library.

 

Everything was fine until the day I decided to upgrade for a larger HD. So I simply restored full content of my old drive on the new drive using a TimeMachine backup. Nothing else was modified (no directory structure changes, not even the volume name).

 

Since then, the problems. Essentially, references to the original files are lost: Thumbnails are OK, but upon accessing the larger view, iPhoto asks me to locate the file... After having done so, other pics would load nice, but nothing would stick upon a quit and relaunch of iPhoto... (Funnily, this happens only for pics that were imported *after* I upgraded from iPhoto '08 to iPhoto '11).

 

I tried many things: rebuilding the database, rebuilding the database on the older drive prior to backup, etc... Nothing would help.

 

So, my questions:

 

* Whad did I do wrong?

 

* Is there a way to "repair" file references? (That should be a fairly obvious functionality of database rebuilding)

 

* Is hacking into the Library.apdb file part of the officially supported solutions?

 

Obviously, recreating a new iPhoto library is not an option for me, due to the amount of metadata in my library that I don't know how to transfer. Also, I don't consider upgrading to Aperture, which is just too complex and loaded of features which are totally useless to me.

 

Running Lion and latest iPhoto update.

 

Thanks!

iPhoto '11, Mac OS X (10.7)
  • Terence Devlin Level 10 Level 10 (121,745 points)
    Currently Being Moderated
    Jul 27, 2011 5:56 AM (in response to Pascal Mah)
    * Whad did I do wrong?

     

    Not sure, but something in the path to the files changed.

     

    * Is there a way to "repair" file references? (That should be a fairly obvious functionality of database rebuilding)

     

    With iPhoto, afraid not.

     

    * Is hacking into the Library.apdb file part of the officially supported solutions?

     

    No. But if you manage, plese post details on how you did it. This question comes up a lot.

     

    You know that all of the metadata - with the exception of Faces - can be written to the files.

     

    Regards

     

     

    TD

  • PartisanEntity Level 1 Level 1 (15 points)
    Currently Being Moderated
    Aug 22, 2011 12:49 PM (in response to Pascal Mah)

    Thanks very much for posting this, it saved me from having to reimport and sort 12000 photos! Worked like a charm.

  • PartisanEntity Level 1 Level 1 (15 points)
    Currently Being Moderated
    Oct 1, 2011 7:12 AM (in response to PartisanEntity)

    Update: it worked but only to a point. For some reason I had my shortcut files in my iPhoto library. In such cases this method will not work for obvious reasons.

     

    I am not sure why I had these shortcut files, it could be due to previous versions of iPhoto. So I had to bite the bullet and create a new iPhoto library and re-import all my photos.

  • robig1 Calculating status...
    Currently Being Moderated
    Dec 5, 2011 11:29 AM (in response to Pascal Mah)

    Worked fine

     

    I was using the sqlite console client using a query like this to update my database entries to move all files on the external Volume to the local drive:

    update RKMaster set imagePath = replace(imagePath,'Volumes/ExternalVolume','Volumes/<Destination>')   where imagePath like '%ExternalVolume/%';

     

    Thank you.

     

    robert

  • michaelab Calculating status...
    Currently Being Moderated
    Jan 2, 2012 10:13 AM (in response to Pascal Mah)

    Pascal Mah wrote:

     

    Lessons learned (How I understand the things as far as I know):

     

    A. Library.apdb stores the initial drive and path of the pic files at the time they were imported. This is not modified as the files are moved around.

     

    B. Some other data (BLOBs?) is used to track the files at their actual location. Therefore, it seems OK to move the pic files after they were imported.

     

    C. Unfortunately, this other data is broken if the file is recreated (even with same content and location), for example with a file-based backup and restore (Time Machine).

     

    D. In that case, iPhoto is unable to recover the file if its current drive and path does not match the one when the file was imported, stored in the database. Also there is no mechanism in iPhoto to correct this data.

     

    Regarding point B, yes, for referenced files (ie, image files that are stored outside the iPhoto Library folder structure, when you have the "Copy Images to Library" option switched off), iPhoto '11 stores the file location in a BLOB column in RKMaster called fileAliasData. The alias blob data is basically the contents of a plist file which has in it the serialized data of a FileAlias object which is a proprietary object type that iPhoto uses so we don't know it's structure. However, if you view the data you can see, amongst the binary garbage characters, the file path that is being stored. It should be possible to reverse engineer the FileAlias format to be able to write a program to 'fix' or update this data, a project I might think about

     

    Prior to iPhoto '11, iPhoto used regular OS X file aliases within the iPhoto Library folder structure (under the Originals folder, which in iPhoto '11 is now called Masters) to store the location of referenced files. This is the reason that Alias Herder no longer works for iPhoto '11, because it no longer uses normal file aliases.

     

    Michael.

  • michaelab Level 1 Level 1 (15 points)
    Currently Being Moderated
    Jan 2, 2012 10:16 AM (in response to PartisanEntity)

    PartisanEntity wrote:

     

    Update: it worked but only to a point. For some reason I had my shortcut files in my iPhoto library. In such cases this method will not work for obvious reasons.

     

    I am not sure why I had these shortcut files, it could be due to previous versions of iPhoto. So I had to bite the bullet and create a new iPhoto library and re-import all my photos.

    Yes, the shortcut (or alias) files in the iPhoto Library are from an earlier (pre '11) version of iPhoto. That is the way iPhoto used to store file references.

     

    I was able to copy all the real images over my shortcuts and then update the RKMaster table in the iPhoto database accordingly so that it all worked. This way I managed to consolidate my library into the iPhoto Library folder and got rid of any references which could cause be trouble in the future.

     

    Michael.

  • ddewan Calculating status...
    Currently Being Moderated
    Jun 16, 2012 1:48 AM (in response to Pascal Mah)

    I have a similar issue, although I could not find old server being referenced anywhere in RKMaster. Any other suggestions?

  • LarryHN Level 9 Level 9 (54,905 points)
    Currently Being Moderated
    Jun 16, 2012 5:37 AM (in response to ddewan)

    With iPhoto 9.3 you can open your library with Aperature 3.3 which can resolve the reference issus - upgrading iPhoto and aperature or buying Aperature is a supported way of resolving this now

     

    LN

  • odysseus Level 3 Level 3 (910 points)
    Currently Being Moderated
    Aug 10, 2012 3:33 PM (in response to LarryHN)

    Larry, what do you think will happen if I run "Consolidate Originals" in Aperture on my library which already has the originals in place because I used AliasHerder?

  • minethatbird Calculating status...
    Currently Being Moderated
    Dec 21, 2012 7:12 AM (in response to Pascal Mah)

    This solution worked great for me too with one caveat. In addition to setting the fileVolumeUuid column to match that for recent photos (which for me was null) I also had to change the fileIsReference column from 1 to 0. I was using iPhoto 9.4.2.

  • josefssonfredrik Calculating status...
    Currently Being Moderated
    Jul 24, 2013 12:13 PM (in response to minethatbird)

    I had a similar problem where the file path was wrong after changing the user name from josefssonfredrik to fredrikjosefsson, iphoto looked in the following folder .../Users/josefssonfredrik/Pictures/.. when it was suppesed to look in .../Users/fredrikjosefsson/Pictures/.. I solved it using this method:

     

    1. Create the folder wich the images was suppose to be in ...Users/josefssonfredrik/Pictures/...

    2. Copy all the images to this folder (this will result in that IPLM can find the images)

    3. Use IPLM and rebuild the library.

     

     

    This works if you can create the folder which the images was suppose to be in (there may be problem if the hdd drive name is different). Also if you can live with the fact that all images are copied inside the new rebuild iphoto library.

  • tyler_khh Calculating status...
    Currently Being Moderated
    Aug 16, 2013 11:09 AM (in response to Pascal Mah)

    I had this exact same problem. I had backed up my referenced library to an external drive, reinstalled OS X on my MB Pro's internal, and then copied the entire library back to the internal drive with the exact same path as before. Even though it was the same drive and the same path, iPhoto could "Reveal in Finder" but not "Edit" (offline error).

     

    EASY SOLUTION for me..... During my reinstall, I had named the main disk "MAC". On my old installation I had named it "TYLER". I simply changed the name of the main disk back to the old name "TYLER" and voilà iPhoto worked normally again. Literally a 2-second fix!!!!!

     

    Hopefully this helps someone else out!

  • LarryHN Level 9 Level 9 (54,905 points)
    Currently Being Moderated
    Aug 16, 2013 11:15 AM (in response to tyler_khh)

    Even though it was the same drive and the same path, iPhoto could "Reveal in Finder" but not "Edit" (offline error).

     

    EASY SOLUTION for me..... During my reinstall, I had named the main disk "MAC". On my old installation I had named it "TYLER". I simply changed the name of the main disk back to the old name "TYLER" and voilà iPhoto worked normally again. Literally a 2-second fix!!!!!

     

    It was not the same path since you changed the hard drive name - when you correcte the hard drive name and thereby made the path the same again you were fine

     

    However there is no advantage at all to a referenced library and it creates many problems like (but not limited to) the difficulty in changing the path which makes upgrading hardware or replacing defective hardware difficult to impossible  --  Referenced libraries are strongly not recommended now

     

    LN

1 2 Previous Next

Actions

More Like This

  • Retrieving data ...

Bookmarked By (3)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.