periodo / periodo-client

Client to browse and edit PeriodO data
https://client.perio.do
Other
15 stars 2 forks source link

Script error triggered by inclusion of certain places in "Coverage Area" when adding new period #607

Closed atomrab closed 3 months ago

atomrab commented 3 months ago

The following error message appears when I attempt to add a new period to the EAMENA authority using "MENA" as the spatial coverage and attempting to add all of the "coverage area" values that appear, either all at once or one at at time. The error appears only to be triggered by three of the 21 area values in this list: Kuwait, Palestine, and Western Sahara. I have documented it on Windows 11 with both Firefox and Chrome and on Mac Sonoma 14.6.1 on both Firefox and Chrome.

Client error TypeError: Cannot use 'in' operator to search for 'geometry' in null Error stack TypeError: Cannot use 'in' operator to search for 'geometry' in null at geometryOf (https://client.perio.do/periodo-client-5.0.19.min.js:78:200842) at splitIntoPolygonsAndPoints (https://client.perio.do/periodo-client-5.0.19.min.js:78:201105) at map.display (https://client.perio.do/periodo-client-5.0.19.min.js:78:206574) at _Map.show (https://client.perio.do/periodo-client-5.0.19.min.js:78:210307) at _Map.componentDidUpdate (https://client.perio.do/periodo-client-5.0.19.min.js:78:210743) at Ji (https://client.perio.do/periodo-client-5.0.19.min.js:252:83719) at Sj (https://client.perio.do/periodo-client-5.0.19.min.js:252:101205) at exports.unstable_runWithPriority (https://client.perio.do/periodo-client-5.0.19.min.js:346:3998) at cg (https://client.perio.do/periodo-client-5.0.19.min.js:252:45445) at Jj (https://client.perio.do/periodo-client-5.0.19.min.js:252:97897) Component stack in _Map in div in UI:Box in UI:WorldMap in div in UI:Flex in UI:LabeledMap in div in div in UI:Box in UI:PlacesSelect in div in UI:Box in div in UI:Box in Unknown in div in UI:Box in UI:Section in div in UI:Box in Unknown in Validated in div in UI:Box in AddPeriod in Navigable in RenderErrorHandling in BreadcrumbedComponent in Connect(BreadcrumbedComponent) in ResourceLoader in ReduxStoreComponent in MenuedComponent in BackendKnower in Connect(BackendKnower) in Resource:authority-add-period in div in UI:Box in div in UI:Grid in ThemeProvider in PeriodoApplication in ORGShell in IndexedDBChecker in ThemeProvider in Provider in Shell

rybesh commented 3 months ago

I suspect what has happened here is that, since the EAMENA authority was generated programmatically, it refers to some Wikidata places that are not actually in our gazetteers. That would explain why it happens with only certain places. I will investigate.

rybesh commented 3 months ago

As expected, there were a few mismatches:

I'll patch the EAMENA URLs to fix the schemes, and update the countries gazetteer to include Western Sahara.

rybesh commented 3 months ago

7b16ea9 added Western Sahara to the PeriodO countries gazetteer.

Changes 464 and 465 fixed the Wikidata URLs in the EAMENA authority.

You will need to clear your browser cache as the gazetteers are cached for a week by default.