Closed landryb closed 8 months ago
cant reproduce with plain mapstore, but ofc this doesnt have the same plugin list.. now checking if this can be a conflict with another plugin (maybe usersession ?)
it works fine on a random map (eg on /mapstore/#/viewer/66
) so it seems to blow only on the 'default map' (eg /mapstore/#
) where we don't know yet the resource type/it doesnt have a sane default ? @dsuren1 @tdipisa
the code in savePermalinkEpic
doesnt check for permalinkType
being empty/undefined, and it doesnt have a default value.
maybe there should be type = 'map'
as the default value returned by getPathInfo
in https://github.com/geosolutions-it/MapStore2/blob/master/web/client/components/permalink/Permalink.jsx#L51 ?
@landryb I will check this use case with the team to get back to you as soon as possible.
MS ref issue: https://github.com/geosolutions-it/MapStore2/issues/9335
Thank you to update the docker image 2023.02.00-RC2-geOrchestra We have the same problem as decribed above, thank you to backport this fix in the docker image .
can confirm it's working with a war built from 76035d4, i can create permalinks as a logged in user on the default map.
I have tested it now and it don't work for me .
The test: https://portail-test.sig.rennesmetropole.fr Release : 2023.02.00-RC3-geOrchestra - Image docker
1- On Chrome
I have created a permalink in the default map of georchestra with my account , the permalink is public.
In our default map user session is active.
Permalink is :
https://portail-test.sig.rennesmetropole.fr/mapstore/#/permalink/2b0c869a-6d84-420f-bd4d-acc92b162853
Map is:
2- On Firefox Open the permalink in other browser with other account Link is redirected to https://portail-test.sig.rennesmetropole.fr/mapstore/#/viewer/8496 , Layers are OK but Backgrouds layers and bounding box are not those expected in the permalink.
Permalink in the default map not store all active user session !
@catmorales I tried loading the permalink and the map link directly and it loads up fine as you can see from screen capture attached
@catmorales' permalink redirects to cas here, is it expected ? also can it be a conflict with usersession taking precedence over the map, which would be unexpected ?
Thank you for testing. Issue seems linked to Firefox because @MaelREBOUX tested with both (as me) and there is just an issue with firefox.
permalink redirects to cas here, is it expected ?
@landryb yes it is expected in our professional geOrchestra platform : everybody must be connected to use geOrchestra's functionnality.
Thank you for testing. Issue seems linked to Firefox because @MaelREBOUX tested with both (as me) and there is just an issue with firefox.
@catmorales I tested the same in firefox too and was able to load the permalink fine. (Firebox v119.0)
@catmorales do you have some more feedback? It seems we are not able to reproduce the issue. All seems working as expected for us. We have followed steps above and we have also checked we a new default empty map but the result is always consistent. Could it be perhaps due to a spurious user session on your side?
@tdipisa I've tested it newly now and I suspect that the problem occurs when there is and old user session in the browser, so when I load the permalink in the same windows , I have to delete the current user session to see the complete map of the permalink It seems like a conflict between user sessions.
1- my current map in the default context:
2- loading the permalink https://portail-test.sig.rennesmetropole.fr/mapstore/#/permalink/2b0c869a-6d84-420f-bd4d-acc92b162853
3- after deleting the current session
@catmorales as I wrote above, that's was my suspect too but it is how user session works. It takes the priority by design and the problem involving this issue has been resolved, I think. Isn't it?
@catmorales
It's not user session conflict (Loading a new permalink will obtain details from config saved and copied over to current session). The permalink creation is similar to application's save
and works by obtaining the current state of the map/context and related configurations. Hence opening the permalink created will open to the exact state when it was created
Ex: Map has 2 layers and layer-1
is hidden from TOC -> Save the map -> Open the saved map will show layer-1
hidden and layer-2
visible. The same is applicable for permalink creation and loading it
Could you please confirm, the following
I created a permalink with these layer
Permalink created https://portail-test.sig.rennesmetropole.fr/mapstore/#/permalink/74b7681d-b72c-4730-9e2c-c7b8a9670894
Kindly try this permalink and let me know how it looks at your end
@dsuren1 We have just tested your permalink and the result is in the video bellow:
It seems difficult to explain this behaviour to our users ...
Hi @catmorales I think I know why this behavior is specific to georchestra and was not able reproducible in MS.
The georchestra's configuration enables contextOnly: true
of UserSession plugin. This configuration allows the context to share only one session and if set to false each context sub-map will have its own session.
I tried this locally and I was able to reproduce the issue you mentioned above. When setting this configuration contextOnly: false
, the default context has it own session while the permalink created from this has it's own session and when loading them simulataneously it loaded up fine since each has it own session to refer to
Could you please try the same, by updating localConfig.json
as shown below and let me know how it goes. If you are happy with the outcome, we can update the same in the repo's config
"userSessions": {
"enabled": true,
"contextOnly": false
}
Note: localConfig -> userSessions
and not on the plugin cfg
I'm not sure why this configuration was set to true as there was no specific ticket requesting this change. Looks like it was setup this way from the time session plugins was added to georchestra.
Thank you @dsuren1. We are looking forward to hearing from you soon for the above.
@dsuren1 I've changed it in the first part of the localconfig.json :
"useAuthenticationRules": true,
"loadAfterTheme": true,
"userSessions": {
"enabled": true,
"contextOnly": false
},
"header": {
"height": 90,
"url": "/header/"
and the results is OK Thank you very much.
Describe the bug the share plugin is enabled by default in localConfig.json - that includes the new permalink feature.
as stated in https://github.com/georchestra/mapstore2-georchestra/issues/640#issuecomment-1669475414 saving a permalink from a context works. what doesnt work here is saving a permalink from the default map (eg being on
/mapstore/
)To Reproduce Steps to reproduce the behavior:
Expected behavior Permalink should be saved
instead, there's a JS traceback in the error console pointing at the array access in https://github.com/geosolutions-it/MapStore2/blob/3e1d020e5799de91d61a141e2bae6835456ac13b/web/client/epics/permalink.js#L128
will try to reproduce with plain mapstore to have a better traceback