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:

  1. In board B, create a card.
  2. In board A, link to that card.
  3. In board B, delete that card (not archive).
  4. 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.

https://github.com/wekan/wekan/blob/ebdb3a0cc3b10e804b30635b5a19dcfbf4a3eadc/client/components/cards/cardDetails.js#L814-L818

This eventually calls the cardRemover:

https://github.com/wekan/wekan/blob/865c8305cbcd14d99b6ae6696a89a7261387c0e3/models/cards.js#L1672-L1688

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

Most upvoted comments

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:

  1. Login to Wekan.
  2. At All Boards page, reduce destop webbrowser (Firefox/Chrome/Chromium) width smaller so that Wekan goes to mobile mode, where top buttons don’t have text.
  3. Click board that did not open previously. Then board loard loads in Wekan mobile mode.
  4. Maximize browser size, so you see full board in desktop Wekan mode.

Most likely this is related to other Wekan issues, where some boards do not load at full desktop Wekan width.

Errors on webbrowser:

d989e0b356249a263e2e75d805326a5504ce0b60.js?meteor_js_resource=true:1 TypeError: Cannot read property 'archived' of undefined
    at e.getArchived (http://we/d989e0b356249a263e2e75d805326a5504ce0b60.js?meteor_js_resource=true:323:593417)
    at http://we/d989e0b356249a263e2e75d805326a5504ce0b60.js?meteor_js_resource=true:59:33294
    at Object.p.call (http://we/d989e0b356249a263e2e75d805326a5504ce0b60.js?meteor_js_resource=true:123:1928)
    at http://we/d989e0b356249a263e2e75d805326a5504ce0b60.js?meteor_js_resource=true:323:197396
    at f.View.<anonymous> (http://we/d989e0b356249a263e2e75d805326a5504ce0b60.js?meteor_js_resource=true:59:27982)
    at http://we/d989e0b356249a263e2e75d805326a5504ce0b60.js?meteor_js_resource=true:59:19015
    at Function.e._withTemplateInstanceFunc (http://we/d989e0b356249a263e2e75d805326a5504ce0b60.js?meteor_js_resource=true:59:37698)
    at http://we/d989e0b356249a263e2e75d805326a5504ce0b60.js?meteor_js_resource=true:59:18967
    at Object.f._withCurrentView (http://we/d989e0b356249a263e2e75d805326a5504ce0b60.js?meteor_js_resource=true:59:23097)
    at n (http://we/d989e0b356249a263e2e75d805326a5504ce0b60.js?meteor_js_resource=true:59:18916) undefined

d989e0b356249a263e2e75d805326a5504ce0b60.js?meteor_js_resource=true:1 Exception from Tracker recompute function: undefined

d989e0b356249a263e2e75d805326a5504ce0b60.js?meteor_js_resource=true:1 Error: Must be attached
    at f._DOMRange.t.firstNode (http://we/d989e0b356249a263e2e75d805326a5504ce0b60.js?meteor_js_resource=true:59:5163)
    at f.View.a.templateInstance (http://we/d989e0b356249a263e2e75d805326a5504ce0b60.js?meteor_js_resource=true:59:35308)
    at x (http://we/d989e0b356249a263e2e75d805326a5504ce0b60.js?meteor_js_resource=true:231:3032)
    at http://we/d989e0b356249a263e2e75d805326a5504ce0b60.js?meteor_js_resource=true:231:4236
    at Object.e.nonreactive (http://we/d989e0b356249a263e2e75d805326a5504ce0b60.js?meteor_js_resource=true:21:4414)
    at Object.r._getTemplateHelper (http://we/d989e0b356249a263e2e75d805326a5504ce0b60.js?meteor_js_resource=true:231:4206)
    at f.View.lookup (http://we/d989e0b356249a263e2e75d805326a5504ce0b60.js?meteor_js_resource=true:59:32778)
    at HTML.H2.class (http://we/d989e0b356249a263e2e75d805326a5504ce0b60.js?meteor_js_resource=true:323:278200)
    at f.View.<anonymous> (http://we/d989e0b356249a263e2e75d805326a5504ce0b60.js?meteor_js_resource=true:59:27982)
    at http://we/d989e0b356249a263e2e75d805326a5504ce0b60.js?meteor_js_resource=true:59:19015 undefined

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, card in above snippet will be undefined, which causes this error.

I was able to reproduce this in version 3.83 (https://hub.docker.com/r/wekanteam/wekan/)