By Scott A Collier on Sunday, 29 October 2017
Posted in Technical Issues
Likes 0
Views 677
Votes 0
When viewing a page, I am getting the following javascript error:


Uncaught SyntaxError: Unexpected token }


After doing some research, I this is being caused in components/com_easysocial/themes/wireframe/helpers/user/user.suggest.js. In particular, line 39:

"showMore": <?php echo $showMore; ?>

$showMore seems to be null so the javascript being generated is:


EasySocial.ajax('site/views/friends/suggestList', {
"limit": 10,
"showMore": }).done(function(htmlContent) {
wrapper.replaceWith(htmlContent);
})


which causes the error. I temporarily solved this by changing <?php echo $showMore; ?> to <?php echo $showMore ?: true; ?>. But, not sure if this is the best solution.
Hey Scott,

Can you try this file instead and let me know how this goes?
·
Sunday, 29 October 2017 00:31
·
0 Likes
·
0 Votes
·
0 Comments
·
That works. Thanks for the quick reply.
·
Sunday, 29 October 2017 15:33
·
0 Likes
·
0 Votes
·
0 Comments
·
You are most welcome Scott
·
Sunday, 29 October 2017 15:34
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post