qgis / qwc2-demo-app

QWC2 demo application
Other
240 stars 149 forks source link

Run time error in qwc2-demo-app #531

Closed mhaelsig closed 3 months ago

mhaelsig commented 3 months ago

After downloading the actual qwc2-demo-app https://github.com/qgis/qwc2-demo-app/commit/a5e9d467691926ca1ba2270db2e4878b894a85ab, yarn install, yarn start, I get the run time error:

ERROR
undefined has no properties
./qwc2/components/StandardApp.jsx/AppInitComponent/</</<@http://localhost:8081/dist/QWC2App.js?329b53cbdec61533700a:24562:39
resolvePermaLink@http://localhost:8081/dist/QWC2App.js?329b53cbdec61533700a:12926:13
./qwc2/components/StandardApp.jsx/AppInitComponent/</<@http://localhost:8081/dist/QWC2App.js?329b53cbdec61533700a:24547:81

The debugger shows:

    AppInitComponent StandardApp.jsx:113
    resolvePermaLink PermaLinkUtils.js:134
    AppInitComponent StandardApp.jsx:100
    promise callback*./qwc2/components/StandardApp.jsx/AppInitComponent/< StandardApp.jsx:92
    componentDidUpdate StandardApp.jsx:80
    React 13
    Redux 12
    node_modules Immutable
    Redux 2
    loadLocale locale.js:51
    promise callback*./qwc2/actions/locale.js/loadLocale/< locale.js:31
    middleware Redux
    node_modules Immutable
    node_modules Redux
    StandardApp StandardApp.jsx:293
    promise callback*./qwc2/components/StandardApp.jsx/StandardApp/< StandardApp.jsx:275
    StandardApp StandardApp.jsx:196
    React 8
    workLoop scheduler.development.js:266
    flushWork scheduler.development.js:239
    performWorkUntilDeadline scheduler.development.js:533
    js scheduler.development.js:571
    js scheduler.development.js:633

The DefaultTheme and the Background Layers are not shown. Another observation: If a Layer id is given, the generated static/themes.json contains another id - the last part of the URL.

manisandro commented 3 months ago

Thanks, should be fixed with https://github.com/qgis/qwc2/commit/4a6cd942c83ae040e999c4e17a936a617882bcc1

mhaelsig commented 3 months ago

Hi, thank you for your quick response - even on sunday! I have downloaded the actual qwc2-demo-app (Standalone).

The run time error has disappeared. Unfortunately, the DefaultTheme and the Background Layers are not shown (see attached screenshot).

And: it is suspicious to me that in static/themes.json the layer id is the last part of the URL, but not the layer id given in themesConfig.json.

Kind regards Michael Hälsig

-- Screenshot_20240310_182731

Am Sonntag, 10. März 2024, 17:48:02 CET schrieb Sandro Mani:

Thanks, should be fixed with https://github.com/qgis/qwc2/commit/4a6cd942c83ae040e999c4e17a936a617882bcc 1

-- Reply to this email directly or view it on GitHub: https://github.com/qgis/qwc2-demo-app/issues/531#issuecomment-1987291523 You are receiving this because you authored the thread.

Message ID: @.***>