Broken ajax links giving "unrecognized expression" error

36 views
Skip to first unread message

Ian W. Scott

unread,
Jul 9, 2014, 5:57:39 PM7/9/14
to web...@googlegroups.com
Some ajax links that used to work have just broken and I'm not sure where to start in debugging. The links target a load component on the page (using cid) and they have started throwing this error:

Syntax error, unrecognized expression: /paideia/plugin_listandedit/edit.load/word_forms/546?orderby=id&tablename=word_forms

The "unrecognized expression" is simply the url from the link. I've tried re-downloading the web2py source and updating web2py.js but neither seems to help. The only thing I've done that could have broken it is update to bootstrap3 using the package put together by Paolo Caruccio. But I don't know enough about web2py.js to guess where a conflict might lie.

Any suggestions?

Niphlod

unread,
Jul 10, 2014, 6:02:18 AM7/10/14
to web...@googlegroups.com
do this come up in the browser's console ? if yes, what line do they target of what js file ?

Ian W. Scott

unread,
Jul 10, 2014, 6:54:03 AM7/10/14
to web...@googlegroups.com
Yes, it's in the browser's console, and it's targeting jquery.js line 3.

Niphlod

unread,
Jul 10, 2014, 8:37:31 AM7/10/14
to web...@googlegroups.com
can you pack a minimal app to reproduce the issue ?

Ian W. Scott

unread,
Jul 10, 2014, 9:36:08 AM7/10/14
to web...@googlegroups.com
It'll take a bit of time, but I'll see what I can do.

Ian W. Scott

unread,
Jul 10, 2014, 10:01:35 AM7/10/14
to web...@googlegroups.com
I found the culprit! The links were in a list with the bootstrap classes "nav nav-tabs". Because of that the bootstrap js was trying to use the link url to show a tab, but it was the wrong format. The implementation of bootstrap tabs must have changed between versions 2 and 3 enough that my ajax links could work before but now choked the bootstrap js.

Maybe this is something we should keep in mind as people migrate from bootstrap 2 to 3.

Anyway, thanks for your willingness to help Niphlod.
Reply all
Reply to author
Forward
0 new messages