Welcome to the nuBuilder Forums!
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Javascript error when adding a new record
Re: Javascript error when adding a new record
No, just tried creating a record. How strange.
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4516
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 76 times
- Been thanked: 515 times
- Contact:
Re: Javascript error when adding a new record
Try using the latest nuform.js from Github. (Download it, replace your local one and log in again into nuBuilder)
Re: Javascript error when adding a new record
Wait, I missed that the error is now different:
Uncaught Error: Syntax error, unrecognized expression: #
Uncaught Error: Syntax error, unrecognized expression: #
Re: Javascript error when adding a new record
Perhaps a fresh installation of nuBuilder is in order?
-
- nuBuilder Team
- Posts: 4516
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 76 times
- Been thanked: 515 times
- Contact:
Re: Javascript error when adding a new record
Uncaught Error: Syntax error, unrecognized expression: #
at I.error (jquery-3.7.1.min.js:2:11769)
at Y (jquery-3.7.1.min.js:2:17234)
at re (jquery-3.7.1.min.js:2:20008)
at ce.I [as find] (jquery-3.7.1.min.js:2:7520)
at ce.fn.init.find (jquery-3.7.1.min.js:2:21991)
at new ce.fn.init (jquery-3.7.1.min.js:2:22483)
at ce (jquery-3.7.1.min.js:2:1077)
at nuSetBrowseColumns (nuform.js?ts=20250926074140:4948:46)
at nuDragTitleEvents (nucommon.js?ts=20250926074140
2)
at nuBuildForm (nuform.js?ts=20250926074140:146:2)
Explanation
Understanding the problem
This error message, Syntax error, unrecognized expression: #, indicates that jQuery is attempting to select an element using a CSS selector that is just #. This is an invalid selector because the # symbol in CSS is used to target an element by its ID, and it must be followed by the ID string. When used alone, jQuery doesn't know what element to select, resulting in a syntax error.
Based on the provided stack trace, the issue appears to be originating from the nuSetBrowseColumns function within your nuform.js file. This function is likely receiving or constructing a selector that is just # and passing it to a jQuery function like find() or $(...), causing the error. This can sometimes happen with libraries or frameworks that dynamically build selectors, particularly when dealing with elements that might have empty or missing href or data-target attributes [1].
Suggested fix
Review the nuSetBrowseColumns function in nuform.js. Specifically, look for instances where jQuery is being used to select an element, and check the value of the selector being used. Ensure that any selector starting with # is followed by a valid element ID. If you are dynamically generating the selector, add a check to ensure that the ID is not empty or null before using it in the jQuery selector.
at I.error (jquery-3.7.1.min.js:2:11769)
at Y (jquery-3.7.1.min.js:2:17234)
at re (jquery-3.7.1.min.js:2:20008)
at ce.I [as find] (jquery-3.7.1.min.js:2:7520)
at ce.fn.init.find (jquery-3.7.1.min.js:2:21991)
at new ce.fn.init (jquery-3.7.1.min.js:2:22483)
at ce (jquery-3.7.1.min.js:2:1077)
at nuSetBrowseColumns (nuform.js?ts=20250926074140:4948:46)
at nuDragTitleEvents (nucommon.js?ts=20250926074140
at nuBuildForm (nuform.js?ts=20250926074140:146:2)
Explanation
Understanding the problem
This error message, Syntax error, unrecognized expression: #, indicates that jQuery is attempting to select an element using a CSS selector that is just #. This is an invalid selector because the # symbol in CSS is used to target an element by its ID, and it must be followed by the ID string. When used alone, jQuery doesn't know what element to select, resulting in a syntax error.
Based on the provided stack trace, the issue appears to be originating from the nuSetBrowseColumns function within your nuform.js file. This function is likely receiving or constructing a selector that is just # and passing it to a jQuery function like find() or $(...), causing the error. This can sometimes happen with libraries or frameworks that dynamically build selectors, particularly when dealing with elements that might have empty or missing href or data-target attributes [1].
Suggested fix
Review the nuSetBrowseColumns function in nuform.js. Specifically, look for instances where jQuery is being used to select an element, and check the value of the selector being used. Ensure that any selector starting with # is followed by a valid element ID. If you are dynamically generating the selector, add a check to ensure that the ID is not empty or null before using it in the jQuery selector.
-
- nuBuilder Team
- Posts: 4516
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 76 times
- Been thanked: 515 times
- Contact:
Re: Javascript error when adding a new record
Try placing your Custom Code in the 'Edit' field instead of using 'Browse & Edit'