DOI Setting is Serialised

We’ve got something odd happening, an editor is changing the title of an article and for some bizarre reason OJS serialises the DOI into a PHP object… is there some logic that determines when the DOI is serialised, because I’d like to disable it…

Hi @ajrbyers,

Unfortunately I’m drawing a blank on this – can you try to narrow down where this happens? We’re not using much at all in terms of AJAX in OJS 2.4.x, so I wonder if this isn’t due to a modification.

Regards,
Alec Smecher
Public Knowledge Project Team

Hey @asmecher,

Not sure it’s an Ajax thing. User is just saving the metadata page and then when I check the pub-id::doi in the Db it’s been serialised as an object rather than just a string!

Cheers

Hi @ajrbyers,

Ah, OK. The most likely source of this is the auto-detection of data types that happens when settings are stored in the database. Look at this line:

If the updateSetting function is called to store a DOI and the value passed to it is determined to be a PHP object, it’ll be serialized. I’ve never seen this happening in a stock version of OJS so I still suspect something funky is happening on your install, but perhaps you can trap it by adding some debugging output here.

Regards,
Alec Smecher
Public Knowledge Project Team