Tables not imported properly in OJS 3.0.2.0

I exported ojs sql database and when I import it into another phpmyadmin tables with submission checklist is missing. Please advise. Is there anything important during import to check in order to prevent that?

Hi @vvucic,

It’s possible that cached files are getting in the way. Make sure all .php files are removed from cache/ after you work with the database; these should be recreated as needed.

Regards,
Alec Smecher
Public Knowledge Project Team

I have deleted manually all php files from cache folder and its subfolders but I still do not get submission checklist. When I open sql file in my editor I see them.
Strange.
Do you have any advise?

Hi @vvucic,

Do you see warnings in your PHP error log mentioning unserialize?

Regards,
Alec Smecher
Public Knowledge Project Team

Yes, I see those PHP notices. error at ofset and again path to DAO.inc line 347

Hi @vvucic,

That would explain why the checklist is disappearing. It sounds like you’ve inadvertently changed the character set configuration in config.inc.php, or perhaps corrupted the character set during import/export, so PHP is unable to unserialize the setting that contains the checklist (probably because string lengths aren’t what it expects any more due to multibyte characters somehow changing).

Regards,
Alec Smecher
Public Knowledge Project Team

I did not change anything until I have seen that all utf8 characters are looking strange and that submission checklist is missing.

What I have to do now?

Hi @vvucic,

If your config.inc.php files agree with respect to character set configuration, then I suspect the issue is with either the database you’ve created (it’s not UTF8) or the one you’ve extracted (it’s not UTF8, even though it may have UTF8-like content loaded into it). This is more of a MySQL question than an OJS question, I think, so you might want to browse around StackOverflow.

Regards,
Alec Smecher
Public Knowledge Project Team

Maybe this is related to this:

Here is screenshot of structure and encoding of database.

It is strange that database is exported from one phpmyadmin with OJS 3.0.20 in which works well and imported to other phpmyadmin with OJS 3.02 and we experience such issue. Please advise.

Note that while your default database collation is utf8mb4_unicode_ci, your default collation on individual tables is utf8_general_ci. Even columns can have their own default collation value.

As @asmecher notes, this is probably more of a mysql question than an OJS question, but you’ll want to check to ensure that the database, table, and column collations are as you intend in the new database. If so, check the characters appear appropriately via phpMyAdmin in the new database. If all of the above looks good, then we come back to a question of the OJS configuration.

Hello,
This is post that I asked on apachefriends.org support forum since the base was created in XAMPP for win with strange rsults after being imported in phpmyadmin in OpenLeap 42.2
Apache Friends Support Forum • View topic - import export issues

I Hope I will get good answer and probably help someone with problem that I do have.
Thanks

Hi @vvucic,

I suspect this is more of a MySQL admin issue than anything else; StackOverflow might give you the best results.

Regards,
Alec Smecher
Public Knowledge Project Team

It seems to me too. I asked on mysql IRC on freenode but no answer so far. I will upgrade php to 5.6.30 to match the version in which that database works fine in xampp in win. I will post here if there will be any result.

When I installed XAMPP in Linux with identical characteristics as in WIN 7 import of database was flawless and everything works fine.
Thus, the issue is how to database exported from XAMPP win make compatible with the current settings in OpenLeap 42.2 (without XAMPP) or install XAMPP and let it be…
Obviously, import screwed it up.

Do you have any suggestions?

Hi @vvucic,

I’m afraid not – I’ve never used OpenLeap (do you mean openSUSE Leap 42.2?) and don’t use phpMyAdmin either.

Regards,
Alec Smecher
Public Knowledge Project Team

yes, I used OpenSuse Leap 42.2. phpmyadmin is not issue since the same things happened when importing database with mysql commands.
Thus, MySQL difference/incompatibility was causing issues.

Hi @vvucic,

Off the top of my head, check the note at Updated from 2.4.3 to 2.4.7.0: missing content/Images - #3 by asmecher regarding the --default-character-set option to mysqldump.

Regards,
Alec Smecher
Public Knowledge Project Team

In my case settings are identical since the both are OJS defaults.
The only thing is why import to empty database with identical collations and character sets screws some tables and collations. I think that they do have different bytes/number) due to different versions and they screw up. I suppose that this is version incompatibility rather than collation issue. I think that collation is consequence of the problem, not cause. Maybe I am wrong but I more and more think like that. Specific collation export parameter can make that fix and unchanged during import which is wonderful but I do not know that parameter, actually how to import that databse and keep database intact since it si not question only on characters but that some tables do not show up or that even some that do show up is not possible to change characters if I edit directly in databse or in editor in OJS. That is not just collation issue, it says that there is misinterpretation of database structure present.

I usually in such situations install OJS and check utf8 that all characters appear properly etc. The table and server connection collation is identical in both cases and default config.inc.php values are satisfactory.
After that I drop tables and import new database. In 99% situations everything is OK except in this case when collation is garbled and some tables do not show up although they are present. In some tables it is possible to fix characters, but in some it is not possible to save changes in text.
Therefore I conclude that import is not just collation, the import break some other components of database.
Please let me know if I can be helpful.

Thanks