-
AuthorPosts
-
March 3, 2021 at 10:20 am #1284976
Hi
If I add a new menu-item with a URI fragment it breaks JavaScipt on the whole webpage.
This is an example of a link that breaks JavaScript:
https://kvaskjer.hallingdal.no/#/search/what%255B%255D%3Dall%26where%255B%255D%3Dnesbyen%26when%3Dfromtoday%26q%3D/The is the error in DevTools:
Uncaught Error: Syntax error, unrecognized expression: #searchwhat%255B%255D%3Dall%26where%255B%255D%3Dnesbyen%26when%3Dfromtoday%26q%3D
at Function.se.error (jquery.min.js?ver=3.5.1:formatted:566)
at se.tokenize (jquery.min.js?ver=3.5.1:formatted:989)
at se.select (jquery.min.js?ver=3.5.1:formatted:1044)
at Function.se (jquery.min.js?ver=3.5.1:formatted:299)
at Function.s.find (jquery-migrate.min.js?ver=3.3.2:2)
at S.fn.init.find (jquery.min.js?ver=3.5.1:formatted:1158)
at s.fn.init.S.fn.init (jquery.min.js?ver=3.5.1:formatted:1179)
at new s.fn.init (jquery-migrate.min.js?ver=3.3.2:2)
at S (jquery.min.js?ver=3.5.1:formatted:55)
at HTMLAnchorElement.<anonymous> (avia-footer-scripts-2535a365c290632ba50b5d1e2fdc7978—5f52781c95c5a.js:formatted:161)- This topic was modified 3 years, 8 months ago by bjornoss.
March 3, 2021 at 8:37 pm #1285138Hey bjornoss,
I could not reach the website and yes, that link should be removed or changed somehow.
Best regards,
VictoriaMarch 5, 2021 at 11:54 am #1285693Thanks for the reply
The site should be available, could you try again?
The link is a valid URL and should not break the website.
Where can I report the bug to be fixed?March 5, 2021 at 7:29 pm #1285890Hi bjornoss,
It is a jQuery limitation, we cannot really fix this bug.
Best regards,
VictoriaMarch 6, 2021 at 4:17 pm #1286076Sure you can.
You can check if the link is a on the same domain as the local site.
If it is, then check the fragment.Or even easier, check if the fragment contains slash or other “invalid” jQuery ID characters before checking if the element exists.
March 9, 2021 at 10:57 am #1286664Any update on this?
March 10, 2021 at 2:20 pm #1287116Hi bjornoss,
We apologize for the delayed response.
Please use a URL shortener like https://bitly.com/ to convert the link and make it usable without causing any issues.Best regards,
Nikko -
AuthorPosts
- You must be logged in to reply to this topic.