I’ve seen this post only after encountering a similar error, and writing up a description of the bug. The issue here is related, but not quite the same to the one I found, which appears after deleting a page linked from an asset (see below for details).
At least in the case I outline, the immediate workaround, unfortunately, does not really work, as it is not possible to edit the page with the asset (editing the page also throws an error).
This obviously is causing troubles in particular to those who use “assets” to encourage navigation across different sections of an exhibition.
I understand you have probably already identified the error, but just in case, I leave below the “steps to reproduce” I prepared before finding this post, also because my case is not really the same as the one described by @maybee
Steps to reproduce:
-
Create a page, “Page A”
-
Create a page, “Page B”
-
In “Page A”, add a block of type “asset”, add any image, and then as “Page link” select “Page B”
-
Delete “Page B”
-
Try to view “Page A” (or edit “Page A”)
What happens: “Omeka S encountered an error”
Expected behaviour: See the same page, but the link in the asset simply does not work
How to prevent: remember to remove links from assets, before deleting a page
Workaround, after it happens: it’s a bit of a pain really, since it is now not possible to edit “Page A” to remove the relevant asset block, or change the link. In principle, you can delete “Page A” and recreate it anew, but, if you, for example, had a “Page C” that linked to “Page A”, then “Page C” would now also be broken. So you go ahead and delete “Page C”, and… on it goes. (or perhaps there’s an easier way via API)