By Richard Moore on Sunday, 28 December 2014
Posted in General Issues
Replies 18
Likes 0
Views 1.1K
Votes 0
I'm getting this error message

Warning: json_decode() expects parameter 1 to be string, array given in /home/mysite/public_html/administrator/components/com_easysocial/includes/json/json.php on line 62


It's being displayed when I look any individual message on my Kunena forum. More specifically it appears in the user area to the left of the body text and above the avatar. Apart from that the forum seems to work fine so I'm thinking a problem between Kunena and ES.

ES code referenced is this

	public function decode( $data )
{
if( empty( $data ) )
{
return false;
}

$pattern = '#^\s*//.+$#m';
$data = preg_replace( $pattern , '' , $data );

$result = json_decode( $data );

return $result;
}


Line 11 (62)
Hello Richard,

I am really sorry for the delay of this reply as it is a weekend for us here. It seems like the "data" that is stored within Kunena could be messed up. Is it possible for you to provide us with the back end and FTP access to your site to check on this issue?
·
Sunday, 28 December 2014 01:59
·
0 Likes
·
0 Votes
·
0 Comments
·
I should add everything seems to be working fine except for the display of the error message. I suspect something is not being displayed but I can't work out what (obviously).

Details attached.
·
Sunday, 28 December 2014 04:23
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Richard,

I am really sorry for the delay of this reply as it is a weekend for us here. I can't seem to login to the site with the provided login credentials. Can you please advise?
·
Monday, 29 December 2014 02:25
·
0 Likes
·
0 Votes
·
0 Comments
·
See note in details section of this reply - sorry about that
·
Monday, 29 December 2014 03:04
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Richard,

Hm, it's still not working. I can access the administration area but after entering the username and password, it's not working
·
Monday, 29 December 2014 12:10
·
0 Likes
·
0 Votes
·
0 Comments
·
Please notes in hidden area
·
Tuesday, 30 December 2014 01:10
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks, the back end works now but ftp is still not working
·
Tuesday, 30 December 2014 01:32
·
0 Likes
·
0 Votes
·
0 Comments
·
I'm not usually this unreliable...

See attached for confirmation - just tried it with Filezilla using quick entry at top of app
·
Tuesday, 30 December 2014 02:21
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Richard,

I've fixed it for you in ../plugins/kunena/easysocial/profile.php. Hope this helps.
·
Tuesday, 30 December 2014 11:58
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for that - I now seem to have a forum category corrupted so would like to know what you did. No need to get too technical but I'd like some idea.
·
Wednesday, 31 December 2014 04:41
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Richard,

What I did was changing this part to the updated code. http://screen.stackideas.com/2014-12-31_1114.png . This is the new way of getting the birthday date which is previously, we are using json code. Can you please try to replace the attached file in ../plugins/kunena/easysocial/profile.php and see how it goes?
·
Wednesday, 31 December 2014 11:19
·
0 Likes
·
0 Votes
·
0 Comments
·
No - the forum category in question is still bust and oddly enough it's a date format issue that is causing the problem. When I try to open messages in one specific category I get a date related error and a 403? See in the notes for more details but this is the error code. Please note it is only this category and all the messages in are quite old compared with new messages which open fine.

Error: 0 - DateTime::__construct() [datetime.--construct]: Failed to parse time string ({"year":"1957","month":"10","day":"23"}) at position 0 ({): Unexpected character



Mmmm - on closer inspection I'm wondering if it's the user that's the problem. When I try to login to ES using the ES user profile that created those posts I get an immediate 403 access denied.

Now fixed. Unlocking the forum category and tightening up some permissions seems to have done it. Not sure why it went awol...
·
Thursday, 01 January 2015 00:15
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Richard,

I can't seem to reproduce the errors when I access http://www.brinsfordlodge.co.uk/forum/block-business/13-registration-process.html . How can I reproduce those errors?
·
Thursday, 01 January 2015 14:32
·
0 Likes
·
0 Votes
·
0 Comments
·
Your colleague Nik and I have fixed them that's why

I'm good thanks.
·
Friday, 02 January 2015 05:07
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Richard,

Glad that you have fixed it.
·
Friday, 02 January 2015 10:19
·
0 Likes
·
0 Votes
·
0 Comments
·
Now I have the error.
Does anybody remember how it was solved?


http://www.psychopragmatik.de/forum/system-spiegel/401-arbeit-am-inneren-kind-beziehung#1899




All the best, Julian!
·
Friday, 09 January 2015 08:32
·
0 Likes
·
0 Votes
·
0 Comments
·
The JSON error required a code update which Nik Faris did on my site. I never found out exactly what it was he did. I suspect something was changed in the ES codebase which caused a problem for the interface app to Kunena.
·
Friday, 09 January 2015 08:41
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Julian,

I am sorry for the late reply.
I believe this issue is already being addressed in the latest kunena plugin. Here I have attached to you kunena plugin, can you download it and install it in the Extension Manager.

By the way, you also can download it from our site here: http://stackideas.com/apps/item/1-kunena .

Hope this will help.
Thanks.
·
Friday, 09 January 2015 18:51
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post