azerbini / eamena_dev

Arches is a web-based, geospatial information system for cultural heritage inventory and management.
GNU Affero General Public License v3.0
1 stars 2 forks source link

Egypt v2 glitches on relationships #128

Open eamena-github opened 5 years ago

eamena-github commented 5 years ago

Also see email: Some records are breaking on the relationship tabs. It's something that happened in v1 too but you guys managed to fix it. I will describe the problem and my attempt to fix it in detail here.

For example, EAMENA-0000038. When the student tries to open it, it returns a key error: http://egyptv2.eamena.training/reports/62202f04-3aab-4125-b20e-50715f510394 (also see screen shot). So far so good, familiar sight.

Following the bug fix for the v1 database that I remembered, I typed http://egyptv2.eamena.training/resources/HERITAGE_PLACE.E27/summary/62202f04-3aab-4125-b20e-50715f510394. This opens the record and I can edit it. I changed some info, saved it again, all good. However the moment I open the Related Heritage Features or Related Resources tabs, it broke again. So the problem must be in related resources/heritage features. But where....

I did a map search on the record and found all related Heritage Features. I removed all the relationships (numbers 00000116, 00000177, 00000101 and 0000096). I also removed an relationship to an information resource (00000029) from one of the heritage features. I refreshed the pages, tried saving something and changing something, and the problem unfortunately persisted.

The student seems to suggest there might be another record that was related as a heritage feature to the heritage place 00000038, but it does not show up in any searches, she cannot remember the name, and I cannot see it either. If this is the case, I suspect this is where the problem lies.

eamena-github commented 5 years ago

Now on to checking other glitchy records and will update here.

eamena-github commented 5 years ago

Ok, just checked another glitchy record which is a variety of the same problem but with another variation built in.

Egypt v2 EAMENA_0000027 - Tanis / San al Hagar. Key error, but fix described above allows me to access record - but the moment I touch the related heritage resource and related resource tabs it breaks again showing http://egyptv2.eamena.training/resources/HERITAGE_PLACE.E27/man-made/5ecb9283-a70b-4b02-ba88-0fb227451c09. I'll email a screen shot of the top of the error message separately.

Did a map search on the record, and I guess the related heritage features are or should be: 100, 112, 115, 118, 119, 120, 121, 122. There might also be a related info resource, 00000005. When opening these records, the database claims they have NO related heritage place. But still, the heritage place glitches on its relationships.

eamena-github commented 5 years ago

Ok I think I have identified (part of) the problem. It's a duplication issue of related resources.

Final record with an issue is EAMENA-00000018. One of the related resources is EAMENA-F-0000100, but if you search on that number, there are 10 with the same number. No wonder the relationships break... the other two related heritage features here are 41 and 54, but they seem unique in the database.

eamena-github commented 5 years ago

YES!!! All the problematic heritage places have a relationship with a record that has a related heritage feature 100.

Nourhan: Heritage Feature Arches ID: c8b8168d-42a4-4d58-9c17-b0952fc2d93c should relate to EAMENA-0000038 (62202f04-3aab-4125-b20e-50715f510394)

Mohamed Ewwad: Heritage Feature Arches ID: 99482bfd-7a64-45b3-91e6-4e7ea6fbb6c8 has no geometry and no relationships. Heritage Feature Arches ID: 5c625c9b-0fb5-4764-b4b6-2b5d5280d2f1 has no geometry and no relationships. heritage Feature Arches ID: 1fb0e3d7-cc7c-4813-a738-b1d6ed9bcaae has no geometry and no relationships. Heritage Feature Arches ID: f2f32f9d-53f8-4f98-b130-87076fbcfbea should relate to Heritage Place EAMENA-0000018 (06ed241f-19a9-4cad-b54c-ad72da604912)

Shaimaa: Heritage Feature Arches ID: acacce5b-d19a-4c79-9ad0-37e99083d125 should relate to heritage Place EAMENA-0000027 (Arches ID: acacce5b-d19a-4c79-9ad0-37e99083d125)

Not yet flagged up as problematic, but I'm sure these will cause issues too as they're additional heritage Features numbered 100: Amir - Arches ID: b7f46fe3-f251-410c-87b5-4c299b705bb0 Beshoy: Arches ID: e5a5d1e5-4d02-4588-af30-7cd5c1d4af5a and Arches ID: 779ab9f0-7b6c-42a1-b902-7c6c549cb1fa, both linked to same heritage place I suspect Hanaa: Arches ID: 43c5863c-ec6c-4fdd-ba61-7798a45ad9ae

Hope this helps!!

michaeltfisher commented 5 years ago

So this is an extension of the issue we've already addressed; we just didn't realize that it had also affected Heritage Features (labelling all new records as EAMENA-F-0000100). Once we rename those records all should be well.

eamena-github commented 5 years ago

Is it something I can help with Mike? Sorry for the long novel but I was thinking out loud...