Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cadastrapp printing crash in 2023.02.00 release #699

Closed
jusabatier opened this issue Feb 22, 2024 · 22 comments · Fixed by #705 or #706
Closed

Cadastrapp printing crash in 2023.02.00 release #699

jusabatier opened this issue Feb 22, 2024 · 22 comments · Fixed by #705 or #706

Comments

@jusabatier
Copy link
Contributor

Describe the bug
Installing https://github.com/georchestra/mapstore2-georchestra/releases/tag/2023.02.00-geOrchestra
I can't print plots with cadastrapp.

To Reproduce
Steps to reproduce the behavior:

  1. Try to search a plot in cadastrapp, select it and the print it highligthed.
  2. Check the "Print overlays" checbox
  3. In the print overview, the plot isn't highlighted
  4. Try to print generate an error

Expected behavior
Print should highlight selected plot without error

@catmorales @landryb @pierrejego

@landryb
Copy link
Member

landryb commented Feb 22, 2024

for a reason i don't understand, i don't have the 'Include overlays' checkbox anymore in the print dialog, but i'm on 8f3fe52 and need to test the latest.

But printing works (without overlays)

you say 'try to print generate an error', it'd help if you provide the error message ;)

@landryb
Copy link
Member

landryb commented Feb 22, 2024

maybe fallout from #646 ?

@landryb
Copy link
Member

landryb commented Feb 22, 2024

i can reproduce, for some reason 'include overlays' is not available in a context with fewer plugins (eg cadastrapp+print only, more or less) but 'include overlays' is here on my default context, and when a plot is selected and one tries to print:

  • its not shown in the preview
  • trying to print fails with Error in printing:e.features[0] is undefined
  • no query is sent to the printing backend

@tdipisa that's a regression... not sure if the regression is in ms2-cadastrapp (which maybe should be built against the same 2023.02.xx version as ms2) or in ms2-georchestra.

@landryb
Copy link
Member

landryb commented Feb 22, 2024

the error message is printed by https://github.com/geosolutions-it/MapStore2/blob/2023.02.xx/web/client/plugins/Print.jsx#L618 but since the selected plot is not displayed in the preview, that's probably why e.features[0] is undefined is triggered.

@landryb
Copy link
Member

landryb commented Feb 22, 2024

on 2022.01.xx, when i tick/untick the 'include overlays' box, the selected plot is shown/hidden from the preview

@MaelREBOUX
Copy link
Member

Hello.

Here in Rennes we pointed exactly the same behaviour. Sounds like a regression.
We had many calls from our customers since monday because we upgraded MS last thursday.

Capture d’écran 2024-02-22 à 12 28 49

@jusabatier
Copy link
Contributor Author

@tdipisa that's a regression... not sure if the regression is in ms2-cadastrapp (which maybe should be built against the same 2023.02.xx version as ms2) or in ms2-georchestra.

I tried to build ms2-cadastrapp against the same MS version as ms2-georchestra uses and it doesn't solve the problem.

@landryb
Copy link
Member

landryb commented Feb 22, 2024

i'd try locally reverting the fix for #646

@landryb
Copy link
Member

landryb commented Feb 22, 2024

no luck after locally reverting geosolutions-it/MapStore2@15186518 from #646, issue still present, ticking 'include overlays' adds the cadastre layer to the preview but not the selected plot.

edit bah, as always i forget to npm install && npm run compile so i tested the wrong JS. retesting with properly updated JS in a few..

@landryb
Copy link
Member

landryb commented Feb 23, 2024

so my initial testing was wrong, but after properly rebuilding and testing the correct JS with a locally reverted geosolutions-it/MapStore2@15186518 i have the selected plot shown in the preview and in the printed pdf. definitely a regression from #646

landryb added a commit to landryb/MapStore2 that referenced this issue Feb 23, 2024
@landryb
Copy link
Member

landryb commented Feb 23, 2024

https://ids.craig.fr/mapstore/#/context/cadastre has the 'print selected plot' feature in the regular print dialog working again.

@tdipisa tdipisa assigned dsuren1 and unassigned tdipisa Feb 26, 2024
@catmorales
Copy link
Collaborator

catmorales commented Feb 26, 2024

It doesn't work with our new deployement based on docker image geosolutionsit/mapstore2-georchestra:2023.02.00-geOrchestra
The selected plot is not visible in the print document :
image

@tdipisa thank you to check that

@tdipisa
Copy link
Collaborator

tdipisa commented Feb 27, 2024

@catmorales hi
@dsuren1 will do a check asap. thank you.

@dsuren1
Copy link
Collaborator

dsuren1 commented Feb 27, 2024

@catmorales @tdipisa
In #646, the annotation features are filtered by visibility property in the features added, however in this case the features don't have the property which is causing the filter to exclude these features and eventually the layer is not printed. I will provide a fix factoring in this case. The fix will be provided on MS stable

@jusabatier
Copy link
Contributor Author

@dsuren1 Maybe you can solve geosolutions-it/MapStore2#9791 at same time by excluding from print the features without geometry ?

@tdipisa
Copy link
Collaborator

tdipisa commented Mar 4, 2024

@catmorales we have just updated the image for stable branch 2023.02.xx . Can you please test also on your side and let us know if it works for you? If yes, we will provide a patch release soon.

@catmorales
Copy link
Collaborator

@tdipisa OK thank you I will test it

@catmorales
Copy link
Collaborator

I've just tested it and it seems fine. Thank you very much!

image

Will you backport this fix in the 2023.02.00-georchestra image docker ?

@tdipisa
Copy link
Collaborator

tdipisa commented Mar 4, 2024

@catmorales

Will you backport this fix in the 2023.02.00-georchestra image docker ?

No, we will do a patch release 2023.02.01-geOrchestra

@tdipisa
Copy link
Collaborator

tdipisa commented Mar 6, 2024

@catmorales

Will you backport this fix in the 2023.02.00-georchestra image docker ?

No, we will do a patch release 2023.02.01-geOrchestra

@catmorales done with https://github.com/georchestra/mapstore2-georchestra/releases/tag/2023.02.01-geOrchestra

@catmorales
Copy link
Collaborator

Thank you !

@MaelREBOUX
Copy link
Member

Good job ! Thanks for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment