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

Table grouping doesn't work #15777

Open
ibennetch opened this issue Jan 11, 2020 · 21 comments
Open

Table grouping doesn't work #15777

ibennetch opened this issue Jan 11, 2020 · 21 comments
Labels
affects/5.2 This issue or pull-request affects 5.2.x releases (and maybe further versions) affects/6.0 This issue or pull-request affects 6.0.x releases (and maybe further versions) Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Projects

Comments

@ibennetch
Copy link
Member

Using 4.9.4 or master, the table level grouping feature doesn't work.

To reproduce, you need a database with several tables, the default separator is __ (two underscores), such as table__1, table__2, table__3.

Expected behavior:
image

Actual behavior:
image

Git bisect tells me 24f1cb2 is the first bad commit

Author: Madhura Jayaratne <madhura.cj@gmail.com>
Date:   Fri Jun 5 09:54:31 2015 +0530

    rfe #1634 Don't group tables in tree if the result has only one group

    Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>

In that case, 4.5.0 would be the first affected version.

@williamdes
Copy link
Member

@ibennetch is that a duplicate of #12817 ?

@williamdes williamdes added the Bug A problem or regression with an existing feature label Jan 11, 2020
@williamdes williamdes added this to Needs triage in issues via automation Jan 11, 2020
@williamdes williamdes moved this from Needs triage to Reproduced in issues Jan 11, 2020
@ibennetch
Copy link
Member Author

I think it's not a duplicate of the reported issue, because that's about database grouping when no other databases are shown, and this relates to the table level. It does seem to be the same as the comment at #12817 (comment), though.

@thesmallstar
Copy link
Contributor

@ibennetch Can I work on this?

@williamdes
Copy link
Member

@thesmallstar Yes, you can work on this issue

@thesmallstar
Copy link
Contributor

Should I work on master Branch?

@thesmallstar
Copy link
Contributor

thesmallstar commented Jan 12, 2020

@ibennetch This is rather a feature, though not needed. it was added so that no grouping is done if there is only one group, that might make sense in some cases.
Have a look at this,
image

When I add one more table that does not belong to this group or increase the number of groups.
image

Check line 761 in NavigationTree.php
Removing this would solve the issue.

// rfe #1634 Don't group if there's only one group and no other items
        if (count($prefixes) === 1) {
            $keys = array_keys($prefixes);
            $key = $keys[0];
            if ($prefixes[$key] == count($node->children) - 1) {
                unset($prefixes[$key]);
            }
        }
```






@thesmallstar
Copy link
Contributor

@williamdes I am considering this a bug then not a feature, Which branch should I work on?

@williamdes
Copy link
Member

@thesmallstar please use QA_5_0

@williamdes williamdes added the has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete label Jan 14, 2020
@williamdes
Copy link
Member

williamdes commented Jan 14, 2020

https://sourceforge.net/p/phpmyadmin/feature-requests/1634/

24f1cb2 (in 4.5.0.0)

http://phpmyadmin150.rssing.com/chan-30024075/all_p8.html

[...]
On the new features front, rfe #1634 was discussed during the last IRC meeting and received the green light to be implemented. This rfe requested not to group items in the navigation panel when there is only a single group and no other items or groups in a particular sub tree.

[...]

Feature requests implemented
#1634 Don't group tables in tree if the result has only one group
[...]

@ibennetch this is the history I found

So, bug or feature ?

@williamdes
Copy link
Member

@williamdes
Copy link
Member

"09:27 < Marc9> Not grouping here would be inconsistent and we would get a RFE to bring it back"

Years later here we are.

cc @lem9

@williamdes
Copy link
Member

cc @OlafvdSpek

@OlafvdSpek
Copy link

Haha, isn't it ironic @ibennetch was in that IRC meeting too? ;) FYI I wasn't.
Is grouping really not working or is it working as intended (i.e. don't group when there's only one group)?

@ibennetch
Copy link
Member Author

ibennetch commented Jan 14, 2020 via email

@thesmallstar
Copy link
Contributor

@OlafvdSpek it is working as intended i.e don't group when there's only one group

@williamdes
Copy link
Member

@OlafvdSpek since you did the feature request, do you want to remove the feature ?

IMO I would not remove it since not grouping looks nicer but on another hand having a group is what I would expect so I would remove it.

So "I’m torn" too

@OlafvdSpek
Copy link

No, of course I don't want to remove it. ;)
Having only one group just doesn't make sense..

@thesmallstar
Copy link
Contributor

@williamdes @OlafvdSpek as @ibennetch said, if we do not remove it should we document it or show a tool tip?

@williamdes
Copy link
Member

3rd option for me: add a configuration override

I agree for the documentation, maybe in FAQ?

@OlafvdSpek
Copy link

IMO it's low priority, I'd focus on other issues.

@williamdes williamdes moved this from Reproduced to n/a priority in issues Jan 15, 2020
@IlyasMohetna
Copy link

Please follow these steps to resolve your problem :

1 - Locate the file config.inc.php for phpmyadmin configuration
2 - Search for $cfg['Servers'][$i]['table_coords']
3 - Under the line you found put this line of code: $cfg['Servers'][$i]['table_group'] = 'group_';

Let me know if it worked!

@williamdes williamdes added affects/5.2 This issue or pull-request affects 5.2.x releases (and maybe further versions) affects/6.0 This issue or pull-request affects 6.0.x releases (and maybe further versions) labels May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects/5.2 This issue or pull-request affects 5.2.x releases (and maybe further versions) affects/6.0 This issue or pull-request affects 6.0.x releases (and maybe further versions) Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Projects
issues
  
n/a priority
Development

No branches or pull requests

5 participants