Skip to main content
Topic: Problem with likes (Read 1744 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Problem with likes

Hi there! I recently converted my forum from SMF to Elkarte (version 1.0.10 at the moment, but will be upgrading soon) and I've run into a bit of trouble with the Likes feature. When it's enabled and a user likes a post, it throws back the following error:

QuoteError in Likes

An Error Has Occurred : SyntaxError: JSON.parse: unexpected character at line 2 column 2 of the JSON data

What exactly would cause this problem? And how would one go about fixing it? Thanks in advance!

Re: Problem with likes

Reply #1

Hi @ladyquack and welcome.

That problem coud be quite a bit of things.
Would you mind sending me address of the forum and the log in data ofa test account?
Bugs creator.
Features destroyer.
Template killer.

Re: Problem with likes

Reply #2

Thanks!

And I’m sending that info to you now. :grinning:

Re: Problem with likes

Reply #3

hmm...
You have done some modifications to the code (for example I see you added a $codes = null in Subs.php to kill all the BBCodes, and just to mention, this is not really the best option, probably you should have just disabled the codes in the admin panel).
What other changes have you done?
Bugs creator.
Features destroyer.
Template killer.

Re: Problem with likes

Reply #4

Those are the only changes I've made. I could try taking them out and seeing if that does anything.

Re: Problem with likes

Reply #5

That could be a start, at least it would be possible to clean up the error log and see if there is anything related to the likes. :)
Bugs creator.
Features destroyer.
Template killer.

Re: Problem with likes

Reply #6

I cleaned up the files a little and that didn't do much.

However, I spotted a "likes" error in the error log pertaining to the database, so I checked it out. I installed a clean copy of the forum into a different directory to compare the databases, and it looks like the only difference between the two was that the cardinality in the "message_likes" structure on my forum was set to 1 for all. So I dropped the table and imported a fresh copy and now likes are working. xDD

Re: Problem with likes

Reply #7

hmm... okay... Dunno what happened.
Bugs creator.
Features destroyer.
Template killer.