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

Wrong Absolute Links In Navigation ("/" instead of "./") #16698

Closed
AJK-Muc opened this issue Mar 2, 2021 · 2 comments · Fixed by #16714
Closed

Wrong Absolute Links In Navigation ("/" instead of "./") #16698

AJK-Muc opened this issue Mar 2, 2021 · 2 comments · Fixed by #16714
Assignees
Labels
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
Milestone

Comments

@AJK-Muc
Copy link

AJK-Muc commented Mar 2, 2021

Describe the bug

With or without defined PmaAbsoluteUri ($cfg['PmaAbsoluteUri'] = 'https://' . $_SERVER['SERVER_NAME'] . '/mysql_latest/';) I got the wrong navigation links on the left menu (see screenshot of the source code in browser). Only the link to a new database is correct (index.php?...), all other links to existing databases are wrong (/?...) I guess instead of (./?...). Where can I change this strange behavior, i.e. changing [slash] with [dot][slash] in href of the pma_navigation_tree_content?

To Reproduce

As soon as I log in (/mysql_latest/), any link in the navigation translates to href="/?..." instead of href="./?..." or href="[absolute or relative URL defined by PmaAbsoluteUri]?..." which makes phpMyAdmin 5.1.0 unusable for me 😢

Expected behavior

Correct links to the expected functions.

Screenshots

SourceCodeScreenshot

Server configuration

  • Operating system: Ubuntu 20.04.2 LTS (GNU/Linux 5.4.0-66-generic x86_64)
  • Web server: Apache 2.4.46
  • Database version: MySQL 5.7.33
  • PHP version: PHP 7.4.15
  • phpMyAdmin version: 5.1.0

Client configuration

  • Browser: Safari 13.1.2 & Firefox 86.0 & Chrome 88.0.4324.192
  • Operating system: MacOS 10.13.6
@csware
Copy link
Contributor

csware commented Mar 4, 2021

The reason is that Util::getUrlForOption($target, $location')' returns null.

In my config.ing.php I have cfg['DefaultTabDatabase'] = 'db_structure.php';, this seems to be the reason here. However, commenting this line in the config file or changing this option in the config does not fix the issue. However, I found this setting on m,y user setting on the phpMyAdmin database.

Fix was to add case 'db_structure.php': to the abovementioned function.

Please add a smooth upgrade path as this does not only affect the server side config, but also the configs of the users stored in the databse or localstorage etc... Therefore; I consider this a regression.

csware added a commit to csware/phpmyadmin that referenced this issue Mar 4, 2021
cf. issue phpmyadmin#16698.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
csware added a commit to csware/phpmyadmin that referenced this issue Mar 4, 2021
cf. issue phpmyadmin#16698.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
csware added a commit to csware/phpmyadmin that referenced this issue Mar 4, 2021
cf. issue phpmyadmin#16698.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
csware added a commit to csware/phpmyadmin that referenced this issue Mar 4, 2021
…DefaultTabTable, NavigationTreeDefaultTabTable and NavigationTreeDefaultTabTable2

Fixes issue phpmyadmin#16698.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
csware added a commit to csware/phpmyadmin that referenced this issue Mar 4, 2021
cf. issue phpmyadmin#16698.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
@williamdes williamdes added this to the 5.1.1 milestone Mar 4, 2021
@williamdes williamdes added 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 labels Mar 4, 2021
@williamdes williamdes added this to Needs triage in issues via automation Mar 4, 2021
@williamdes williamdes moved this from Needs triage to Reproduced in issues Mar 4, 2021
@AJK-Muc
Copy link
Author

AJK-Muc commented Mar 5, 2021

Thanks 😃

williamdes added a commit to csware/phpmyadmin that referenced this issue Mar 5, 2021
Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit to csware/phpmyadmin that referenced this issue Mar 5, 2021
Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit to csware/phpmyadmin that referenced this issue Mar 5, 2021
Signed-off-by: William Desportes <williamdes@wdes.fr>
@williamdes williamdes self-assigned this Mar 5, 2021
williamdes added a commit that referenced this issue Mar 5, 2021
…ltTabDatabase, DefaultTabTable, NavigationTreeDefaultTabTable and NavigationTreeDefaultTabTable2

Fixes: #16698
Fixes: #16713

Pull-request: #16714

Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Mar 5, 2021
Signed-off-by: William Desportes <williamdes@wdes.fr>
issues automation moved this from Reproduced to Closed Mar 5, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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
  
Closed
3 participants