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

UI crashes after deleting a selected map #625

Open
lindavin opened this issue Apr 17, 2021 · 5 comments · May be fixed by #1314
Open

UI crashes after deleting a selected map #625

lindavin opened this issue Apr 17, 2021 · 5 comments · May be fixed by #1314

Comments

@lindavin
Copy link
Contributor

Describe the bug

When the admin deletes a map that was previously selected, the UI will crash if the admin changes the page.

To Reproduce

Steps to reproduce the behavior:

  1. Go to home page.
  2. Select a map.
  3. Go to maps page by clicking the map header button.
  4. Delete the previously selected map.
  5. Go to home page and see that the UI has crashed and turned into a white screen.

Expected behavior

The UI should not crash. If a selected map is deleted, it should simply not be displayed.

Machine info (please complete the following information)

  • OS: Linux Mint 19
  • Browser & Version: Firefox 87.0
  • OED Version: 0.6.0
@huss
Copy link
Member

huss commented Apr 20, 2021

I looked into this some. First, I'm setting the label as low-priority since this seems to only happen if you delete a map while using it. This means an admin must do this so unlikely. Second, I traced the code in src/client/app/containers/MapChartContainer.ts and it makes the map undefined and the image be a new image. This is what I would expect. However, at a later point it gets an exception when it tries to read property image of an undefined object. I'm not sure why this is happening nor where it happened. I'm going to leave this for now.

@lindavin lindavin reopened this Apr 27, 2021
@lindavin
Copy link
Contributor Author

Sorry I accidentally closed it.

@huss
Copy link
Member

huss commented Apr 22, 2023

v1.1 plans to remove the map container for React hooks. This will be looked into again after that change.

@huss huss modified the milestones: 1.0 Release, 1.1 release Apr 22, 2023
@huss
Copy link
Member

huss commented Mar 23, 2024

Since PR #1113 this is still happening but it catches the error and puts a message on the screen. Hopefully this will be fixed once maps go to RTK (issue #1145). Without looking at this in detail, I would think that clearing the selected map in Redux state if the deleted map is the selected map might fix this.

@huss
Copy link
Member

huss commented May 31, 2024

This is on hold to see if going to the Redux Toolkit will easily solve the issue.

@ChrisMart21 ChrisMart21 linked a pull request Aug 13, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

4 participants