News:

Join the Facebook Fan Page.

Main Menu

malformed JSON

Started by JayH1119, May 09, 2023, 08:19:59 PM

Previous topic - Next topic

JayH1119

Having upgraded from 2.0.19 to 2.1.3, the error log is filling with the following error message for most, if not every access (at least every time a topic is read and a mailbox is accessed, e.g. ...smf/index.php?topic=17192, ...smf/index.php?action=pm)

Type of error: Critical
Error Message: JSON decode error: Syntax error, malformed JSON
File: /var/www/html/smf/Sources/Load.php
Line: 1869

Functionality does seem to be working however...

JayH1119

This seems to have something to do with the following entry in the settings table being referenced by loadMemberContext():


displayFields   a:0:{}

JayH1119

I replaced the value for displayFields with plain old
     {}
and the problem has stopped.

Marking topic solved.

user58389239

Jay,
I'm getting the same error...would you mind giving a bit more detail on the change you made? What file did you replace that value in? Was it in Load.php?
Anyone know if there would be any negative implications of the change Jay made?

shawnb61

The first thing I'd try is fixing it via the app, not the code.

I believe we're talking about the custom profile fields.  I'd try going there, then edit & save.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

JayH1119

The database has a table named {Prefix}settings (in my case, "smf_settings") with two columns: "variable" and "value".

I changed the value of smf_settings.value in the record with smf_settings.variable = "displayFields" from 'a:0:{}' to '{}'

SQL:
update smf_settings set value = '{}' where variable = 'displayFields';

Advertisement: