Skip to content

Uncaught TypeError: Cannot read properties of undefined (reading 'value') and Undefined index: pred_hostname #17547

Open
@liviuconcioiu

Description

Describe the bug

It happens when you edit privileges for a user account on a specific database. Also, a few more notices were given, which can be seen on the second video.

To Reproduce

Steps to reproduce the behavior:

  1. Edit privileges for a user account on a specific database
  2. Click on 'Go'
  3. See error

Expected behavior

No error should be given.

Screenshots

22.05.2022_18.24.16_REC.mp4
22.05.2022_18.20.25_REC.mp4

Server configuration

  • Operating system: Linux
  • Web server: nginx/1.14.2
  • Database version: 8.0.18 - MySQL Community Server - GPL
  • PHP version: 7.4.29
  • phpMyAdmin version: 5.2.2-dev, 6.0.0-dev

Client configuration

  • Browser: Chrome/101.0.4951.67
  • Operating system: Windows 10

Additional context

tracekit.js?v=5.3.0-dev:342 Uncaught TypeError: Cannot read properties of undefined (reading 'value')
    at HTMLFormElement.handleEvent (privileges.js:444:39)
    at HTMLFormElement.newFunc (error_report.js:247:33)
    at HTMLFormElement.dispatch (jquery.min.js?v=5.3.0-dev:2:43064)
    at HTMLFormElement.v.handle (jquery.min.js?v=5.3.0-dev:2:41048)
Notice in ./libraries/classes/Server/Privileges.php#2566

 Undefined index: pred_hostname
Backtrace

PrivilegesController.php#220: PhpMyAdmin\Server\Privileges->addUser(
NULL,
string '',
string '',
string '*6E1D683C148B73830421F1D93529DC187CF45107',
boolean false,
)
Routing.php#189: PhpMyAdmin\Controllers\Server\PrivilegesController->__invoke(
,
array,
)
index.php#44: PhpMyAdmin\Routing::callControllerForRoute(
,
string '/server/privileges',
,
,
)
Notice in ./libraries/classes/Server/Privileges.php#2566

 Undefined index: pred_hostname
Backtrace

PrivilegesController.php#220: PhpMyAdmin\Server\Privileges->addUser(
NULL,
string '',
string '',
string '*6E1D683C148B73830421F1D93529DC187CF45107',
boolean false,
)
Routing.php#189: PhpMyAdmin\Controllers\Server\PrivilegesController->__invoke(
,
array,
)
index.php#44: PhpMyAdmin\Routing::callControllerForRoute(
,
string '/server/privileges',
,
,
)
Notice in ./libraries/classes/Server/Privileges.php#3545

 Undefined index: pred_password
Backtrace

Privileges.php#2612: PhpMyAdmin\Server\Privileges->getSqlQueriesForDisplayAndAddUser(
string '',
string '',
string '*6E1D683C148B73830421F1D93529DC187CF45107',
)
PrivilegesController.php#220: PhpMyAdmin\Server\Privileges->addUser(
NULL,
string '',
string '',
string '*6E1D683C148B73830421F1D93529DC187CF45107',
boolean false,
)
Routing.php#189: PhpMyAdmin\Controllers\Server\PrivilegesController->__invoke(
,
array,
)
index.php#44: PhpMyAdmin\Routing::callControllerForRoute(
,
string '/server/privileges',
,
,
)
Notice in ./libraries/classes/Server/Privileges.php#3548

 Undefined index: pred_password
Backtrace

Privileges.php#2612: PhpMyAdmin\Server\Privileges->getSqlQueriesForDisplayAndAddUser(
string '',
string '',
string '*6E1D683C148B73830421F1D93529DC187CF45107',
)
PrivilegesController.php#220: PhpMyAdmin\Server\Privileges->addUser(
NULL,
string '',
string '',
string '*6E1D683C148B73830421F1D93529DC187CF45107',
boolean false,
)
Routing.php#189: PhpMyAdmin\Controllers\Server\PrivilegesController->__invoke(
,
array,
)
index.php#44: PhpMyAdmin\Routing::callControllerForRoute(
,
string '/server/privileges',
,
,
)
Notice in ./libraries/classes/Server/Privileges.php#3559

 Undefined index: pma_pw
Backtrace

Privileges.php#2612: PhpMyAdmin\Server\Privileges->getSqlQueriesForDisplayAndAddUser(
string '',
string '',
string '*6E1D683C148B73830421F1D93529DC187CF45107',
)
PrivilegesController.php#220: PhpMyAdmin\Server\Privileges->addUser(
NULL,
string '',
string '',
string '*6E1D683C148B73830421F1D93529DC187CF45107',
boolean false,
)
Routing.php#189: PhpMyAdmin\Controllers\Server\PrivilegesController->__invoke(
,
array,
)
index.php#44: PhpMyAdmin\Routing::callControllerForRoute(
,
string '/server/privileges',
,
,
)
Notice in ./libraries/classes/Server/Privileges.php#2660

 Undefined index: username
Backtrace

PrivilegesController.php#220: PhpMyAdmin\Server\Privileges->addUser(
NULL,
string '',
string '',
string '*6E1D683C148B73830421F1D93529DC187CF45107',
boolean false,
)
Routing.php#189: PhpMyAdmin\Controllers\Server\PrivilegesController->__invoke(
,
array,
)
index.php#44: PhpMyAdmin\Routing::callControllerForRoute(
,
string '/server/privileges',
,
,
)

Metadata

Assignees

No one assigned

    Labels

    BugA problem or regression with an existing featureaffects/5.2This issue or pull-request affects 5.2.x releases (and maybe further versions)affects/6.0This issue or pull-request affects 6.0.x releases (and maybe further versions)confirmed/5.2This issue is confirmed to be reproduced on 5.2 at the time this label was setconfirmed/6.0This issue is confirmed to be reproduced on 6.0 at the time this label was set

    Type

    Projects

    • Status

      Needs triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions