OJS 3.0.1 Upgrade from 3.0.0 is not showing the authors names on metadata

Hi,

We realize that after updating the ojs, the authors’ names are not appearing in the old issues as well as in the metadata

=======================================================

But the name still appears here on sidebar

I don’t know if this is related, but when we access the article, this errors displays on the log:

2017/01/17 10:32:24 [error] 9339#9339: *21689 FastCGI sent in stderr: "PHP message: PHP Warning:  array_merge(): Argument #2 is not an array in ojs/releases/2/lib/pkp/classes/core/PKPApplication.inc.php on line 578
PHP message: PHP Warning:  Invalid argument supplied for foreach() in ojs/releases/2/plugins/generic/recommendByAuthor/RecommendByAuthorPlugin.inc.php on line 114" while reading upstream, client: 192.168.1.21, server: _, request: "GET /index.php/desafios/article/view/920 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "sistemas2.uft.edu.br:8004", referrer: "https://sistemas2.uft.edu.br:8004/index.php/desafios/issue/view/93"

Regards,
Rafael Mansilha

Hi @rafaelmansilha,

Are you sure that the upgrade from 3.0.0 to 3.0.1 caused this to change? If you previously upgraded from OJS 2.4.x, is it possible that this is when the author names disappeared?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher

I just checked version 3.0.0 and everything was ok.

Regards,
Rafael Mansilha.

Hi @rafaelmansilha,

Can you check the metadata for these articles? The contributors should have a checkbox labeled “Include this contributor in browse lists”. If it’s not checked, try checking it.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

As I’ve show, there is nobody on contributors list, they disappear:

Regards,
Rafael Mansilha

Hi @rafaelmansilha,

Ah, right you are. Could you post the output of the upgrade process?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

I couldn’t find the upgrade output, but I don’t remember any error or warning on it.

regards,
Rafael Mansilha

Hi @rafaelmansilha,

I wonder if both your upgrades to 3.0.0 and 3.0.1 failed. If that’s the case, the database might be partially upgraded, but any subsequent attempt to upgrade would try to start from the last successful upgrade. The 2.x to 3.0.0 upgrade rearranges a lot of content, including authors; by contrast, the 3.0.0 to 3.0.1 upgrade does very little, so I’m wondering if your install isn’t trying some of the 2.x to 3.0.0 steps over again.

When you complete an upgrade, you should always receive a confirmation that the upgrade was successful. Do you recall that?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

I do recall the message of success, I don’t have saved the last upgrade output, just 3 outputs from the errors I had:

Try 1:

php tools/upgrade.php upgrade
[pre-install]
[load: upgrade.xml]
[version: 3.0.1.0]
[schema: lib/pkp/xml/schema/common.xml]
[schema: lib/pkp/xml/schema/log.xml]
[schema: lib/pkp/xml/schema/announcements.xml]
[schema: lib/pkp/xml/schema/scheduledTasks.xml]
[schema: lib/pkp/xml/schema/temporaryFiles.xml]
[schema: lib/pkp/xml/schema/metadata.xml]
[schema: lib/pkp/xml/schema/reviews.xml]
[schema: lib/pkp/xml/schema/reviewForms.xml]
[schema: lib/pkp/xml/schema/controlledVocab.xml]
[schema: lib/pkp/xml/schema/submissions.xml]
[schema: lib/pkp/xml/schema/submissionFiles.xml]
[schema: lib/pkp/xml/schema/notes.xml]
[schema: lib/pkp/xml/schema/views.xml]
[schema: lib/pkp/xml/schema/genres.xml]
[schema: lib/pkp/xml/schema/gifts.xml]
[schema: lib/pkp/xml/schema/mutex.xml]
[schema: lib/pkp/xml/schema/tombstone.xml]
[schema: lib/pkp/xml/schema/rolesAndUserGroups.xml]
[schema: lib/pkp/xml/schema/metrics.xml]
[schema: lib/pkp/xml/schema/views.xml]
[schema: lib/pkp/xml/schema/libraryFiles.xml]
[schema: dbscripts/xml/ojs_schema.xml]
[data: dbscripts/xml/indexes.xml]
[code: Installer Installer::setFileUploader]
[code: Installer Installer::setFileName]
[data: dbscripts/xml/upgrade/3.0.1_update.xml]
[data: dbscripts/xml/upgrade/3.0.0_postupgrade_galley_files.xml]
[data: dbscripts/xml/upgrade/3.0.0_postupgrade_metrics.xml]
[code: Installer Installer::localizeIssueCoverImages]
<h1>DB Error: Duplicate entry '112-pt_BR-coverImage' for key 'issue_settings_pkey'</h1>ojs2: DB Error: Duplicate entry '112-pt_BR-coverImage' for key 'issue_settings_pkey'

Try2:

php tools/upgrade.php upgrade
// Update cover image names in the issue_settings table[pre-install]
[load: upgrade.xml]
[version: 3.0.1.0]
[schema: lib/pkp/xml/schema/common.xml]
[schema: lib/pkp/xml/schema/log.xml]
[schema: lib/pkp/xml/schema/announcements.xml]
[schema: lib/pkp/xml/schema/scheduledTasks.xml]
[schema: lib/pkp/xml/schema/temporaryFiles.xml]
[schema: lib/pkp/xml/schema/metadata.xml]
[schema: lib/pkp/xml/schema/reviews.xml]
[schema: lib/pkp/xml/schema/reviewForms.xml]
[schema: lib/pkp/xml/schema/controlledVocab.xml]
[schema: lib/pkp/xml/schema/submissions.xml]
[schema: lib/pkp/xml/schema/submissionFiles.xml]
[schema: lib/pkp/xml/schema/notes.xml]
[schema: lib/pkp/xml/schema/views.xml]
[schema: lib/pkp/xml/schema/genres.xml]
[schema: lib/pkp/xml/schema/gifts.xml]
[schema: lib/pkp/xml/schema/mutex.xml]
[schema: lib/pkp/xml/schema/tombstone.xml]
[schema: lib/pkp/xml/schema/rolesAndUserGroups.xml]
[schema: lib/pkp/xml/schema/metrics.xml]
[schema: lib/pkp/xml/schema/views.xml]
[schema: lib/pkp/xml/schema/libraryFiles.xml]
[schema: dbscripts/xml/ojs_schema.xml]
[data: dbscripts/xml/indexes.xml]
[code: Installer Installer::setFileUploader]
[code: Installer Installer::setFileName]
[data: dbscripts/xml/upgrade/3.0.1_update.xml]
[data: dbscripts/xml/upgrade/3.0.0_postupgrade_galley_files.xml]
[data: dbscripts/xml/upgrade/3.0.0_postupgrade_metrics.xml]
[code: Installer Installer::localizeIssueCoverImages]
<h1>DB Error: Duplicate entry '153-pt_BR-coverImageAltText' for key 'issue_settings_pkey'</h1>ojs2: DB Error: Duplicate entry '153-pt_BR-coverImageAltText' for key 'issue_settings_pkey'

Try 3:

php tools/upgrade.php upgrade
// Update cover image names in the issue_settings table[pre-install]
[load: upgrade.xml]
[version: 3.0.1.0]
[schema: lib/pkp/xml/schema/common.xml]
[schema: lib/pkp/xml/schema/log.xml]
[schema: lib/pkp/xml/schema/announcements.xml]
[schema: lib/pkp/xml/schema/scheduledTasks.xml]
[schema: lib/pkp/xml/schema/temporaryFiles.xml]
[schema: lib/pkp/xml/schema/metadata.xml]
[schema: lib/pkp/xml/schema/reviews.xml]
[schema: lib/pkp/xml/schema/reviewForms.xml]
[schema: lib/pkp/xml/schema/controlledVocab.xml]
[schema: lib/pkp/xml/schema/submissions.xml]
[schema: lib/pkp/xml/schema/submissionFiles.xml]
[schema: lib/pkp/xml/schema/notes.xml]
[schema: lib/pkp/xml/schema/views.xml]
[schema: lib/pkp/xml/schema/genres.xml]
[schema: lib/pkp/xml/schema/gifts.xml]
[schema: lib/pkp/xml/schema/mutex.xml]
[schema: lib/pkp/xml/schema/tombstone.xml]
[schema: lib/pkp/xml/schema/rolesAndUserGroups.xml]
[schema: lib/pkp/xml/schema/metrics.xml]
[schema: lib/pkp/xml/schema/views.xml]
[schema: lib/pkp/xml/schema/libraryFiles.xml]
[schema: dbscripts/xml/ojs_schema.xml]
[data: dbscripts/xml/indexes.xml]
[code: Installer Installer::setFileUploader]
[code: Installer Installer::setFileName]
[data: dbscripts/xml/upgrade/3.0.1_update.xml]
[data: dbscripts/xml/upgrade/3.0.0_postupgrade_galley_files.xml]
[data: dbscripts/xml/upgrade/3.0.0_postupgrade_metrics.xml]
[code: Installer Installer::localizeIssueCoverImages]
[code: Installer Installer::localizeArticleCoverImages]
[data: dbscripts/xml/upgrade/3.0.0_issue_settings.xml]
ERROR: Upgrade failed: DB: Duplicate entry '166-pt_BR-coverImageAltText' for key 'issue_settings_pkey'

But, I really don’t remember any error or warning on the last upgrade output, and I have a good memory.

Regards,
Rafael Mansilha.

Hi @rafaelmansilha,

Does your installation’s authors table look appropriately populated? You can check for a few of the submission_ids for the articles that appear to have missing authorship information.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

Everything looks fine to me:

Basically, everyone has first_name, middle_name, last_name and email; And every authors_id has a submission_id.

We have noticed that the new articles, made after the upgrade, doesn’t have this problem.

Regards,
Rafael Mansilha.

Hi @rafaelmansilha,

What about the other columns? Could you post a few examples with the full column set?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

here:

Everyone is: include_in_browse = 1

Regards,
Rafael Mansilha

Hi @rafaelmansilha,

I’m afraid everything looks normal to me. I would suggest using the debug feature in config.inc.php to determine exactly what query OJS is using to fetch the user list, and trying that against the database manually to see whether the appropriate authors are being returned. Note that turning on debug will cause all database queries to be dumped to the browser, so turn it on only briefly.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

The User group of the older issues does not exists:


The query thats is used:

SELECT a.*, ug.show_title FROM authors a JOIN user_groups ug ON (a.user_group_id=ug.user_group_id) WHERE a.submission_id = 1767 AND a.include_in_browse = 1 ORDER BY seq   

The Author exists, the include_in_browse is set to 1, but the group of the user on user_groups, does not exists.

Regards,
Rafael Mansilha.

Hi @rafaelmansilha,

I’m still not seeing where that would be caused during the upgrade process. Could you try turning on the debug option before running the upgrade, then capture the output? This should dump all database queries executed during the upgrade process, which could help in tracking it down.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

The query is the same, but the user_group_id = 524 used to exists on user_groups table, and now it does not exists:

V 3.0.0


V 3.0.1

Hi @rafaelmansilha,

The debug output could help locate what queries are altering the user_groups table.

Regards,
Alec Smecher
Public Knowledge Project Team

@hi asmecher,

Just to give you a feedback about this, I’ve got the backup com the day of the upgrade and I the data was missing from user_groups, user_group_settings, user_group_stage, user_user_groups, So I’ve inserted the erased data, and it works.

Regards,
Rafael Mansilha

Hi @rafaelmansilha,

Glad to hear it’s working – but I’m still not sure how this data could’ve been removed by the upgrade process. If you’re able to shed any light on it, please let me know.

Regards,
Alec Smecher
Public Knowledge Project Team