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

A SyntaxError is thrown when editing a row #16816

Closed
liviuconcioiu opened this issue Apr 12, 2021 · 18 comments · Fixed by #17407
Closed

A SyntaxError is thrown when editing a row #16816

liviuconcioiu opened this issue Apr 12, 2021 · 18 comments · Fixed by #17407
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

@liviuconcioiu
Copy link
Contributor

Describe the bug

A SyntaxError is thrown when editing a row from performance_schema.events_stages_summary_global_by_event_name.

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://demo.phpmyadmin.net/master-config/index.php?route=/sql&server=2&db=performance_schema&table=events_stages_summary_global_by_event_name&pos=0
  2. Edit any row from EVENT_NAME column
  3. See error

Screenshots

error10

Client configuration

  • Browser: Firefox
  • Operating system: Windows

Additional context

{
    "pma_version": "5.2.0-dev",
    "browser_name": "FIREFOX",
    "browser_version": "88.0",
    "user_os": "Win",
    "server_software": "nginx/1.14.2",
    "user_agent_string": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0",
    "locale": "en",
    "configuration_storage": "disabled",
    "php_version": "7.4.14",
    "script_name": "index.php",
    "exception_type": "js",
    "exception": {
        "mode": "stack",
        "name": "SyntaxError",
        "message": "JSON.parse: unexpected character at line 1 column 1 of the JSON data",
        "stack": [
            {
                "func": "postEditedCell/<",
                "line": "1241",
                "column": "35",
                "context": [
                    "        if (typeof whereClause === 'undefined') {",
                    "          whereClause = '';",
                    "        }",
                    "",
                    "        fullWhereClause.push(whereClause);",
                    "        var conditionArray = JSON.parse($tr.find('.condition_array').val());",
                    "        /**",
                    "         * multi edit variables, for current row",
                    "         * @TODO array indices are still not correct, they should be md5 of//...",
                    "         */",
                    ""
                ],
                "uri": "js/dist/makegrid.js?v=5.2.0-dev",
                "scriptname": "js/dist/makegrid.js"
            },
            {
                "func": "each",
                "line": "2",
                "column": "3003",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "each",
                "line": "2",
                "column": "1481",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "postEditedCell",
                "line": "1232",
                "column": "51",
                "context": [
                    "      if (!isUnique) {",
                    "        alert(g.alertNonUnique);",
                    "      } // loop each edited row",
                    "",
                    "",
                    "      $(g.t).find('td.to_be_saved').parents('tr').each(function () {",
                    "        var $tr = $(this);",
                    "        var whereClause = $tr.find('.where_clause').val();",
                    "",
                    "        if (typeof whereClause === 'undefined') {",
                    "          whereClause = '';"
                ],
                "uri": "js/dist/makegrid.js?v=5.2.0-dev",
                "scriptname": "js/dist/makegrid.js"
            },
            {
                "func": "saveOrPostEditedCell",
                "line": "1559",
                "column": "15",
                "context": [
                    "        if (saved) {",
                    "          // Check if this function called from 'move' functions",
                    "          if (options !== undefined && options.move) {",
                    "            g.postEditedCell(options);",
                    "          } else {",
                    "            g.postEditedCell();",
                    "          } // need_to_post is false",
                    "",
                    "        } else {",
                    "          // Check if this function called from 'move' functions",
                    "          if (options !== undefined && options.move) {"
                ],
                "uri": "js/dist/makegrid.js?v=5.2.0-dev",
                "scriptname": "js/dist/makegrid.js"
            },
            {
                "func": "startGridEditing",
                "line": "2002",
                "column": "13",
                "context": [
                    "     * Initialize grid editing feature.",
                    "     */",
                    "    initGridEdit: function initGridEdit() {",
                    "      function startGridEditing(e, cell) {",
                    "        if (g.isCellEditActive) {",
                    "          g.saveOrPostEditedCell();",
                    "        } else {",
                    "          g.showEditCell(cell);",
                    "        }",
                    "",
                    "        e.stopPropagation();"
                ],
                "uri": "js/dist/makegrid.js?v=5.2.0-dev",
                "scriptname": "js/dist/makegrid.js"
            },
            {
                "func": "initGridEdit/<",
                "line": "2091",
                "column": "27",
                "context": [
                    "          // this is a double click, cancel the single click timer",
                    "          // and make the click count 0",
                    "          clearTimeout($cell.data('timer'));",
                    "          $cell.data('clicks', 0); // start grid-editing",
                    "",
                    "          startGridEditing(e, this);",
                    "        }",
                    "      }).on('dblclick', function (e) {",
                    "        if ($(e.target).is('.grid_edit a')) {",
                    "          e.preventDefault();",
                    "        } else {"
                ],
                "uri": "js/dist/makegrid.js?v=5.2.0-dev",
                "scriptname": "js/dist/makegrid.js"
            },
            {
                "func": "newFunc",
                "line": "258",
                "column": "23",
                "context": [
                    "   */",
                    "  wrapFunction: function wrapFunction(func) {",
                    "    if (!func.wrapped) {",
                    "      var newFunc = function newFunc() {",
                    "        try {",
                    "          return func.apply(this, arguments);",
                    "        } catch (x) {",
                    "          TraceKit.report(x);",
                    "        }",
                    "      };",
                    ""
                ],
                "uri": "js/dist/error_report.js?v=5.2.0-dev",
                "scriptname": "js/dist/error_report.js"
            },
            {
                "func": "dispatch",
                "line": "2",
                "column": "43064",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "$event.dispatch",
                "line": "373",
                "column": "21",
                "context": [
                    "  $event.dispatch = function( event ){",
                    "  \tif ( $.data( this, \"suppress.\"+ event.type ) - new Date().getTime() > 0 ){",
                    "  \t\t$.removeData( this, \"suppress.\"+ event.type );",
                    "  \t\treturn;",
                    "  \t}",
                    "  \treturn $dispatch.apply( this, arguments );",
                    "  };",
                    "",
                    "  // event fix hooks for touch events...",
                    "  var touchHooks =",
                    "  $event.fixHooks.touchstart ="
                ],
                "uri": "js/vendor/jquery/jquery.event.drag-2.2.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.event.drag-2.2.js"
            },
            {
                "func": "add/v.handle",
                "line": "2",
                "column": "41048",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "EventListener.handleEvent*add",
                "line": "2",
                "column": "41515",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "jQuery.event.add",
                "line": "642",
                "column": "21",
                "context": [
                    "",
                    "\t// This misses the multiple-types case but that seems awfully rare",
                    "\tif ( elem === window && types === \"load\" && window.document.readyState ===//...",
                    "\t\tmigrateWarn( \"jQuery(window).on('load'...) called after load event occurr//...",
                    "\t}",
                    "\treturn oldEventAdd.apply( this, arguments );",
                    "};",
                    "",
                    "jQuery.each( [ \"load\", \"unload\", \"error\" ], function( _, name ) {",
                    "",
                    "\tjQuery.fn[ name ] = function() {"
                ],
                "uri": "js/vendor/jquery/jquery-migrate.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery-migrate.js"
            },
            {
                "func": "Ee/<",
                "line": "2",
                "column": "40109",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "each",
                "line": "2",
                "column": "3003",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "each",
                "line": "2",
                "column": "1481",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "Ee",
                "line": "2",
                "column": "40085",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "on",
                "line": "2",
                "column": "46578",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "wrapJqueryOnCallback/$.fn.on",
                "line": "304",
                "column": "20",
                "context": [
                    "          arguments[i] = ErrorReport.wrapFunction(arguments[i]);",
                    "          break;",
                    "        }",
                    "      }",
                    "",
                    "      return oldOn.apply(this, arguments);",
                    "    };",
                    "  },",
                    "",
                    "  /**",
                    "   * Wraps the callback in AJAX.registerOnload automatically"
                ],
                "uri": "js/dist/error_report.js?v=5.2.0-dev",
                "scriptname": "js/dist/error_report.js"
            },
            {
                "func": "initGridEdit",
                "line": "2050",
                "column": "37",
                "context": [
                    "",
                    "        if ($(e.target).is('.grid_edit a')) {",
                    "          e.preventDefault();",
                    "        }",
                    "      });",
                    "      $(g.t).find('td.data.click2').on('click', function (e) {",
                    "        var $cell = $(this); // In the case of relational link, We want sin//...",
                    "        // to goto the link and double click to start grid-editing.",
                    "",
                    "        var $link = $(e.target);",
                    ""
                ],
                "uri": "js/dist/makegrid.js?v=5.2.0-dev",
                "scriptname": "js/dist/makegrid.js"
            },
            {
                "func": "makeGrid",
                "line": "2229",
                "column": "7",
                "context": [
                    "    g.initColVisib();",
                    "  } // make sure we have the ajax class",
                    "",
                    "",
                    "  if (isGridEditEnabled && $(t).is('.ajax')) {",
                    "    g.initGridEdit();",
                    "  } // create tooltip for each <th> with draggable class",
                    "",
                    "",
                    "  Functions.tooltip($(t).find('th.draggable'), 'th', g.updateHint()); // re//...",
                    ""
                ],
                "uri": "js/dist/makegrid.js?v=5.2.0-dev",
                "scriptname": "js/dist/makegrid.js"
            },
            {
                "func": "?",
                "line": "422",
                "column": "15",
                "context": [
                    "   * @memberOf    jQuery",
                    "   */",
                    "",
                    "  $(document).on('makegrid', '.sqlqueryresults', function () {",
                    "    $('.table_results').each(function () {",
                    "      makeGrid(this);",
                    "    });",
                    "  });",
                    "  /**",
                    "   * Append the \"Show/Hide query box\" message to the query input form",
                    "   *"
                ],
                "uri": "js/dist/sql.js?v=5.2.0-dev",
                "scriptname": "js/dist/sql.js"
            },
            {
                "func": "each",
                "line": "2",
                "column": "3003",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "each",
                "line": "2",
                "column": "1481",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "?",
                "line": "421",
                "column": "25",
                "context": [
                    "   * triggered manually everytime the table of results is reloaded",
                    "   * @memberOf    jQuery",
                    "   */",
                    "",
                    "  $(document).on('makegrid', '.sqlqueryresults', function () {",
                    "    $('.table_results').each(function () {",
                    "      makeGrid(this);",
                    "    });",
                    "  });",
                    "  /**",
                    "   * Append the \"Show/Hide query box\" message to the query input form"
                ],
                "uri": "js/dist/sql.js?v=5.2.0-dev",
                "scriptname": "js/dist/sql.js"
            },
            {
                "func": "newFunc",
                "line": "258",
                "column": "23",
                "context": [
                    "   */",
                    "  wrapFunction: function wrapFunction(func) {",
                    "    if (!func.wrapped) {",
                    "      var newFunc = function newFunc() {",
                    "        try {",
                    "          return func.apply(this, arguments);",
                    "        } catch (x) {",
                    "          TraceKit.report(x);",
                    "        }",
                    "      };",
                    ""
                ],
                "uri": "js/dist/error_report.js?v=5.2.0-dev",
                "scriptname": "js/dist/error_report.js"
            },
            {
                "func": "dispatch",
                "line": "2",
                "column": "43064",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "$event.dispatch",
                "line": "373",
                "column": "21",
                "context": [
                    "  $event.dispatch = function( event ){",
                    "  \tif ( $.data( this, \"suppress.\"+ event.type ) - new Date().getTime() > 0 ){",
                    "  \t\t$.removeData( this, \"suppress.\"+ event.type );",
                    "  \t\treturn;",
                    "  \t}",
                    "  \treturn $dispatch.apply( this, arguments );",
                    "  };",
                    "",
                    "  // event fix hooks for touch events...",
                    "  var touchHooks =",
                    "  $event.fixHooks.touchstart ="
                ],
                "uri": "js/vendor/jquery/jquery.event.drag-2.2.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.event.drag-2.2.js"
            },
            {
                "func": "add/v.handle",
                "line": "2",
                "column": "41048",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "trigger",
                "line": "2",
                "column": "71515",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "trigger/<",
                "line": "2",
                "column": "72110",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "each",
                "line": "2",
                "column": "3003",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "each",
                "line": "2",
                "column": "1481",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "trigger",
                "line": "2",
                "column": "72086",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "?",
                "line": "1022",
                "column": "25",
                "context": [
                    "  });",
                    "  /**",
                    "   * create resizable table",
                    "   */",
                    "",
                    "  $('.sqlqueryresults').trigger('makegrid');",
                    "  /**",
                    "   * Check if there is any saved query",
                    "   */",
                    "",
                    "  if (codeMirrorEditor || document.sqlform) {"
                ],
                "uri": "js/dist/sql.js?v=5.2.0-dev",
                "scriptname": "js/dist/sql.js"
            },
            {
                "func": "dispatch",
                "line": "2",
                "column": "43064",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "$event.dispatch",
                "line": "373",
                "column": "21",
                "context": [
                    "  $event.dispatch = function( event ){",
                    "  \tif ( $.data( this, \"suppress.\"+ event.type ) - new Date().getTime() > 0 ){",
                    "  \t\t$.removeData( this, \"suppress.\"+ event.type );",
                    "  \t\treturn;",
                    "  \t}",
                    "  \treturn $dispatch.apply( this, arguments );",
                    "  };",
                    "",
                    "  // event fix hooks for touch events...",
                    "  var touchHooks =",
                    "  $event.fixHooks.touchstart ="
                ],
                "uri": "js/vendor/jquery/jquery.event.drag-2.2.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.event.drag-2.2.js"
            },
            {
                "func": "add/v.handle",
                "line": "2",
                "column": "41048",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "trigger",
                "line": "2",
                "column": "71515",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "trigger/<",
                "line": "2",
                "column": "72110",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "each",
                "line": "2",
                "column": "3003",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "each",
                "line": "2",
                "column": "1481",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "trigger",
                "line": "2",
                "column": "72086",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "fireOnload",
                "line": "131",
                "column": "17",
                "context": [
                    "   *",
                    "   * @return {void}",
                    "   */",
                    "  fireOnload: function fireOnload(file) {",
                    "    var eventName = 'onload_' + AJAX.hash(file);",
                    "    $(document).trigger(eventName);",
                    "",
                    "    if (this.debug) {",
                    "      // eslint-disable-next-line no-console",
                    "      console.log( // no need to translate",
                    "      'Fired event ' + eventName + ' for file ' + file);"
                ],
                "uri": "js/dist/ajax.js?v=5.2.0-dev",
                "scriptname": "js/dist/ajax.js"
            },
            {
                "func": "?",
                "line": "240",
                "column": "12",
                "context": [
                    "        AJAX.fireOnload('table/change.js');",
                    "      AJAX.fireOnload('vendor/stickyfill.min.js');",
                    "      AJAX.fireOnload('gis_data_editor.js');",
                    "      AJAX.fireOnload('multi_column_sort.js');",
                    "      AJAX.fireOnload('makegrid.js');",
                    "      AJAX.fireOnload('sql.js');",
                    "                    AJAX.fireOnload('console.js');",
                    "  });",
                    "// ]]>",
                    "</script>",
                    ""
                ],
                "uri": "index.php?route=%2Fsql",
                "scriptname": "index.php"
            },
            {
                "func": "e",
                "line": "2",
                "column": "30038",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "l/</t<",
                "line": "2",
                "column": "30340",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "setTimeout handler*l/<",
                "line": "2",
                "column": "30549",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "c",
                "line": "2",
                "column": "28327",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "fireWith",
                "line": "2",
                "column": "29072",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "fire",
                "line": "2",
                "column": "29108",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "c",
                "line": "2",
                "column": "28327",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "fireWith",
                "line": "2",
                "column": "29072",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "ready",
                "line": "2",
                "column": "32045",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "B",
                "line": "2",
                "column": "31824",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "EventListener.handleEvent*",
                "line": "2",
                "column": "32193",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "?",
                "line": "2",
                "column": "220",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "?",
                "line": "2",
                "column": "225",
                "context": [
                    "/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.o//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.2.0-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            }
        ],
        "incomplete": "false",
        "uri": "index.php?route=%2Fsql"
    }
}
@shucon
Copy link
Contributor

shucon commented Apr 13, 2021

I think the table should not have editable rows. @williamdes Thoughts?

@ibennetch
Copy link
Member

ibennetch commented Apr 13, 2021 via email

@williamdes williamdes added the Bug A problem or regression with an existing feature label Apr 13, 2021
@williamdes williamdes added this to Needs triage in issues via automation Apr 13, 2021
@williamdes williamdes moved this from Needs triage to Reproduced in issues Apr 13, 2021
@williamdes
Copy link
Member

I am quite sure I had this bug on 5.1 series, seems like something allowed all cells to be opened as a text field

fixing this bug will fix this one too

@shucon
Copy link
Contributor

shucon commented May 6, 2021

I am quite sure I had this bug on 5.1 series, seems like something allowed all cells to be opened as a text field

fixing this bug will fix this one too

I was unable to find a working version even in QA_4_6. I think it's a really old bug or it's been like this since forever.

@shucon
Copy link
Contributor

shucon commented May 6, 2021

Should we fix it just by not allowing editable rows in all tables of performance_schema, mysql and information_schema databases? Thoughts?

@williamdes
Copy link
Member

I am quite sure I had this bug on 5.1 series, seems like something allowed all cells to be opened as a text field
fixing this bug will fix this one too

I was unable to find a working version even in QA_4_6. I think it's a really old bug or it's been like this since forever.

Thanks for the research !
I agree for performance_schema and information_schema but not mysql
Also I am pretty sure this exists somewhere in the code base because we already handle some smart behaviors on system databases

@RichardValvonaUK
Copy link

At the top is also this: "Current selection does not contain a unique column. Grid edit, checkbox, Edit, Copy and Delete features are not available.".

In the error report, it has this line: "message": "JSON.parse: unexpected character at line 1 column 1 of the JSON

https://docs.phpmyadmin.net/en/latest/config.html#cfg_RowActionLinksWithoutUnique
Referring to the link above, this is the documentation on the main phpMyAdmin site. It mentions a configuration setting that disallows editing, copying and deleting on rows without a unique column. Double clicking on a cell invokes a JavaScript action that sets it to edit mode by replacing the cell's input tag with a textarea. The error doesn't just occur for cells within the EVENT_NAME column, it's happens in all of the columns.

The error in the error report could be the result of missing input-data in the Ajax call that's fired when the user hits "enter" to save the data. In the HTML generation, the dblclick event should not be assigned to the event which switches this cell to edit mode.

@williamdes
Copy link
Member

Hi @RichardValvonaUK
Thank you for the input on this issue
Are you using 5.1.1?

@RichardValvonaUK
Copy link

Nope. Mine is 4.5.4.1. However, the link provided in the OP's original post is online for everyone to see and a subdomain on the phpMyAdmin website: demo.phpmyadmin.net.

@williamdes
Copy link
Member

Nope. Mine is 4.5.4.1. However, the link provided in the OP's original post is online for everyone to see and a subdomain on the phpMyAdmin website: demo.phpmyadmin.net.

I bet you are using a Debian or Ubuntu install :)
In case you need: Wiki for install methods on Ubuntu/Debian
I understand this is a still active issue, I will assign it a milestone so we fix it quickly

@williamdes williamdes added this to the 5.1.2 milestone Jun 23, 2021
@RichardValvonaUK
Copy link

Nope. Mine is 4.5.4.1. However, the link provided in the OP's original post is online for everyone to see and a subdomain on the phpMyAdmin website: demo.phpmyadmin.net.

I bet you are using a Debian or Ubuntu install :)
In case you need: Wiki for install methods on Ubuntu/Debian
I understand this is a still active issue, I will assign it a milestone so we fix it quickly

I am, yes: Ubuntu. The fact you mention this suggests 4.5.4.1 is only available for these two platforms.

A milestone sounds like a plan. I'll see what else I can do.

@williamdes
Copy link
Member

The fact you mention this suggests 4.5.4.1 is only available for these two platforms.

Just checked on https://tracker.debian.org/pkg/phpmyadmin and you can probably upgrade your install since I was maybe not right, it does not look like an old packaged version ^^

@williamdes
Copy link
Member

Had a JS error when editing the results of SHOW STATUS LIKE 'Qcache%'; (and yes, it's a result you can not edit)

@RichardValvonaUK
Copy link

Had a JS error when editing the results of SHOW STATUS LIKE 'Qcache%'; (and yes, it's a result you can not edit)

Are you doing this using the online version or your own? I've forked and downloaded it to my system but I can see that the vendor folder isn't included in the repo which causes a load of errors.

I've just tested your query in the online version and it seems to be working as it should. Are you including the backticks? I wasn't but a JS error did appear when including them.

@williamdes
Copy link
Member

williamdes commented Jun 29, 2021

Had a JS error when editing the results of SHOW STATUS LIKE 'Qcache%'; (and yes, it's a result you can not edit)

Are you doing this using the online version or your own? I've forked and downloaded it to my system but I can see that the vendor folder isn't included in the repo which causes a load of errors.

I've just tested your query in the online version and it seems to be working as it should. Are you including the backticks? I wasn't but a JS error did appear when including them.

You need to use a version from the website like the latest 5.1 version in development (phpMyAdmin 5.1+snapshot) or run composer install on the git version

Note my message was for a request without backticks

@RichardValvonaUK
Copy link

I've done that but it was fraught with errors because of an absense of the vendor directory and the autoload php file.

@RichardValvonaUK
Copy link

Sorry. Misunderstood what you said. I forked the repository previously but now have downloaded your version and the vendor file is there.

@RichardValvonaUK
Copy link

Had a JS error when editing the results of SHOW STATUS LIKE 'Qcache%'; (and yes, it's a result you can not edit)

Are you doing this using the online version or your own? I've forked and downloaded it to my system but I can see that the vendor folder isn't included in the repo which causes a load of errors.
I've just tested your query in the online version and it seems to be working as it should. Are you including the backticks? I wasn't but a JS error did appear when including them.

You need to use a version from the website like the latest 5.1 version in development (phpMyAdmin 5.1+snapshot) or run composer install on the git version

Note my message was for a request without backticks

Going back to the original issue as posted by the OP, with phpMyAdmin 5.1.1 installed on my computer locally, the double-click issue on tables within the performance_schema database doesn't arise at all like it does with the online demo version. Assuming that the running code is identical on both systems, this suggests that it might be an issue with the underlying php version or MySQL rather than phpMyAdmin.

@williamdes williamdes modified the milestones: 5.1.2, 5.1.3 Jan 10, 2022
@ibennetch ibennetch modified the milestones: 5.1.3, 5.1.4 Feb 11, 2022
@MauricioFauth MauricioFauth added has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete and removed help wanted labels Feb 19, 2022
@MauricioFauth MauricioFauth linked a pull request Feb 19, 2022 that will close this issue
MauricioFauth added a commit that referenced this issue Feb 21, 2022
[ci skip]

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
issues automation moved this from Reproduced to Closed Feb 21, 2022
@MauricioFauth MauricioFauth self-assigned this Feb 21, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 22, 2023
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
Development

Successfully merging a pull request may close this issue.

6 participants