Menu

#599 [MySQL] Database JS error blocks database statistics

Git
closed-fixed
nobody
frontend (1)
5
2018-02-22
2018-02-21
Knut Kohl
No

In database overview

MySQL » localhost:/var/run/mysqld/mysqld.sock » Datenbank: a_database_name_here

for table type, counts and so on, the ? will not be replaced by the values because of a JS error:

Uncaught DOMException: Failed to execute 'querySelector' on 'Document': '#Comment-@ log (info)' is not a valid selector.

This comes from at least the space in my view name, it is realy "@ log (info)" :-)

The DOM ids should be build in a "save" manner of the table/view name like this

id = "#Comment" + ("-" + TableOrViewName).replace(/\W+/g, "-").replace(/-+$/g, "");

https://jsfiddle.net/09L9tbv6/9/

Discussion

  • Jakub Vrána

    Jakub Vrána - 2018-02-22
    • status: open --> closed-fixed
     
  • Jakub Vrána

    Jakub Vrána - 2018-02-22

    Fixed by using [id=""] selector with escaping instead. The proposed ID replacement would make it non-unique.

     
  • Knut Kohl

    Knut Kohl - 2018-02-22

    Thanks, you are right.

     

Log in to post a comment.

MongoDB Logo MongoDB