Dashboard: registering a widget without backend panel breaks the remaining widgets
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript
- Domain
- frontend
Research direction
Read apps/dashboard/src/DashboardApp.vue, especially rerenderPanels() around lines 415–430, where the issue identifies the failing access and unreachable error log. Check how the function handles a missing panel and how its widgets are iterated. The change is done when an unknown panel is logged and skipped while later widgets still mount.
Written by the indexing model from the issue text.
Description
Bug description
rerenderPanels() reads this.panels[app].id before checking whether the panel exists:
If an app calls OCA.Dashboard.register() for an id that has no backend panel (e.g. the widget's app is disabled for the user, or the ids don't match), this throws a TypeError, which aborts the loop – so all widgets after it in the iteration are not mounted either. The intended logger.error branch for unknown panels further down is unreachable.
Steps to reproduce
Found by code reading.
- Register a dashboard widget callback via
OCA.Dashboard.register('unknown-id', …). - Other widgets registered later are not rendered, and a TypeError is logged in the console.
Expected behavior
Unknown panels are skipped (with the existing error log) without affecting other widgets.
Nextcloud version
master
- Dominant language
- PHP
- Stars
- 37.7k
- Forks
- 5.4k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 585
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nextcloud/server
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
1. to develop bug feature: tags good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
1. to develop bug feature: federation
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
1. to develop bug feature: files feature: previews and thumbnails
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
1. to develop bug feature: sharing
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
All issues in nextcloud/server
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 1/5 Under an hour Newbie friendliness 91/100
nhrrob/nhrrob-secure#35 ·
-
area/tests type/bug when/soon
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day