wekan: Fix boards that do not open because of deleted linked cards (was: Deleting linked card makes board not load)
Issue
Server Setup Information:
- Note: Please anonymize info, and do not add to this public issue any of your Wekan board URLs, passwords, API tokens etc, do you understand?: Yes
- Did you test in newest Wekan?: Yes
- For new Wekan install, did you configure root-url correctly so Wekan cards open correctly https://github.com/wekan/wekan/wiki/Settings? Existing install
- Wekan version: 3.49.0
- Operating System: Linux
- Deployment Method(snap/docker/sandstorm/mongodb bundle/source): Snap
- Http frontend if any (Caddy, Nginx, Apache, see config examples from Wekan GitHub wiki first): Nginx (reverse proxy only)
- Node Version: 8.16.1
- MongoDB Version: 3.2.22
- Browser: Firefox 70.0.1
Problem description: Steps to reproduce:
- In board B, create a card.
- In board A, link to that card.
- In board B, delete that card (not archive).
- Board A fails to load. All other boards appear to behave normally.
I’m unable to create a GIF currently, since I don’t have a development system setup yet. I also am unable to VM into the machine right now, but will update the following as soon as I have the info. I apologize for the premature ticket, but this behavior appears to be breaking.
- REQUIRED: Add recorded animated gif about how it works currently, and screenshot mockups how it should work. Use peek to record animgif in Linux https://github.com/phw/peek
- In webbrowser, what does show Right Click / Inspect / Console ? Chrome shows more detailed info than Firefox.
- If using Snap, what does show command
sudo snap logs wekan.wekan? Please anonymize logs. - If using Docker, what does show command
sudo docker logs wekan-app? Please anonymize logs. - If logs are very long, attach them in .zip file
I’m not familiar with Meteor, but it looks like the delete card button triggers the following, and Cards.remove(this._id); does the deletion.
This eventually calls the cardRemover:
This function appears to do a lot of clean-up, but I don’t see any reference to removing linked cards based on the card to be deleted.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 23 (17 by maintainers)
Commits related to this issue
- Fix creation of card links Without this fix, orphaned card links are created and therefore this leads to problems as described in https://github.com/wekan/wekan/issues/2785. — committed to marc1006/wekan by marc1006 4 years ago
- Refuse to delete a card as long as there is link to it This fixes https://github.com/wekan/wekan/issues/2785. — committed to marc1006/wekan by marc1006 4 years ago
Please try with newest Wekan.
Moved to here from #2492
From @xet7
When opening board, one board (of all boards) does not open. It keeps loading.
Workaround:
Most likely this is related to other Wekan issues, where some boards do not load at full desktop Wekan width.
Errors on webbrowser:
From @Gateswong
https://github.com/wekan/wekan/blob/2bf004120d5a43cd3c3c060fc7c0c30d1b01f220/models/cards.js#L1027-L1037
When the board is loading, it looks into every single card inside the board. If this board contains linked cards (from other boards), these code will be triggered.
When a linked card’s target card (original one) is deleted from the other board,
cardin above snippet will beundefined, which causes this error.I was able to reproduce this in version 3.83 (https://hub.docker.com/r/wekanteam/wekan/)