performant-software / chronicleME

“The Chronicle of Matthew of Edessa” (ChronicleME) online digital critical edition.
1 stars 0 forks source link

Section IDs can vary across versions #143

Open tla opened 2 years ago

tla commented 2 years ago

I generated a new edition of the Chronicle website this morning, and noticed that the text still doesn't appear on the homepage, and also that none of the older versions in the version dropdown works. Poking around in the debugger, it seems that both of this issues are down to the assumption that section IDs remain consistent across versions. In fact there are several reasons why this might not be the case - the most usual one is that I have had to move the database (I always make sure to preserve the tradition UUID when I move the data, but I don't try to preserve Neo4J node IDs, which is what the section IDs are.) This means that the ID numbers will be consistent within any one version, but may well vary across versions.

For the home page, it is simply a matter of not hardcoding the ID of the first section in these files:

./src/components/HomePage.js:                                sectionId="1019321"
./src/components/HomePage.js:                                sectionId="1019321"
./src/components/HomePage.js:                                to="/Edition/1019321"
./src/components/EditionLanding.js:                                                to="/Edition/1019321"

For the version dropdown, I guess the correct URL for the corresponding section in the older version has to be resolved somehow. I haven't looked all that deeply into the code.

tla commented 1 year ago

n.b. This also seems to affect the operation of the "Book 1/2/3/Continuation" links on the /Edition page...