1 Replies - 327 Views - Last Post: 09 September 2017 - 02:18 AM Rate Topic: -----

#1 jlis  Icon User is offline

  • D.I.C Head

Reputation: 13
  • View blog
  • Posts: 222
  • Joined: 02-February 15

Phpmyadmin DB Design 'fatal JS error has occurred...'

Posted 09 September 2017 - 01:31 AM

Hello,

I'm running a Apache web server with PHPmyadmin.

I've created 2 tables in a DB, 1 called 'Menu' and the other called 'Type'.

The 'menu' table has a column called 'Type', and the 'Type' table has just an 'ID' and a Column called 'Type' also (which is Unique).

In the Designer tab within PHPmyadmin, I'm trying to create a relation between the 2 tables, I want the Type on the menu table to be populated by what ever is stored in the Type table.

When I create the link and click save I get the error: "A fatal Javascript error has occurred. Would you like to send an error report?".

Inside the Show report details this is what shows:

{
    "exception": {
        "mode": "onerror",
        "message": "TypeError: null is not an object (evaluating 'myWin.document')",
        "stack": [
            {
                "line": 16,
                "func": "PrintXML",
                "context": [
                    "{",
                    "    var $root = $(data).find('root');",
                    "    if ($root.length === 0) {",
                    "        // error",
                    "        var myWin = window.open('', 'Report', 'width=400, height=250, resiz//...",
                    "        var tmp = myWin.document;",
                    "        tmp.write(data);",
                    "        tmp.close();",
                    "    } else {",
                    "        // success",
                    "        if ($root.attr('act') == 'save_pos') {"
                ],
                "filename": "pmd/ajax.js"
            }
        ],
        "useragent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.1.2 Safari/603.3.8",
        "name": "TypeError",
        "uri": "pmd_general.php?target="
    },
    "script_name": "pmd_general.php",
    "pma_version": "4.2.12deb2+deb8u2",
    "browser_name": "SAFARI",
    "browser_version": "10.1.2",
    "user_os": "Mac",
    "server_software": "Apache/2.4.10 (Raspbian)",
    "user_agent_string": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.1.2 Safari/603.3.8",
    "locale": "en",
    "configuration_storage": "enabled",
    "php_version": "7.0.20-1~bpo8+1",
    "microhistory": {
        "pages": [
            {
                "hash": "tbl_replace.php?db=Spice_Central&table=Type&server=1&target=&token=98ae8dc217252dbada82ee8371f9a564",
                "params": {
                    "opendb_url": "db_structure.php",
                    "safari_browser": "1",
                    "querywindow_height": "400",
                    "querywindow_width": "600",
                    "collation_connection": "utf8mb4_general_ci",
                    "lang": "en",
                    "server": "1",
                    "text_dir": "ltr",
                    "pma_text_default_tab": "Browse",
                    "pma_text_left_default_tab": "Structure",
                    "confirm": "true"
                }
            },
            {
                "hash": "sql.php?db=Spice_Central&table=Type&server=1&target=&token=98ae8dc217252dbada82ee8371f9a564",
                "params": {
                    "opendb_url": "db_structure.php",
                    "safari_browser": "1",
                    "querywindow_height": "400",
                    "querywindow_width": "600",
                    "collation_connection": "utf8mb4_general_ci",
                    "lang": "en",
                    "server": "1",
                    "text_dir": "ltr",
                    "pma_text_default_tab": "Browse",
                    "pma_text_left_default_tab": "Structure",
                    "confirm": "true"
                }
            },
            {
                "hash": "sql.php?db=Spice_Central&table=Valid_Postcode_Areas&server=1&target=&token=98ae8dc217252dbada82ee8371f9a564",
                "params": {
                    "opendb_url": "db_structure.php",
                    "safari_browser": "1",
                    "querywindow_height": "400",
                    "querywindow_width": "600",
                    "collation_connection": "utf8mb4_general_ci",
                    "lang": "en",
                    "server": "1",
                    "text_dir": "ltr",
                    "pma_text_default_tab": "Browse",
                    "pma_text_left_default_tab": "Structure",
                    "confirm": "true"
                }
            },
            {
                "hash": "sql.php?db=Spice_Central&table=Menu&server=1&target=&token=98ae8dc217252dbada82ee8371f9a564",
                "params": {
                    "opendb_url": "db_structure.php",
                    "safari_browser": "1",
                    "querywindow_height": "400",
                    "querywindow_width": "600",
                    "collation_connection": "utf8mb4_general_ci",
                    "lang": "en",
                    "server": "1",
                    "text_dir": "ltr",
                    "pma_text_default_tab": "Browse",
                    "pma_text_left_default_tab": "Structure",
                    "confirm": "true"
                }
            },
            {
                "hash": "tbl_row_action.php?db=Spice_Central&table=Menu&server=1&target=&token=98ae8dc217252dbada82ee8371f9a564",
                "params": {
                    "opendb_url": "db_structure.php",
                    "safari_browser": "1",
                    "querywindow_height": "400",
                    "querywindow_width": "600",
                    "collation_connection": "utf8mb4_general_ci",
                    "lang": "en",
                    "server": "1",
                    "text_dir": "ltr",
                    "pma_text_default_tab": "Browse",
                    "pma_text_left_default_tab": "Structure",
                    "confirm": "true"
                }
            },
            {
                "hash": "db_structure.php?db=Spice_Central&table=&server=1&target=&token=98ae8dc217252dbada82ee8371f9a564",
                "params": {
                    "opendb_url": "db_structure.php",
                    "safari_browser": "1",
                    "querywindow_height": "400",
                    "querywindow_width": "600",
                    "collation_connection": "utf8mb4_general_ci",
                    "lang": "en",
                    "server": "1",
                    "text_dir": "ltr",
                    "pma_text_default_tab": "Browse",
                    "pma_text_left_default_tab": "Structure",
                    "confirm": "true"
                }
            },
            {
                "hash": "pmd_general.php?db=Spice_Central&table=&server=1&target=&token=98ae8dc217252dbada82ee8371f9a564",
                "params": {
                    "opendb_url": "db_structure.php",
                    "safari_browser": "1",
                    "querywindow_height": "400",
                    "querywindow_width": "600",
                    "collation_connection": "utf8mb4_general_ci",
                    "lang": "en",
                    "server": "1",
                    "text_dir": "ltr",
                    "pma_text_default_tab": "Browse",
                    "pma_text_left_default_tab": "Structure",
                    "confirm": "true"
                }
            }
        ],
        "current_index": "7"
    }
}



Is This A Good Question/Topic? 0
  • +

Replies To: Phpmyadmin DB Design 'fatal JS error has occurred...'

#2 jlis  Icon User is offline

  • D.I.C Head

Reputation: 13
  • View blog
  • Posts: 222
  • Joined: 02-February 15

Re: Phpmyadmin DB Design 'fatal JS error has occurred...'

Posted 09 September 2017 - 02:18 AM

Managed to find a work around by going to the 'relationship view' section and selecting each relation from a drop down menu. Not sure why the Designer drag and drop way won't work though.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1