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

JS Exception "PMA_makegrid is not defined" on index.php when clicking a table name #14299

Closed
BarthDELUY opened this issue May 16, 2018 · 17 comments
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 help wanted
Projects
Milestone

Comments

@BarthDELUY
Copy link

BarthDELUY commented May 16, 2018

Steps to reproduce

  1. Connect to PMA
  2. After a few minutes, click on a table name on the left sidebar (we are trying to narrow the situation to get the exact steps to reproduce)

Expected behaviour

Default page for this table should open

Actual behaviour

JS Exception "PMA_makegrid is not defined" is thrown. All links stop working, left panel turns white if you click on another table's name or on a top menu link icon. Error occurs on two different servers, with the same software configuration (OS, Apache, PHP, MySQL, PMA versions).
Only solution is to close the tab and reconnect.
This error never occured on Linux or Windows workstations (yet?), only on our 2 developers Mac laptops on Chrome. They started appearing when we switched to phpMyAdmin 4.8.0.0 installed from source the week before version 4.8.0.1 was released, and was not fixed in 4.8.0.1 (I upgraded again the day after 4.8.0.1 was released)
The error did not occur on our previous installation (phpMyAdmin 4.2.12-2+deb8u2 from debian repositories).

Server configuration

Operating system: Debian 8

Web server: Apache 2.4.10

Database: Mysql 5.5.59

PHP version: 5.6.33 via PHP-FPM

phpMyAdmin version: 4.8.0.1

Theme : metro

Client configuration

Browser: Chrome 66

Operating system: Mac OS X

Edit: complete error (click me):

{
    "pma_version": "4.8.0.1",
    "browser_name": "CHROME",
    "browser_version": "66.0.3359.117",
    "user_os": "Mac",
    "server_software": "Apache/2.4.10 (Debian)",
    "user_agent_string": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36",
    "locale": "fr",
    "configuration_storage": "enabled",
    "php_version": "5.6.33-0+deb8u1",
    "exception_type": "js",
    "exception": {
        "mode": "stack",
        "name": "ReferenceError",
        "message": "PMA_makegrid is not defined",
        "stack": [
            {
                "line": "292",
                "func": "",
                "uri": "index.php?v=4.8.0.1",
                "scriptname": "index.php"
            },
            {
                "func": "HTMLTableElement.",
                "line": "330",
                "column": "13",
                "uri": "index.php?v=4.8.0.1",
                "scriptname": "index.php"
            },
            {
                "func": "Function.each",
                "line": "2",
                "column": "2573",
                "uri": "index.php?v=4.8.0.1",
                "scriptname": "index.php"
            },
            {
                "func": "jQuery.fn.init.each",
                "line": "2",
                "column": "1240",
                "uri": "index.php?v=4.8.0.1",
                "scriptname": "index.php"
            },
            {
                "func": "HTMLDivElement.",
                "line": "329",
                "column": "29",
                "uri": "index.php?v=4.8.0.1",
                "scriptname": "index.php"
            },
            {
                "func": "HTMLDivElement.new_func",
                "line": "248",
                "column": "33",
                "uri": "index.php?v=4.8.0.1",
                "scriptname": "index.php"
            },
            {
                "func": "HTMLDocument.dispatch",
                "line": "2",
                "column": "41772",
                "uri": "index.php?v=4.8.0.1",
                "scriptname": "index.php"
            },
            {
                "func": "HTMLDocument.$event.dispatch",
                "line": "374",
                "column": "19",
                "uri": "index.php?v=4.8.0.1",
                "scriptname": "index.php"
            },
            {
                "func": "HTMLDocument.y.handle",
                "line": "2",
                "column": "39791",
                "uri": "index.php?v=4.8.0.1",
                "scriptname": "index.php"
            },
            {
                "func": "Object.trigger",
                "line": "2",
                "column": "69551",
                "uri": "index.php?v=4.8.0.1",
                "scriptname": "index.php"
            },
            {
                "func": "HTMLDivElement.",
                "line": "2",
                "column": "70146",
                "uri": "index.php?v=4.8.0.1",
                "scriptname": "index.php"
            }
        ],
        "incomplete": "false",
        "partial": "true",
        "uri": "index.php?"
    },
    "script_name": "index.php",
    "microhistory": null
}

@BarthDELUY BarthDELUY changed the title JS Exception "PMA_makegrid is not defined" on homepage when clicking a table name on Chrome 66 on Mac OS X JS Exception "PMA_makegrid is not defined" on index.php when clicking a table name on Chrome 66 on Mac OS X May 16, 2018
@williamdes
Copy link
Member

@BarthDELUY @jizhidemowang Any idea on how to reproduce this step by step ?

@williamdes williamdes added the question Used when we need feedback from the submitter or when the issue is a question about PMA label Nov 27, 2018
@williamdes
Copy link
Member

williamdes commented Dec 1, 2018

Using 4.8.x

Details

{
    "pma_version": "4.8.4-dev",
    "browser_name": "CHROME",
    "browser_version": "70.0.3538.103",
    "user_os": "Linux",
    "server_software": "nginx/1.10.3",
    "user_agent_string": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.103 Safari/537.36 Vivaldi/2.1.1337.47",
    "locale": "fr",
    "configuration_storage": "enabled",
    "php_version": "7.2.9-1+0~20180910100512.5+stretch~1.gbpdaac35",
    "exception_type": "js",
    "exception": {
        "mode": "stack",
        "name": "ReferenceError",
        "message": "PMA_makegrid is not defined",
        "stack": [
            {
                "func": "HTMLTableElement.",
                "line": "338",
                "column": "13",
                "uri": "index.php?v=4.8.4-dev",
                "scriptname": "index.php"
            },
            {
                "func": "Function.each",
                "line": "2",
                "column": "2573",
                "uri": "index.php?v=4.8.4-dev",
                "scriptname": "index.php"
            },
            {
                "func": "jQuery.fn.init.each",
                "line": "2",
                "column": "1240",
                "uri": "index.php?v=4.8.4-dev",
                "scriptname": "index.php"
            },
            {
                "func": "HTMLDivElement.",
                "line": "337",
                "column": "29",
                "uri": "index.php?v=4.8.4-dev",
                "scriptname": "index.php"
            },
            {
                "func": "HTMLDivElement.new_func",
                "line": "248",
                "column": "33",
                "uri": "index.php?v=4.8.4-dev",
                "scriptname": "index.php"
            },
            {
                "func": "HTMLDocument.dispatch",
                "line": "2",
                "column": "41772",
                "uri": "index.php?v=4.8.4-dev",
                "scriptname": "index.php"
            },
            {
                "func": "HTMLDocument.$event.dispatch",
                "line": "374",
                "column": "19",
                "uri": "index.php?v=4.8.4-dev",
                "scriptname": "index.php"
            },
            {
                "func": "HTMLDocument.y.handle",
                "line": "2",
                "column": "39791",
                "uri": "index.php?v=4.8.4-dev",
                "scriptname": "index.php"
            },
            {
                "func": "Object.trigger",
                "line": "2",
                "column": "69551",
                "uri": "index.php?v=4.8.4-dev",
                "scriptname": "index.php"
            },
            {
                "func": "HTMLDivElement.",
                "line": "2",
                "column": "70146",
                "uri": "index.php?v=4.8.4-dev",
                "scriptname": "index.php"
            }
        ],
        "uri": "index.php?"
    },
    "script_name": "index.php",
    "microhistory": null
}

@williamdes williamdes added Bug A problem or regression with an existing feature and removed question Used when we need feedback from the submitter or when the issue is a question about PMA labels Dec 1, 2018
@williamdes williamdes changed the title JS Exception "PMA_makegrid is not defined" on index.php when clicking a table name on Chrome 66 on Mac OS X JS Exception "PMA_makegrid is not defined" on index.php when clicking a table name Dec 2, 2018
@williamdes
Copy link
Member

williamdes commented Dec 2, 2018

Details

{
    "pma_version": "4.8.4-dev",
    "browser_name": "CHROME",
    "browser_version": "70.0.3538.103",
    "user_os": "Linux",
    "server_software": "nginx/1.10.3",
    "user_agent_string": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.103 Safari/537.36 Vivaldi/2.1.1337.47",
    "locale": "en",
    "configuration_storage": "enabled",
    "php_version": "7.2.12-1+0~20181112102304.11+stretch~1.gbp55f215",
    "exception_type": "js",
    "exception": {
        "mode": "stack",
        "name": "ReferenceError",
        "message": "PMA_makegrid is not defined",
        "stack": [
            {
                "func": "HTMLTableElement.",
                "line": "338",
                "column": "13",
                "uri": "index.php?v=4.8.4-dev",
                "scriptname": "index.php"
            },
            {
                "func": "Function.each",
                "line": "2",
                "column": "2573",
                "uri": "index.php?v=4.8.4-dev",
                "scriptname": "index.php"
            },
            {
                "func": "jQuery.fn.init.each",
                "line": "2",
                "column": "1240",
                "uri": "index.php?v=4.8.4-dev",
                "scriptname": "index.php"
            },
            {
                "func": "HTMLDivElement.",
                "line": "337",
                "column": "29",
                "uri": "index.php?v=4.8.4-dev",
                "scriptname": "index.php"
            },
            {
                "func": "HTMLDivElement.new_func",
                "line": "248",
                "column": "33",
                "uri": "index.php?v=4.8.4-dev",
                "scriptname": "index.php"
            },
            {
                "func": "HTMLDocument.dispatch",
                "line": "2",
                "column": "41772",
                "uri": "index.php?v=4.8.4-dev",
                "scriptname": "index.php"
            },
            {
                "func": "HTMLDocument.$event.dispatch",
                "line": "374",
                "column": "19",
                "uri": "index.php?v=4.8.4-dev",
                "scriptname": "index.php"
            },
            {
                "func": "HTMLDocument.y.handle",
                "line": "2",
                "column": "39791",
                "uri": "index.php?v=4.8.4-dev",
                "scriptname": "index.php"
            },
            {
                "func": "Object.trigger",
                "line": "2",
                "column": "69551",
                "uri": "index.php?v=4.8.4-dev",
                "scriptname": "index.php"
            },
            {
                "func": "HTMLDivElement.",
                "line": "2",
                "column": "70146",
                "uri": "index.php?v=4.8.4-dev",
                "scriptname": "index.php"
            }
        ],
        "uri": "index.php?"
    },
    "script_name": "index.php",
    "microhistory": null
}

@williamdes williamdes added this to the 4.8.4 milestone Dec 2, 2018
@ibennetch ibennetch modified the milestones: 4.8.4, 4.8.5 Dec 11, 2018
@williamdes
Copy link
Member

Param Value
Error Type ReferenceError
Error Message PMA_makegrid is not defined
Exception Type js
phpMyAdmin version 4.8.4
Incident count 61
Link Report#54274

This comment is posted automatically by phpMyAdmin's error-reporting-server.

@williamdes
Copy link
Member

Param Value
Error Type ReferenceError
Error Message PMA_makegrid is not defined
Exception Type js
phpMyAdmin version 4.8.4
Incident count 2
Link Report#54527

This comment is posted automatically by phpMyAdmin's error-reporting-server.

@ibennetch ibennetch modified the milestones: 4.8.5, 4.8.6 Jan 26, 2019
@williamdes williamdes removed this from the 4.8.6 milestone Apr 1, 2019
@williamdes
Copy link
Member

while on "insert" page, with unfinished insertion I switched to "browse" page
Posed on reporting server

@williamdes williamdes added this to n/a priority in issues Apr 29, 2019
@williamdes
Copy link
Member

This issue is so hard to reproduce..
Please help me reproduce it or make a fix

@williamdes
Copy link
Member

Param Value
Error Type ReferenceError
Error Message PMA_makegrid is not defined
Exception Type js
phpMyAdmin version 4.9.0.1
Incident count 6
Link Report#58140

This comment is posted automatically by phpMyAdmin's error-reporting-server.

@williamdes
Copy link
Member

williamdes commented Jun 11, 2019

On sql.php?pos=0

scriptname: js/sql.js; line: 338; func: HTMLTableElement.; column: 13;

* triggered manually everytime the table of results is reloaded
 * @memberOf    jQuery
 */
$(document).on('makegrid', '.sqlqueryresults', function () {
    $('.table_results').each(function () {
        PMA_makegrid(this);
    });
});
 
/*
 * Attach a custom event for sticky column headings which will be

scriptname: js/sql.js; line: 337; func: HTMLDivElement.; column: 29;

* Attach the {@link makegrid} function to a custom event, which will be
 * triggered manually everytime the table of results is reloaded
 * @memberOf    jQuery
 */
$(document).on('makegrid', '.sqlqueryresults', function () {
    $('.table_results').each(function () {
        PMA_makegrid(this);
    });
});
 
/*

scriptname: js/vendor/jquery/jquery.event.drag-2.2.js; line: 374; func: HTMLDocument.$event.dispatch; column: 19;
scriptname: js/sql.js; line: 338; func: Anonymous function; column: 13;

* triggered manually everytime the table of results is reloaded
 * @memberOf    jQuery
 */
$(document).on('makegrid', '.sqlqueryresults', function () {
    $('.table_results').each(function () {
        PMA_makegrid(this);
    });
});
 
/*
 * Attach a custom event for sticky column headings which will be

scriptname: js/sql.js; line: 337; func: Anonymous function; column: 9;

* Attach the {@link makegrid} function to a custom event, which will be
 * triggered manually everytime the table of results is reloaded
 * @memberOf    jQuery
 */
$(document).on('makegrid', '.sqlqueryresults', function () {
    $('.table_results').each(function () {
        PMA_makegrid(this);
    });
});
 
/*

scriptname: js/vendor/jquery/jquery.event.drag-2.2.js; line: 374; func: $event.dispatch; column: 2;

@williamdes
Copy link
Member

Param Value
Error Type ReferenceError
Error Message makeGrid is not defined
Exception Type js
phpMyAdmin version 5.0.0-dev
Incident count 2
Link Report#58612

This comment is posted automatically by phpMyAdmin's error-reporting-server.

@williamdes
Copy link
Member

Still had it but could not reproduce it more than one time

@williamdes
Copy link
Member

williamdes commented Jan 3, 2020

After months, maybe years of trying to reproduce this issue I finally got a procedure:

cc @yashrajbothra can you please try to fix it ?

@yashrajbothra
Copy link
Contributor

yashrajbothra commented Jan 3, 2020

I have started working on the issue.I will try my best to fix it.

@williamdes
Copy link
Member

The demo server credentials are root and no password

@yashrajbothra
Copy link
Contributor

Thanks @williamdes

@yashrajbothra
Copy link
Contributor

Hey @williamdes which branch should i take as base?

@williamdes
Copy link
Member

@yashrajbothra QA_5_0 should be used as a base

yashrajbothra added a commit to yashrajbothra/phpmyadmin that referenced this issue Jan 4, 2020
Signed-off-by: Yash Bothra <yashrajbothra786@gmail.com>
@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 4, 2020
@williamdes williamdes self-assigned this Jan 6, 2020
williamdes added a commit that referenced this issue Jan 6, 2020
Signed-off-by: William Desportes <williamdes@wdes.fr>
issues automation moved this from n/a priority to Closed Jan 6, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 6, 2021
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 help wanted
Projects
issues
  
Closed
Development

No branches or pull requests

4 participants