georchestra / mapstore2-georchestra

geOrchestra newest viewer
Other
6 stars 23 forks source link

geOrchestra's header not displaying in context #704

Closed f-necas closed 4 months ago

f-necas commented 4 months ago

Version

2023.02.00-georchestra https://dev.geo2france.fr/mapstore/#/

Describe the bug When hitting directly a mapstore context URL (e.g. /mapstore/#/context/mycontext), The

To Reproduce Steps to reproduce the behavior:

  1. Go to /mapstore/#/context/<mycontext>

Expected behavior Header's displaying

Screenshots image

Gaetanbrl commented 4 months ago

To complete steps to reproduce :

  1. Go to /mapstore/#/admin or /home (as logged role)
  2. Clic on a context => OK => Header is display
  3. Copy this contexte URI
  4. Open a new tab and past this URL to open the context directly ==> KO => Header is hide
Gaetanbrl commented 4 months ago

@f-necas, the context header (Iframe) source param seems wrong :

<iframe id="georchestra-header" src="/portail/banner?active=mapstore" scrolling="no" frameborder="0" style="display: block; height: 90px;"></iframe>

<iframe frameborder="0" scrolling="no" src="header.html" id="georchestra-header"></iframe>

For a contexte, src="/portail/banner?active=mapstore" works and show the correct header.

Maybe this have to be provided by localConfig.json ?

In addition, @catmorales response that localConfig.json needs this config to works :

In the localConfig.json, we have to add (if needed) :

"context": [
     "Header"
]

Example : https://github.com/georchestra/datadir/blob/5a16d090bbb77150d91095113cad6b0a0bb77b7b/mapstore/configs/localConfig.json#L1080-L1082

Gaetanbrl commented 4 months ago

See here :

https://github.com/georchestra/mapstore2-georchestra/issues/607#issuecomment-1469764926

f-necas commented 4 months ago

Fixed on dev.geo2france. Indeed it was missing the context part.

@Gaetanbrl You can confirm it's working on dev ?

Gaetanbrl commented 4 months ago

@vfabry @f-necas

You can confirm it's working on dev ?

Seems works better \0/

vfabry commented 4 months ago

yes, it works fine !

f-necas commented 4 months ago

Fixed in prod too !