unsupported pseudo: 546252

unsupported pseudo: 546252

hodoninskahodoninska Posts: 12Questions: 2Answers: 0
edited September 29 in Free community support

I have been getting Uncaught Error: Syntax error, unrecognized expression: unsupported pseudo: 546252 when I return to a page within my application that contains a DataTable. The only way I could get the page to work was by closing the page and opening the application again in a new tab/window which suggested to me that it was an issue with the session data.

I didn't think it was a DataTables issue at first as the error is being thrown within the JQuery code and I found a number of references to this problem which suggested it might be something to do with using an invalid selector containing a colon.

When I checked the session data I found that the for the select extension the id of the selected row(s) contained a colon (e.g. a:546252).

The use of a colon in the row id was an arbitrary (and inconsistent) choice. Everywhere else in the application a hyphen is used, so I've changed the code and resolved the issue. However, you might like to code a fix to the select extension as it was not easy to track down!

For completeness this is the error stack:
jquery.min.js:2 Uncaught Error: Syntax error, unrecognized expression: unsupported pseudo: 546252
at se.error (jquery.min.js:2:13606)
at PSEUDO (jquery.min.js:2:16675)
at Ee (jquery.min.js:2:20856)
at se.compile (jquery.min.js:2:21750)
at se.select (jquery.min.js:2:22965)
at se (jquery.min.js:2:7089)
at se.matches (jquery.min.js:2:12929)
at S.filter (jquery.min.js:2:24739)
at D (jquery.min.js:2:24590)
at S.fn.init.filter (jquery.min.js:2:25100)

And this is what was being stored in the session data:
{
"rows": [
"#a:546252"
],
"columns": [],
"cells": []
}

Replies

  • allanallan Posts: 65,162Questions: 1Answers: 10,796 Site admin

    Hi,

    Thanks for the write up and good to hear you have a solution. A colon is a CSS pseudo selector, so when using querySelectorAll or jQuery, such a song would trigger such a selector, and an unknown pseudo selector with those strings, hence the error.

    I'll look at what options I have here, however allowing pseudo selector is extremely useful, so I can't just escape the colon character.

    Allan

Sign In or Register to comment.