Skip to content

JS error on uncheck show all rows after page reload #16821

@williamdes

Description

@williamdes

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behavior:

  1. Go to a table
  2. Click on [ ] show all rows
  3. Reload the page
  4. Try to un-check the box
  5. JS error

Expected behavior

Uncheck the box

Server configuration

  • phpMyAdmin version: 5.1

Additional context

Found on the error reporting server and reproduced by reading the code

{
    "pma_version": "5.1.1-dev",
    "browser_name": "CHROME",
    "browser_version": "89.0.4389.114",
    "user_os": "Linux",
    "server_software": "nginx/1.19.9",
    "user_agent_string": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36",
    "locale": "fr",
    "configuration_storage": "enabled",
    "php_version": "8.0.1",
    "script_name": "index.php",
    "exception_type": "js",
    "exception": {
        "mode": "stack",
        "name": "TypeError",
        "message": "Sql.submitShowAllForm is not a function",
        "stack": [
            {
                "line": "292",
                "func": "",
                "context": [
                    "            if (lastException === ex) {",
                    "                processLastException();",
                    "            }",
                    "        }, (stack.incomplete ? 2000 : 0));",
                    "",
                    "        throw ex; // re-throw to propagate to the top level (and cause wind//...",
                    "    }",
                    "",
                    "    report.subscribe = subscribe;",
                    "    report.unsubscribe = unsubscribe;",
                    "    return report;"
                ],
                "uri": "js/vendor/tracekit.js?v=5.1.1-dev",
                "scriptname": "js/vendor/tracekit.js"
            },
            {
                "func": "HTMLInputElement.",
                "line": "717",
                "column": "11",
                "context": [
                    "    e.preventDefault();",
                    "    var $form = $(this).parents('form');",
                    "",
                    "    if (!$(this).is(':checked')) {",
                    "      // already showing all rows",
                    "      Sql.submitShowAllForm();",
                    "    } else {",
                    "      $form.confirm(Messages.strShowAllRowsWarning, $form.attr('action'), f//...",
                    "        Sql.submitShowAllForm();",
                    "      });",
                    "    }"
                ],
                "uri": "js/dist/sql.js?v=5.1.1-dev",
                "scriptname": "js/dist/sql.js"
            },
            {
                "func": "HTMLInputElement.newFunc",
                "line": "273",
                "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.1.1-dev",
                "scriptname": "js/dist/error_report.js"
            },
            {
                "func": "HTMLBodyElement.dispatch",
                "line": "2",
                "column": "43090",
                "context": [
                    "/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/l//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.1.1-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            },
            {
                "func": "HTMLBodyElement.$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.1.1-dev",
                "scriptname": "js/vendor/jquery/jquery.event.drag-2.2.js"
            },
            {
                "func": "HTMLBodyElement.v.handle",
                "line": "2",
                "column": "41074",
                "context": [
                    "/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/l//...",
                    "!function(e,t){\"use strict\";\"object\"==typeof module&&\"object\"==typeof modul//...",
                    ""
                ],
                "uri": "js/vendor/jquery/jquery.min.js?v=5.1.1-dev",
                "scriptname": "js/vendor/jquery/jquery.min.js"
            }
        ],
        "incomplete": "false",
        "partial": "true",
        "uri": "index.php?route=%2Fsql&pos=0"
    }
}

Metadata

Metadata

Assignees

Labels

BugA problem or regression with an existing featurehas-prAn issue that has a pull request pending that may fix this issue. The pull request may be incomplete

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions