Contents.plist problem

I cannot open a project file and get the following message (I’m abbreviating the entire popup message here) “Contents.plist’ file does not exist”.

Unfortunately RW Classic had not made a backup of this version of my file (I believe the auto backup is done once a week and a previous version had already been backed up), and I had made significant updates to the website file.

Can the Contents.plist file be recreated? Is there a fix for this? I would have to invest 2 days work to recreate the changes I had made, so I’m hoping something can be done. ChatGPT does mention replacing a previous Contents.plist file from a working version in the non-working Package Contents, but I am hesitant to mess with this.

Any help would be greatly approciated.

Hi @MikeSA,

First of all the bad news: there is no easy way to fix this. The only solution, unless @dang knows one I’m not familiar with, is to rebuild the part of the site you changed since you last backup.

A little background
This issue is generally caused by the operating systems that are used by cloud storage providers and/or manufacturers of certain NAS solutions. Some of those don’t understand that the project file isn’t an actual file (but rather a bundle of files), and start treating them as a folder (/directory) in some of their space saving or drive maintenance processes. This sometimes corrupts the bundle, with the error you’re experiencing as a result.

So, first of all, to prevent this happening again, do not store the project file on any cloud storage solution other than Apple’s iCloud, and it’s best to avoid NAS too (as I’m not sure which are safe, and which are not).

Oh, and: backup-backup-backup. I know this open-door advice comes too late to fix this issue, but for future reference: back everything up regularly.

Why can’t it be fixed?
What ChatGPT suggests, is pretty much impossible. The contents.plist lists all of the resources (files, folders) in your project, and the internal identifier that RapidWeaver assigned to those files. Other than the sheer amount of entries that you’d have to enter yourself (every folder on the server, every page in your project and every file referenced on that page, including images, has its own entry), there’s also data in the contents.plist that you can’t extract yourself from RapidWeaver after the fact.

For example, an button on a page will be listed like this in contents.plist:

<key>page1 - ftp:/############.nl/domains/##############.nl/public_html</key>
					<dict>
						<key>CreationDate</key>
						<date>2024-03-20T13:01:00Z</date>
						<key>DigestAlgorithm</key>
						<string>MD5</string>
						<key>PageDigests</key>
						<dict>
							<key>files/Parsedown.php</key>
							<dict>
								<key>Digest</key>
								<data>
								sG/dSNlGsgXA
								jDIeP5Pduw==
								</data>
								<key>Size</key>
								<integer>41273</integer>
							</dict>
							<key>files/button_local_image-6-B91.png</key>
							<dict>
								<key>Digest</key>
								<data>
								aIRJzA2hk6CX
								YNuSuYtA6g==
								</data>
								<key>Size</key>
								<integer>5872</integer>
							</dict>

You’ll notice that the data is sorted in elements called KEYS. The first KEY is the location of the page where the button is a part of, on your server. The second KEY is the exact page file (parsedown.php in this example) and the third KEY contains information on the image that is the button. Part of that is the final KEY that contains the DATA element, which is an identifier which RapidWeaver uses internally. It;’s the last KEY that you can’t “guess” or extract from within RapidWeaver.

If you just copy over a content.plist from an older version, like ChatGPT suggests, you’ll be missing any pages, folders, images (or other content) that was added since that version of contents.plist was created. So the effect will be the same as to using an older backup.

Sorry to be the bearer of bad news.

Cheers,
Erwin

Dear Erwin,

Thanks for taking the trouble to respond to me and for your educated understanding of the problem. It really does scare me to think that all our client sites are saved on OneDrive and that this can happen again. I will now save them locally and rely on my daily local backup. From what you said, do I understand that Apple iCloud plays nicely with RapidWeaver?

Regards,
Mike

Hi @MikeSA,

In short: yes.

Bundles are typical of macOS. Windows or Linux don’t have a similar concept.

iCloud is the only cloud service of which I’m sure it plays nice with these “bundles” (as Apple of course understands the concept).

To be clear: this is not a RapidWeaver thing. Bundles are everywhere in macOS, in fact every app on your Mac is a bundle. You can right click any app in your apps folder, select “Show Package Contents” and you’ll see what I mean.

Cheers,
Erwin

1 Like