pietervdvn / MapComplete

An easy-to-use webapp to edit OpenStreetMap
https://mapcomplete.org
194 stars 89 forks source link

Advertising: Selecting shelter without advertising does not open object, blocks UI #1917

Closed danieldegroot2 closed 2 months ago

danieldegroot2 commented 2 months ago

Observed Selecting a shelter without advertising is registered (page name changes to Advertising | Wall or building) but does not open the object's UI. Some buttons on screen (filter, layers, add new object and sometimes also menu buttons) are now blocked/disabled by this action failing (or creating non-existing overlay elements). Selecting the search bar is still possible; searching a location however will 'reload' the theme, remaining at the same location and the UI will still be blocked.

When manually exiting and re-entering the theme (thus exiting the object), the UI is longer be broken.

Example

Returns

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'GetFeaturesWithin')
    at Object.getFeaturesWithin (MetaTagging.ts:231:51)
    at ExtraFunctions.ts:111:47
    at advertising.ts:9:92
    at Object.get (Utils.ts:334:32)
    at ExtraFunctions.ts:428:32
    at advertising.ts:11:80
    at Object.get (Utils.ts:334:32)
    at Li.matchesProperties (Tag.ts:46:26)
    at jo.GetRenderValueWithImage (TagRenderingConfig.ts:528:32)
    at jo.GetRenderValue (TagRenderingConfig.ts:506:21)

Expected Shelter without advertising (will open object's UI, or) selecting it is disabled.

Browser(s): Chrome 124.0.6367.61, 124.0.6367.79 Instance(s): MapComplete 0.41.7, 0.42.3-dev OS: Windows 10