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

SQL Variable edit bug #16997

Closed
zlobniyshurik opened this issue Jul 8, 2021 · 4 comments
Closed

SQL Variable edit bug #16997

zlobniyshurik opened this issue Jul 8, 2021 · 4 comments
Assignees
Labels
Bug A problem or regression with an existing feature
Projects
Milestone

Comments

@zlobniyshurik
Copy link

zlobniyshurik commented Jul 8, 2021

Describe the bug

I have 3 servers in config.inc.php (Srv1|Srv2|Srv3). I can edit SQL variables for Srv1, but can not edit SQL variables for Srv2 and Srv3.
If I change server order in config.inc.php (for example Srv2|Srv1|Srv3), than I can edit variables for Srv2, but not for Srv1 & Srv3.

In short, I can edit variables only for first server in config.inc.php

To Reproduce

Steps to reproduce the behavior:

  1. Start phpmyadmin
  2. Select second or third server from list
  3. Select 'Variables'
  4. Press 'Edit' on any variable and got "Loading..." message

Server configuration

  • Operating system: CentOS 8.4
  • Web server: nginx/1.20.0
  • Database version: 10.5.11-MariaDB - MariaDB Server
  • PHP version: 8.08
  • phpMyAdmin version: 5.1.1-1.el8.remi

Client configuration

  • Browser: Firefox 89.0.2 (64bit)
  • Operating system: Fedora 34
@williamdes
Copy link
Member

Hi @zlobniyshurik !
Thank you for the detailed report

In short, I can edit variables only for first server in config.inc.php

Oh snap, seems like we missed this one

If you can apply this change on your js/dist/server/variables.js file

@@ -46,6 +46,7 @@ AJAX.registerOnload('server/variables.js', function () {
             var $msgbox = Functions.ajaxShowMessage(Messages.strProcessingRequest);
             $.post('index.php?route=/server/variables/set/' + encodeURIComponent(varName), {
                 'ajax_request': true,
+                'server': CommonParams.get('server'),
                 'varValue': $valueCell.find('input').val()
             }, function (data) {
                 if (data.success) {
@@ -73,7 +74,8 @@ AJAX.registerOnload('server/variables.js', function () {
         });
 
         $.get('index.php?route=/server/variables/get/' + encodeURIComponent(varName), {
-            'ajax_request': true
+            'ajax_request': true,
+            'server': CommonParams.get('server')
         }, function (data) {
             if (typeof data !== 'undefined' && data.success === true) {
                 var $links = $('<div></div>')

@williamdes williamdes self-assigned this Jul 8, 2021
@williamdes williamdes added the Bug A problem or regression with an existing feature label Jul 8, 2021
@williamdes williamdes added this to the 5.1.2 milestone Jul 8, 2021
@williamdes williamdes added this to Needs triage in issues via automation Jul 8, 2021
williamdes added a commit that referenced this issue Jul 8, 2021
Signed-off-by: William Desportes <williamdes@wdes.fr>
@zlobniyshurik
Copy link
Author

Sorry, the problem persists after installing the patch.

@williamdes
Copy link
Member

Sorry, the problem persists after installing the patch.

You have a cache issue, please check in private/anonymous browsing mode :)

@zlobniyshurik
Copy link
Author

Wow! It's working! :)

issues automation moved this from Needs triage to Closed Jul 8, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 9, 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
Projects
issues
  
Closed
Development

No branches or pull requests

2 participants