Phpmyadmin: Cannot manually input data in a foreign key field

Created on 8 Dec 2017  路  3Comments  路  Source: phpmyadmin/phpmyadmin

Steps to reproduce

Two related issues.

  1. Browse a table where a field has a foreign key to another table.
  2. Double click a NULL cell to change it.
  3. Type anything while the dropdown is loading. Once it loads the box will go blank again.
  4. Type in a known value instead of using the dropdown.
  5. Press Enter or click outside the field.

Expected behaviour

At step 3, I expect the field to keep what I put in.
At step 5, I expect the value to be saved in the database.

Actual behaviour

At step 3, the box goes blank (actually reverts to its initial value) once the dropdown has loaded.
At step 5, it's not updated and the field stays NULL (as if I have pressed Escape).

Server configuration

Operating system: Ubuntu
Web server: Nginx
Database: MySQL 5.7.20
PHP version: 7.0.22
phpMyAdmin version: 4.7.6

Client configuration

Browser: Chrome 62.0.3202.94
Operating system: Mac

bug help wanted ui

Most helpful comment

This is still an issue in the most recent version of PMA (4.8.3). For the first bug (step 3 above) I see two solutions:

  • Don't change the field once loaded.
  • Don't show the text field at all while it's loading (or at least, make it disabled).

Looking at it now, I'm guessing this is the same mechanic as for long strings, where you have "The contents of the fiel..." shown in the box while the full text is loaded? In which case, it makes no sense to have en editable field there in either case. I think the best option is simply to show the loading gif and nothing else, until everything is ready to be displayed.


The second bug (step 5 above) appears to be due to the "Null" checkbox being ticked. When I select an option from the dropdown, the checkbox is unticked, but that doesn't happen when typing in the field.

All 3 comments

This is still an issue in the most recent version of PMA (4.8.3). For the first bug (step 3 above) I see two solutions:

  • Don't change the field once loaded.
  • Don't show the text field at all while it's loading (or at least, make it disabled).

Looking at it now, I'm guessing this is the same mechanic as for long strings, where you have "The contents of the fiel..." shown in the box while the full text is loaded? In which case, it makes no sense to have en editable field there in either case. I think the best option is simply to show the loading gif and nothing else, until everything is ready to be displayed.


The second bug (step 5 above) appears to be due to the "Null" checkbox being ticked. When I select an option from the dropdown, the checkbox is unticked, but that doesn't happen when typing in the field.

Can anyone please elaborate how to reproduce this ?

Tested in 5.0.1 and the bug has been fixed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

williamdes picture williamdes  路  3Comments

KDCinfo picture KDCinfo  路  3Comments

OlafvdSpek picture OlafvdSpek  路  3Comments

viking1972 picture viking1972  路  3Comments

fliespl picture fliespl  路  3Comments