References are missing after upgrade to 3.3.0.8

References are missing in published articles after upgrade to 3.3.0.8 from 3.1.1.4

I dealt with many issues, mainly with the database; I changed types of tables in InnoDB and Collation to utf8mb4_general_ci , and manage to run the website.

I noticed that in the new version in the database, the table “citations” has a different column “publication_id” and in the old version “submission_id” - the database contains all the references, but does not link them with the articles on website.

Maybe it has to do with the article template?

1 Like

Hi @Vaso_Manojlovic

For a start, I’d suggest rebuilding your citations from the command line, with:

php lib/pkp/tools/parseCitations.php all

Which will take the raw citations field and then populate the citations table. If that doesn’t bring them back, please make sure you’ve also upgraded any themes you might be using, since 3.1.1.4 themes won’t be compatible with 3.3.

Best
Jason

Hi @jnugent, thank you for your reply.

I tried to run parseCitations.php from the command line, but the following error occur:

root@ubuntu-s-1vcpu-1gb-intel-nyc1-01:/var/www/mme# php lib/pkp/tools/parseCitat ions.php all
PHP Notice: unserialize(): Error at offset 81 of 254 bytes in /var/www/mme/lib/ pkp/classes/db/DAO.inc.php on line 252
… (and about 20 similar with different offset)

The theme is default from the new version, I tried to change it with bootstrap and classic, but it doesn’t help.

Hi @Vaso_Manojlovic

When you changed database collations, how did you do it? Did you export your data using the encoding you had and then convert the database dumps and then reimport? If not, you may have introduced encoding problems.

Some data types in OJS are stored as serialized strings of text, and PHP will unserialize these strings to convert them back into arrays. If the stored length of the string no longer matches the calculated length of the string, you will see errors like the ones you are posting. These errors can occur if the stored serialized string has a character that ends up consuming a different number of bytes in the new collation.

Best
Jason

I imported old DB, option utf8; after that in PHP my admin, I selected database, in tab Operations, there is an option for Collation to apply for all tables.

Now, I changed back Collation on the ‘citation’ table to the old one, and I have no errors when running parseCitations.php , but that did not solve the problem. Also, again I back Collation to utf8mb4_general_ci - no error, and the problem is not solved.

Here is the structure of the old table:
old

and the new one:
image

Hi @Vaso_Manojlovic, did you menage to solve the issue? I have the same problem. Citations exist in the database but are not visible in the ojs web application. Running the php script did not solve it, I am playing with encoding at the moment to see if that is the cause.

Hi @Milos_Ilic , unfortunately, I entered the reference manually.
Some references from the older issues of the journal remained, and from the newer ones, I had to enter manually.