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

When come from Quick Links section, add new user it append showadduser=1 to the URL permanent #18878

Open
peterhashair opened this issue Mar 3, 2022 · 2 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.

Comments

@peterhashair
Copy link
Contributor

peterhashair commented Mar 3, 2022

Expected Behavior

When I am doing add user to invite user request. I found.
After you click to add a new user from the Quick Links section, it appends showadduser=1 to the URL permanent, which causes you to land on the add new user page when you click the user menu item.

Current Behavior

General.settings.-.Administration.-.Matomo.mp4

atomo.mp4

Possible Solution

Steps to Reproduce (for Bugs)

Context

Your Environment

  • Matomo Version:
  • PHP Version:
  • Server Operating System:
  • Additionally installed plugins:
  • Browser:
  • Operating System:
@peterhashair peterhashair added the Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. label Mar 3, 2022
@peterhashair peterhashair changed the title After click add user, if won After click add user, if won't back to user dashboard, unless you click cancel Mar 3, 2022
@peterhashair peterhashair changed the title After click add user, if won't back to user dashboard, unless you click cancel When come from Quick Links section, add new user it append showadduser=1 to the URL permanent Mar 3, 2022
@peterhashair peterhashair reopened this Mar 3, 2022
@sgiehl
Copy link
Member

sgiehl commented Mar 4, 2022

I guess this is more global problems. Any query parameters that are appended on a page might be passed through everywhere. Same can be seen with &update=1 when updating something.

@tsteur
Copy link
Member

tsteur commented Mar 7, 2022

@peterhashair that be a simple fix if I see this right like

diff --git a/plugins/UsersManager/Menu.php b/plugins/UsersManager/Menu.php
index 9cb3f9372c..0c7a16bdca 100644
--- a/plugins/UsersManager/Menu.php
+++ b/plugins/UsersManager/Menu.php
@@ -16,7 +16,7 @@ class Menu extends \Piwik\Plugin\Menu
     public function configureAdminMenu(MenuAdmin $menu)
     {
         if (Piwik::isUserHasSomeAdminAccess() && UsersManager::isUsersAdminEnabled()) {
-            $menu->addSystemItem('UsersManager_MenuUsers', $this->urlForAction('index'), $order = 15);
+            $menu->addSystemItem('UsersManager_MenuUsers', $this->urlForAction('index', ['showadduser'=>false]), $order = 15);
         }
 
         if (Piwik::hasUserSuperUserAccess() && API::getInstance()->getSitesAccessFromUser('anonymous')) {

@tsteur tsteur added Bug For errors / faults / flaws / inconsistencies etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. and removed Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. labels Mar 7, 2022
@tsteur tsteur added this to the 4.10.0 milestone Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.
Projects
None yet
Development

No branches or pull requests

4 participants