Skip to content

fix: unused routing parameters, and related usage - #5604

Open
madbob wants to merge 1 commit into
nextcloud:mainfrom
madbob:fix_routing_parameters
Open

fix: unused routing parameters, and related usage#5604
madbob wants to merge 1 commit into
nextcloud:mainfrom
madbob:fix_routing_parameters

Conversation

@madbob

@madbob madbob commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Navigating the app in dev mode, the JS console is filled with warnings like:

[Vue Router warn]: Discarded invalid param(s) "selectedGroup" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.

I've investigated a bit, and I've found that selectedGroup has been introduced in the routing parameters in a0a80c9 to fix #4090.

With the migration to Vue3, and the upgrade of vue-router, unused routing parameters are discarded by the router (as described here), and the changes introduced in a0a80c9 broke again.

So I have mostly reverted that commit, and introduced a different approach to select how and when display the "Import Contacts" buttons.

Accidentally, this also fix #5257

@hamza221 hamza221 added bug Something isn't working 3. to review Waiting for reviews labels Jul 30, 2026
@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/views/Contacts.vue 0.00% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@GVodyanov GVodyanov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! Thanks for looking into this

One issue though, in newContact():

if (this.selectedCircle) {                                                                                                                                       
    emit('contacts:circles:append', this.selectedCircle.id)                                                                                                      

selectedCircle comes from RouterMixin as $route.params.selectedCircle, so it's the circle id string, not a Circle model — .id is undefined. This
was latent before because isCirclesView never evaluated true, but switching the guard to selectedCircle makes the branch reachable. The result is
MemberList setting pickerCircle = undefined and addMembersToCircle({ circleId: undefined }) failing with "There was an issue adding members to the team".

Should just be:

emit('contacts:circles:append', this.selectedCircle)                                                                                                             

So basically when clicking on "add member" on a teams page the adding doesn't work.

Signed-off-by: Roberto Guido <info@madbob.org>
@madbob
madbob force-pushed the fix_routing_parameters branch from 08bb339 to 0cb678b Compare August 6, 2026 19:54
@madbob

madbob commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Oops... I totally missed that...
Fixed now.

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

Labels

3. to review Waiting for reviews bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot add new contact when team is selected "Import contacts" button shows in navigation when a team is selected

3 participants