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

JavaScript error when auto completion is open #14555

Closed
svivian opened this issue Aug 7, 2018 · 12 comments
Closed

JavaScript error when auto completion is open #14555

svivian opened this issue Aug 7, 2018 · 12 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 ui Issues relating to the user interface
Projects
Milestone

Comments

@svivian
Copy link
Contributor

svivian commented Aug 7, 2018

Steps to reproduce

  1. Go to a table and use Edit inline.
  2. Add a clause that uses a string, e.g. where field='abc'.
  3. Press Ctrl+Enter to run the query

Expected behaviour

The query should run with errors.

Actual behaviour

There is a JS error. I've sent an error report several times before but nothing has been fixed in many months. The exact error is:

Uncaught TypeError: Cannot read property 'removeChild' of null
    at Widget.close (show-hint.js?v=4.8.2:307)
    at Completion.close (show-hint.js?v=4.8.2:75)
    at show-hint.js?v=4.8.2:268

Part of the issue is that the autocomplete popup is showing in the first place. When I type =' it pops up with suggestions for fields etc, but I've just opened a string so none of that applies. And it still doesn't go away even as I type (i.e. nothing matches but it's still suggesting stuff) and close the string. Here's a screenshot of the issue occurring on the demo server:

pma-autocomplete-bug

The bug appears to happen when you type out the full field name and don't press tab to autocomplete it.

Server configuration

Operating system: both Mac & Linux
Web server: Apache & demo server
Database: MySQL 5.6
PHP version: 7.1 (localhost) & 7.2.6-1+0~20180611145758.22+stretch~1.gbpe20e8b (demo server)
phpMyAdmin version: 4.8.2

Client configuration

Browser: Chrome 67
Operating system: Mac

@asthemus
Copy link

if no one else is working on this, I would like someone to assign me this issue
also, I am new to phpmyadmin contributors community so some help on codebase would be great.

@shucon
Copy link
Contributor

shucon commented Aug 15, 2018

@ashraysinha6069 go ahead 😄

@ibennetch
Copy link
Member

@ashraysinha6069 You're welcome to begin work — announcing your intention here is enough (since we can't assign issues to people who aren't part of the organization in GitHub).

I don't really know where to begin working on this particular issue, but if you have general workflow questions you can ask here, on the mailing list, or in Gitter. Questions about the implementation or finding the right section of code are probably best asked right here, so as to keep discussion all in the same place.

@williamdes
Copy link
Member

@ashraysinha6069 Are you still working on this issue ?
Maybe this issue can also be fixed #14475 ?

@williamdes williamdes added Bug A problem or regression with an existing feature ui Issues relating to the user interface labels Nov 27, 2018
@williamdes
Copy link
Member

Param Value
Error Type TypeError
Error Message Cannot read property 'removeChild' of null
Exception Type js
phpMyAdmin version 4.8.4
Incident count 2016
Link Report#54262

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

@williamdes
Copy link
Member

williamdes commented Jan 29, 2019

To Reproduce

Steps to reproduce the behavior:

  1. Go to a database world on demo servers
  2. Go to 'Sql`
  3. Type SELECT 1 FROM City
  4. Hint ctrl+enter when hint shows up, seems to do the error using the first hint

Reproduced on demo servers (root, no password)

Error

Uncaught TypeError: Cannot read property 'removeChild' of null
    at Widget.close (show-hint.js?v=5.0.0-dev:307)
    at Completion.close (show-hint.js?v=5.0.0-dev:75)
    at show-hint.js?v=5.0.0-dev:268

@williamdes williamdes self-assigned this Mar 27, 2019
@williamdes
Copy link
Member

Another codemirror issue.., will open an issue and make a PR on the codemirror repo some day.
If somebody has time to do so, go ahead and leave a comment :)

@williamdes williamdes removed their assignment Mar 30, 2019
@williamdes williamdes added the waiting on upstream Issues blocked by a third-party label Mar 30, 2019
@williamdes williamdes added this to n/a priority in issues Apr 29, 2019
@williamdes
Copy link
Member

Param Value
Error Type TypeError
Error Message Cannot read property 'removeChild' of null
Exception Type js
phpMyAdmin version 4.9.0.1
Incident count 32
Link Report#58110

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

@williamdes
Copy link
Member

@williamdes
Copy link
Member

Hi @nina-py
Since you already contributed to CodeMirror would you like to fix this issue ?

@nina-py
Copy link
Contributor

nina-py commented Sep 30, 2020

Hi @williamdes, I'll give it a go!

@nina-py
Copy link
Contributor

nina-py commented Oct 5, 2020

I can't reproduce it on a standalone CodeMirror editor. This is a pretty elusive error - I can only reproduce this bug in Chrome, not Firefox (on Linux), and only intermittently. There must be something, somewhere though - this only happens when the editor gets torn down on form submission. I'll dig deeper when I have time.

@williamdes williamdes moved this from n/a priority to Waiting on upstream in issues Oct 22, 2020
@williamdes williamdes self-assigned this Mar 20, 2021
@williamdes williamdes added this to the 5.1.1 milestone Mar 20, 2021
williamdes added a commit that referenced this issue Mar 20, 2021
Signed-off-by: William Desportes <williamdes@wdes.fr>
@williamdes williamdes added has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete and removed waiting on upstream Issues blocked by a third-party labels Mar 20, 2021
issues automation moved this from Waiting on upstream to Closed Mar 21, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 2022
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 ui Issues relating to the user interface
Projects
issues
  
Closed
Development

No branches or pull requests

6 participants