Upgrade to OJS 3.0 from 2.4.8.0 - Error while converting supplementary files

Hi,

Can someone please help me?
I’ve been trying to update for two and a half months. Unsuccessfully.

Best regards,
Tarcisio Pereira

Hi @Tarcisio_Pereira,

Would you be able to provide me with a database dump for some local testing?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher

Off course. I will prepare it and send you a private message with link.

Regards,
Tarcisio Pereira.

Hi @Tarcisio_Pereira,

I spent some time working through your installation and it looks like you’ve run into a number of pitfalls:

I know you’ve followed the work-arounds for the first two, but I’m not sure if you’ve seen the last one yet?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher sorry about the delay, we are in a holiday here.

The journal manager put the article in the right place. For upgrade testing only you can put it in any section of the journal.
Let me know about anything you need.

Regards,
Tarcisio Pereira

Hi,

I get the same error upgrading from 2.4.8.2 to 3.0.2.

[code: Installer Installer::convertSupplementaryFiles]
PHP Fatal error:  Call to a member function getId() on null in /pathToOjs/classes/install/Upgrade.inc.php on line 1019

1013			$row = $suppFilesResult->getRowAssoc(false);
1014			$suppFilesResult->MoveNext();
1015			if (!$journal || $journal->getId() != $row['context_id']) {
1016				$journal = $journalDao->getById($row['context_id']);
1017				$managerUserGroup = $userGroupDao->getDefaultByRoleId($journal->getId(), ROLE_ID_MANAGER);
1018				$managerUsers = $userGroupDao->getUsersById($managerUserGroup->getId(), $journal->getId());
1019				$creatorUserId = $managerUsers->next()->getId();
1020			}

I work with the current ojs-stable-3_0_2 branch and I’ve checked all suggestions in this topic, but I still get the error.

@Tarcisio_Pereira Do you resolve this issue?

Someone can help me?

Many thanks
Giuseppe

2 Likes

Hi @atarix

It seems like one of your journals do not have a journal manager, could that be? – I is not enough to have admin with journal manager rights, there should be a ‘real’ journal manager.
Also, it already happened to some other users that there were some old journals in the DB, that were deleted long time ago, but for some reason they stayed in the DB i.e. were not completely removed, so the upgrade script would find and go through them, but would not find other elements e.g. journal managers. Could you double check if this is maybe in your case too – if you have any journal in your DB table journals, that should not be there any more?

Best,
Bozana

HI @atarix

I’m waiting for Alec.
He is testing my database.

Regards,
Tarcisio Pereira.

@bozana

thanks I’ll check this possibility

Hi @Tarcisio_Pereira,

I tried re-running your upgrade with a new copy of the database. Just in case it’s useful, it’s much quicker to run a test migration if you remove some of the table data from the dump – in particular, the full-text index and metrics. I did this by filtering your database dump and creating a leaner one:

zcat full_database_dump.sql.gz | sed -e '/^COPY metrics/,/^$/d' -e '/^COPY article_search_/,/^$/d' | gzip -9 > database_dump_trimmed.sql.gz

This dropped the database dump down from 2GB to 300MB; testing the upgrade process is massively sped up.

In the process I identified an issue that was slowing down the upgrade and resulting in some incorrect data – the patch there will resolve the issue during upgrade, and I’m working on code that’ll correct any bad data that got introduced. However, I the only effect you’d observe from this is a slow upgrade; patching it should speed up the role migration part of the upgrade.

In my latest test, I no longer get the error you first quoted. Now I get:

PHP Warning:  assert(): Assertion failed in /home/asmecher/git/ojs/lib/pkp/classes/submission/SubmissionFileDAODelegate.inc.php on line 134
PHP Stack trace:
PHP   1. {main}() /home/asmecher/git/ojs/tools/upgrade.php:0
PHP   2. UpgradeTool->execute() /home/asmecher/git/ojs/tools/upgrade.php:34
PHP   3. UpgradeTool->upgrade() /home/asmecher/git/ojs/lib/pkp/classes/cliTool/UpgradeTool.inc.php:64
PHP   4. Installer->execute() /home/asmecher/git/ojs/lib/pkp/classes/cliTool/UpgradeTool.inc.php:88
PHP   5. Installer->executeInstaller() /home/asmecher/git/ojs/lib/pkp/classes/install/Installer.inc.php:186
PHP   6. Installer->executeAction() /home/asmecher/git/ojs/lib/pkp/classes/install/Installer.inc.php:265
PHP   7. call_user_func:{/home/asmecher/git/ojs/lib/pkp/classes/install/Installer.inc.php:415}() /home/asmecher/git/ojs/lib/pkp/classes/install/Installer.inc.php:415
PHP   8. Upgrade->convertSupplementaryFiles() /home/asmecher/git/ojs/lib/pkp/classes/install/Installer.inc.php:415
PHP   9. PKPSubmissionFileDAO->updateObject() /home/asmecher/git/ojs/classes/install/Upgrade.inc.php:1319
PHP  10. SupplementaryFileDAODelegate->insertObject() /home/asmecher/git/ojs/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php:390
PHP  11. SubmissionFileDAODelegate->insertObject() /home/asmecher/git/ojs/lib/pkp/classes/submission/SupplementaryFileDAODelegate.inc.php:42
PHP  12. assert() /home/asmecher/git/ojs/lib/pkp/classes/submission/SubmissionFileDAODelegate.inc.php:134
<h1>DB Error: ERROR:  null value in column &quot;file_id&quot; violates not-null constraint
DETAIL:  Failing row contains (128282, en_US, 68234, null, Untitled, 9, RemoteURL, 0).</h1>ojs2: DB Error: ERROR:  null value in column "file_id" violates not-null constraint
DETAIL:  Failing row contains (128282, en_US, 68234, null, Untitled, 9, RemoteURL, 0).

It looks like you have some further data problems that might be related – for example, entries in article_supplementary_files that refer to entries in article_files (by file_id) where the article_files entry is missing:

select count(*) from article_supplementary_files s LEFT JOIN article_files f ON (f.file_id = s.file_id) WHERE f.file_id IS NULL;

I would suggest reviewing and correcting these.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Hi @asmecher

Thank you, I will check it.
I’ll try to update again using the base I sent you last.
I come back here to say my results.

Regards,
Tarcisio Pereira;

Hi @asmecher

I deleted all entries in article_supplementary_files with no real article_files.
But now:

[code: Installer Installer::convertSupplementaryFiles]
PHP Fatal error: Call to a member function getId() on null in /var/www/html/ojs3/classes/install/Upgrade.inc.php on line 1020

And in Upgrade.inc.php

$suppFilesResult = $submissionFileDao->retrieve(‘SELECT a.context_id, sf.* FROM article_supplementary_files sf,
submissions a WHERE a.submission_id = sf.ar ticle_id’); // COMMENT_TYPE_EDITOR_DECISION
1013 while (!$suppFilesResult->EOF) {
1014 $row = $suppFilesResult->getRowAssoc(false);
1015 $suppFilesResult->MoveNext();
1016 if (!$journal || $journal->getId() != $row[‘context_id’]) {
1017 $journal = $journalDao->getById($row[‘context_id’]);
1018 $managerUserGroup = $userGroupDao->getDefaultByRoleId($journal->getId(), ROLE_ID_MANAGER);
1019 $managerUsers = $userGroupDao->getUsersById($managerUserGroup->getId(), $journal->getId());
1020 $creatorUserId = $managerUsers->next()->getId();
1021 }
1022 $article = $articleDao->getById($row[‘article_id’]);

Last postgre log:

LOG: execute : SELECT DISTINCT u.*
FROM users AS u
LEFT JOIN user_settings us ON (us.user_id = u.user_id AND us.setting_name = ‘affiliation’)
LEFT JOIN user_interests ui ON (u.user_id = ui.user_id)
LEFT JOIN controlled_vocab_entry_settings cves ON (ui.controlled_vocab_entry_id = cves.controlled_vocab_entry_id)
LEFT JOIN user_user_groups uug ON (uug.user_id = u.user_id)
LEFT JOIN user_groups ug ON (ug.user_group_id = uug.user_group_id)
WHERE 1=1 AND ug.context_id = $1 AND ug.user_group_id = $2 ORDER BY u.last_name, u.first_name
DETAIL: parameters: $1 = ‘218’, $2 = ‘157’

Manually executing the query:

(0 rows)

The whole story seems endless madness. Looks like user migration problem again.

Regards,
Tarcisio Pereira.

Hi @Tarcisio_Pereira

Could it be that your journal = 218 does not have any journal manager? – It is not enough to have admin user with journal manager rights, but a ‘real’ journal manager user.

Best,
Bozana

Hi @bozana

Yes, I had 19 journals that the admin user was the only journal manager.
Now all journals have a ‘real’ user as journal manager.
But, this error still remains.

What else can I do or check to solve this problem?

Regards,
Tarcisio Pereira.

Hi @Tarcisio_Pereira

Hmmm… for a reason the script could not found the journal manager :frowning: Could you see what is the role_id where user_group_id = 157 in the DB table user_groups? And is there a user_id with the user_group_id = 157 in the DB table user_user_groups?

Best,
Bozana

Hi @bozana

First:

select * from user_groups where user_group_id = 157;
user_group_id | context_id | role_id | is_default | show_title | permit_self_registration
---------------±-----------±--------±-----------±-----------±-------------------------
157 | 218 | 16 | 1 | 0 | 0
(1 row)

Second:

select * from user_user_groups where user_group_id = 157;
user_group_id | user_id
---------------±--------
(0 rows)

Bonus:

select * from user_groups where user_group_id in (155, 156, 157);
user_group_id | context_id | role_id | is_default | show_title | permit_self_registration
---------------±-----------±--------±-----------±-----------±-------------------------
155 | 218 | 16 | 1 | 0 | 0
156 | 218 | 16 | 1 | 0 | 0
157 | 218 | 16 | 1 | 0 | 0
(3 rows)

and:

select * from user_user_groups where user_group_id in (155, 156, 157);
user_group_id | user_id
---------------±--------
155 | 52962
155 | 42397
155 | 1
156 | 52962
156 | 42397
(5 rows)

Same thing on:

Regards,
Tarcisio Pereira.

Hmmm… I am not sure about your very last displays – if this has something to do with that error… it seems to be something with editors… Thus, I will take a look at that a little bit later, after we figured out what is wrong with the journal manager for the journal 218. Could you please take a look in your old DB table roles and see if there is a user_id where role_id = 16 and journal_id = 218 and also if there is a user_id with role_id = 16 for each journal_id in this DB table?
EDIT: And one more thing: what is the setting_value from the new DB table user_group_settings, where user_group_id = 157 and setting_name = ‘name’?

155, 156 and 157 should be manger, editor and productionEditor. I just wonder how come 157 is a manager – it is usually on the first place i.e. it should be 155… Hmmm…

Thanks!!!

Hi @bozana

select * from roles where role_id = 16 and journal_id = 218;
journal_id | user_id | role_id
------------±--------±--------
218 | 1 | 16
218 | 42397 | 16
218 | 52962 | 16
(3 rows)

Both no admin users really exists in users tables.[quote=“bozana, post:46, topic:25950”]
see if there is a user_id where role_id = 16 and journal_id = 218 and also if there is a user_id with role_id = 16 for each journal_id in this DB table?
[/quote]

I’ve done this check a few times and checked again now to be sure. There is at last one no admin user with role_id = 16 to each one.

select journal_id, count(*) from roles where role_id = 16 and user_id <> 1 group by journal_id order by journal_id;
journal_id | count
------------±------
1 | 1
2 | 1
3 | 3
4 | 1
5 | 1
6 | 2
7 | 1
8 | 3
9 | 5
10 | 1
11 | 3
12 | 1
13 | 5
14 | 1
15 | 1
16 | 3
17 | 1
18 | 6
19 | 4
22 | 1
23 | 1
24 | 1
25 | 1
26 | 1
27 | 5
28 | 2
29 | 1
30 | 1
31 | 1
32 | 1
33 | 1
34 | 2
35 | 1
36 | 5
37 | 1
38 | 1
39 | 5
40 | 1
43 | 7
44 | 2
45 | 4
46 | 6
47 | 4
48 | 5
49 | 1
50 | 1
51 | 1
52 | 3
53 | 4
54 | 3
55 | 1
56 | 5
57 | 6
58 | 4
59 | 3
60 | 6
61 | 2
62 | 1
63 | 4
64 | 4
65 | 3
66 | 3
67 | 2
68 | 4
69 | 5
70 | 3
71 | 9
72 | 2
74 | 2
75 | 1
76 | 1
77 | 2
78 | 1
79 | 2
80 | 6
81 | 8
82 | 1
84 | 4
85 | 3
86 | 3
87 | 1
88 | 2
89 | 6
90 | 2
91 | 9
92 | 7
93 | 2
94 | 3
95 | 2
96 | 6
97 | 6
98 | 4
99 | 4
100 | 4
101 | 6
102 | 2
103 | 2
104 | 2
105 | 2
106 | 2
107 | 2
108 | 8
109 | 8
110 | 4
111 | 10
112 | 5
113 | 5
114 | 5
115 | 6
116 | 14
117 | 4
118 | 5
119 | 4
120 | 4
121 | 1
122 | 4
123 | 7
124 | 2
125 | 2
126 | 1
127 | 1
128 | 13
129 | 2
130 | 3
131 | 9
132 | 1
133 | 9
134 | 4
135 | 9
137 | 3
138 | 1
139 | 1
140 | 6
141 | 3
142 | 1
143 | 3
144 | 2
145 | 6
146 | 4
147 | 5
148 | 5
149 | 2
150 | 4
151 | 2
152 | 1
153 | 6
154 | 15
155 | 1
156 | 1
157 | 5
158 | 5
159 | 1
160 | 2
161 | 5
162 | 1
163 | 1
164 | 1
165 | 2
166 | 4
167 | 4
168 | 5
169 | 1
170 | 1
171 | 1
177 | 1
179 | 1
180 | 1
181 | 5
182 | 4
183 | 8
184 | 1
185 | 1
186 | 2
187 | 1
188 | 30
189 | 1
190 | 3
191 | 1
192 | 1
193 | 3
194 | 2
195 | 12
196 | 2
197 | 1
198 | 1
199 | 1
200 | 1
201 | 1
202 | 2
203 | 1
204 | 2
205 | 3
206 | 4
207 | 7
208 | 2
209 | 2
210 | 2
211 | 1
212 | 1
213 | 1
214 | 1
215 | 1
216 | 1
217 | 9
218 | 2
219 | 4
220 | 1
221 | 8
222 | 2
223 | 2
224 | 2
225 | 1
226 | 1
227 | 1
(214 rows)

We have 214 journals in journals table;

select * from user_group_settings where user_group_id = 157 and setting_name = ‘name’;
user_group_id | locale | setting_name | setting_value | setting_type
---------------±-------±-------------±-----------------------------------------±-------------
157 | de_DE | name | ##default.groups.name.productionEditor## | string
157 | en_US | name | ##default.groups.name.productionEditor## | string
157 | es_ES | name | ##default.groups.name.productionEditor## | string
157 | fr_CA | name | ##default.groups.name.productionEditor## | string
157 | fr_FR | name | ##default.groups.name.productionEditor## | string
157 | it_IT | name | ##default.groups.name.productionEditor## | string
157 | ja_JP | name | ##default.groups.name.productionEditor## | string
157 | pt_BR | name | Editor de produção | string
157 | ru_RU | name | ##default.groups.name.productionEditor## | string
(9 rows)

Thank you! a lot!

Hi @Tarcisio_Pereira

Hmmm… the error says the line 1020, which is, like you said:

1018 $managerUserGroup = $userGroupDao->getDefaultByRoleId($journal->getId(), ROLE_ID_MANAGER);
1019 $managerUsers = $userGroupDao->getUsersById($managerUserGroup->getId(), $journal->getId());
1020 $creatorUserId = $managerUsers->next()->getId();
1021 }
1022 $article = $articleDao->getById($row[‘article_id’]);

Would it be possible for you to somehow debug and find/print out what are $managerUserGroup, $journal->getId() and $managerUsers there? It is in the function convertSupplementaryFiles, in classes/install/Upgrade.inc.php.

I wonder why is your last PostgreSQL query log the one searching for editors, probably from the function migrateUserRoles – because there are lots of other functions between the function migrateUserRoles and convertSupplementaryFiles, s. https://github.com/pkp/ojs/blob/ojs-3_0_2-0/dbscripts/xml/upgrade.xml#L84-L100.
My fault, I thought it has something to do with this error your are getting :-
That’s why I would like to fist stay on those lines where this error occurs and figure that out…

Maybe also to print out what is happening here: https://github.com/pkp/ojs/blob/ojs-3_0_2-0/classes/install/Upgrade.inc.php#L248-L254 – to be sure all old journal managers are assigned to the right group…

Thanks!
Bozana

Hi @bozana

Probably because of line 1019:[quote=“bozana, post:48, topic:25950”]
1019 $managerUsers = $userGroupDao->getUsersById($managerUserGroup->getId(), $journal->getId());
[/quote]

My debug code:

1013 while (!$suppFilesResult->EOF) {
1014 $row = $suppFilesResult->getRowAssoc(false);
1015 $suppFilesResult->MoveNext();
1016 if (!$journal || $journal->getId() != $row[‘context_id’]) {
1017 $journal = $journalDao->getById($row[‘context_id’]);
1018 $managerUserGroup = $userGroupDao->getDefaultByRoleId($journa l->getId(), ROLE_ID_MANAGER);
1019 $managerUsers = $userGroupDao->getUsersById($managerUserGroup ->getId(), $journal->getId());
1020 echo(‘journal_id=’.$journal->getId().’ managerUserGroup_id='.$managerUserGroup->getId().“\n”);
1021 if($journal->getId() == 218){
1022 var_dump($managerUserGroup);
1023 var_dump($managerUsers);
1024 }
1025 $creatorUserId = $managerUsers->next()->getId();
1026 }
1027 $article = $articleDao->getById($row[‘article_id’]);

And, my results (journal_id=218 only):

journal_id=218 managerUserGroup_id=157
object(UserGroup)#87561 (6) {
[“_data”]=>
array(10) {
[“id”]=>
string(3) “157”
[“roleId”]=>
string(2) “16”
[“contextId”]=>
string(3) “218”
[“isDefault”]=>
string(1) “1”
[“showTitle”]=>
string(1) “0”
[“permitSelfRegistration”]=>
string(1) “0”
[“abbrevLocaleKey”]=>
string(38) “default.groups.abbrev.productionEditor”
[“nameLocaleKey”]=>
string(36) “default.groups.name.productionEditor”
[“abbrev”]=>
array(9) {
[“de_DE”]=>
string(42) “##default.groups.abbrev.productionEditor##”
[“en_US”]=>
string(42) “##default.groups.abbrev.productionEditor##”
[“es_ES”]=>
string(42) “##default.groups.abbrev.productionEditor##”
[“fr_CA”]=>
string(42) “##default.groups.abbrev.productionEditor##”
[“fr_FR”]=>
string(42) “##default.groups.abbrev.productionEditor##”
[“it_IT”]=>
string(42) “##default.groups.abbrev.productionEditor##”
[“ja_JP”]=>
string(42) “##default.groups.abbrev.productionEditor##”
[“pt_BR”]=>
string(2) “EP”
[“ru_RU”]=>
string(42) “##default.groups.abbrev.productionEditor##”
}
[“name”]=>
array(9) {
[“de_DE”]=>
string(40) “##default.groups.name.productionEditor##”
[“en_US”]=>
string(40) “##default.groups.name.productionEditor##”
[“es_ES”]=>
string(40) “##default.groups.name.productionEditor##”
[“fr_CA”]=>
string(40) “##default.groups.name.productionEditor##”
[“fr_FR”]=>
string(40) “##default.groups.name.productionEditor##”
[“it_IT”]=>
string(40) “##default.groups.name.productionEditor##”
[“ja_JP”]=>
string(40) “##default.groups.name.productionEditor##”
[“pt_BR”]=>
string(20) “Editor de produção”
[“ru_RU”]=>
string(40) “##default.groups.name.productionEditor##”
}
}
[“_hasLoadableAdapters”]=>
bool(false)
[“_metadataExtractionAdapters”]=>
array(0) {
}
[“_extractionAdaptersLoaded”]=>
bool(false)
[“_metadataInjectionAdapters”]=>
array(0) {
}
[“_injectionAdaptersLoaded”]=>
bool(false)
}
object(DAOResultFactory)#88612 (10) {
[“dao”]=>
&object(UserDAO)#305 (1) {
[“_dataSource”]=>
object(ADODB_postgres7)#30 (94) {
[“databaseType”]=>
string(9) “postgres7”
[“hasLimit”]=>
bool(true)
[“ansiOuter”]=>
bool(true)
[“charSet”]=>
string(4) “UTF8”
[“metaColumnsSQL”]=>
string(970) “SELECT a.attname,
CASE
WHEN x.sequence_name != ‘’ THEN ‘SERIAL’
ELSE t.typname
END AS typname,
a.attlen,a.atttypmod,a.attnotnull,a.atthasdef,a.attnum
FROM pg_class c, pg_attribute a
JOIN pg_type t ON a.atttypid = t.oid
LEFT JOIN
(SELECT c.relname as sequence_name,
c1.relname as related_table,
a.attname as related_column
FROM pg_class c
JOIN pg_depend d ON d.objid = c.oid
LEFT JOIN pg_class c1 ON d.refobjid = c1.oid
LEFT JOIN pg_attribute a ON (d.refobjid, d.refobjsubid) = (a.attrelid, a.attnum)
WHERE c.relkind = ‘S’ AND c1.relname = ‘%s’) x
ON x.related_column= a.attname
WHERE c.relkind in (‘r’,‘v’) AND
(c.relname=‘%s’ or c.relname = lower(‘%s’)) AND
a.attname not like ‘…%%’ AND
a.attnum > 0 AND
a.attrelid = c.oid
ORDER BY a.attnum”
[“metaColumnsSQL1”]=>
string(1056) "
SELECT a.attname,
CASE
WHEN x.sequence_name != ‘’ THEN ‘SERIAL’
ELSE t.typname
END AS typname,
a.attlen, a.atttypmod, a.attnotnull, a.atthasdef, a.attnum
FROM pg_class c, pg_namespace n, pg_attribute a
JOIN pg_type t ON a.atttypid = t.oid
LEFT JOIN
(SELECT c.relname as sequence_name,
c1.relname as related_table,
a.attname as related_column
FROM pg_class c
JOIN pg_depend d ON d.objid = c.oid
LEFT JOIN pg_class c1 ON d.refobjid = c1.oid
LEFT JOIN pg_attribute a ON (d.refobjid, d.refobjsubid) = (a.attrelid, a.attnum)
WHERE c.relkind = ‘S’ AND c1.relname = ‘%s’) x
ON x.related_column= a.attname
WHERE c.relkind in (‘r’,‘v’) AND (c.relname=‘%s’ or c.relname = lower(‘%s’))
AND c.relnamespace=n.oid and n.nspname=‘%s’
AND a.attname not like ‘…%%’ AND a.attnum > 0
AND a.atttypid = t.oid AND a.attrelid = c.oid
ORDER BY a.attnum"
[“dataProvider”]=>
string(8) “postgres”
[“hasInsertID”]=>
bool(true)
[“_resultid”]=>
resource(10257562) of type (pgsql result)
[“concat_operator”]=>
string(2) “||”
[“metaDatabasesSQL”]=>
string(89) “select datname from pg_database where datname not in (‘template0’,‘template1’) order by 1”
[“metaTablesSQL”]=>
string(249) “select table_name,‘T’ from information_schema.tables where table_schema not in ( ‘pg_catalog’,‘information_schema’)
union
select table_name,‘V’ from information_schema.views where table_schema not in ( ‘pg_catalog’,‘information_schema’) "
[“isoDates”]=>
bool(true)
[“sysDate”]=>
string(12) “CURRENT_DATE”
[“sysTimeStamp”]=>
string(17) “CURRENT_TIMESTAMP”
[“blobEncodeType”]=>
string(1) “C”
[“metaKeySQL”]=>
string(484) “SELECT ic.relname AS index_name, a.attname AS column_name,i.indisunique AS unique_key, i.indisprimary AS primary_key
FROM pg_class bc, pg_class ic, pg_index i, pg_attribute a WHERE bc.oid = i.indrelid AND ic.oid = i.indexrelid AND (i.indkey[0] = a.attnum OR i.indkey[1] = a.attnum OR i.indkey[2] = a.attnum OR i.indkey[3] = a.attnum OR i.indkey[4] = a.attnum OR i.indkey[5] = a.attnum OR i.indkey[6] = a.attnum OR i.indkey[7] = a.attnum) AND a.attrelid = bc.oid AND bc.relname = ‘%s’”
[“hasAffectedRows”]=>
bool(true)
[“true”]=>
string(1) “1”
[“false”]=>
string(1) “0”
[“fmtDate”]=>
string(7) “‘Y-m-d’”
[“fmtTimeStamp”]=>
string(13) “‘Y-m-d H:i:s’”
[“hasMoveFirst”]=>
bool(true)
[“hasGenID”]=>
bool(true)
[”_genIDSQL"]=>
string(20) “SELECT NEXTVAL(‘%s’)”
[“_genSeqSQL”]=>
string(27) “CREATE SEQUENCE %s START %s”
[“_dropSeqSQL”]=>
string(16) “DROP SEQUENCE %s”
[“metaDefaultsSQL”]=>
string(125) “SELECT d.adnum as num, d.adsrc as def from pg_attrdef d, pg_class c where d.adrelid=c.oid and c.relname=‘%s’ order by d.adnum”
[“random”]=>
string(8) “random()”
[“autoRollback”]=>
bool(true)
[“uniqueIisR”]=>
bool(true)
[“_bindInputArray”]=>
bool(true)
[“disableBlobs”]=>
bool(false)
[“pnum"]=>
int(0)
[“database”]=>
string(4) “ojs3”
[“host”]=>
string(9) “localhost”
[“user”]=>
string(8) “revistas”
[“password”]=>
string(10) “not stored”
[“debug”]=>
bool(false)
[“maxblobsize”]=>
int(262144)
[“substr”]=>
string(6) “substr”
[“length”]=>
string(6) “length”
[“upperCase”]=>
string(5) “upper”
[“replaceQuote”]=>
string(2) “'”
[“nameQuote”]=>
string(1) “”"
[“uniqueOrderBy”]=>
bool(false)
[“emptyDate”]=>
string(6) " "
[“emptyTimeStamp”]=>
string(6) " "
[“lastInsID”]=>
bool(false)
[“hasTop”]=>
bool(false)
[“readOnly”]=>
bool(false)
[“hasTransactions”]=>
bool(true)
[“genID”]=>
int(0)
[“raiseErrorFn”]=>
bool(false)
[“cacheSecs”]=>
int(3600)
[“memCache”]=>
bool(false)
[“memCacheHost”]=>
NULL
[“memCachePort”]=>
int(11211)
[“memCacheCompress”]=>
bool(false)
[“sysUTimeStamp”]=>
bool(false)
[“arrayClass”]=>
string(18) “ADORecordSet_array”
[“noNullStrings”]=>
bool(false)
[“numQueries”]=>
int(8829359)
[“numCacheHits”]=>
int(0)
[“numCacheMisses”]=>
int(0)
[“pageExecuteCountRows”]=>
bool(true)
[“uniqueSort”]=>
bool(false)
[“leftOuter”]=>
bool(false)
[“rightOuter”]=>
bool(false)
[“poorAffectedRows”]=>
bool(false)
[“fnExecute”]=>
bool(false)
[“fnCacheExecute”]=>
bool(false)
[“rsPrefix”]=>
string(13) "ADORecordSet

[“autoCommit”]=>
bool(true)
[“transOff”]=>
int(0)
[“transCnt”]=>
int(0)
[“fetchMode”]=>
bool(false)
[“null2null”]=>
string(4) “null”
[“bulkBind”]=>
bool(false)
[“_oldRaiseFn”]=>
bool(false)
[“_transOK”]=>
NULL
[“_connectionID”]=>
resource(144) of type (pgsql link)
[“_errorMsg”]=>
string(0) “”
[“_errorCode”]=>
bool(false)
[“_queryID”]=>
resource(10257567) of type (Unknown)
[“_isPersistentConnection”]=>
bool(false)
[“_evalAll”]=>
bool(false)
[“_affected”]=>
bool(false)
[“_logsql”]=>
bool(false)
[“_transmode”]=>
string(0) “”
[“version”]=>
array(2) {
[“description”]=>
string(107) “PostgreSQL 9.4.7 on x86_64-redhat-linux-gnu, compiled by gcc (GCC) 5.3.1 20151207 (Red Hat 5.3.1-2), 64-bit”
[“version”]=>
string(5) “9.4.7”
}
[“pgVersion”]=>
float(9,4)
[“_nestedSQL”]=>
bool(true)
[“_metars”]=>
object(ADORecordSet_postgres7)#503 (30) {
[“databaseType”]=>
string(9) “postgres7”
[“_blobArr”]=>
NULL
[“canSeek”]=>
bool(true)
[“dataProvider”]=>
string(6) “native”
[“fields”]=>
bool(false)
[“blobSize”]=>
int(100)
[“sql”]=>
NULL
[“EOF”]=>
bool(false)
[“emptyTimeStamp”]=>
string(6) " "
[“emptyDate”]=>
string(6) " "
[“debug”]=>
bool(false)
[“timeCreated”]=>
int(0)
[“bind”]=>
bool(false)
[“fetchMode”]=>
int(3)
[“connection”]=>
RECURSION
[“_numOfRows”]=>
int(-1)
[“_numOfFields”]=>
int(-1)
[“_queryID”]=>
bool(false)
[“_currentRow”]=>
int(-1)
[“_closed”]=>
bool(false)
[“_inited”]=>
bool(false)
[“_obj”]=>
NULL
[“_names”]=>
NULL
[“_currentPage”]=>
int(-1)
[“_atFirstPage”]=>
bool(false)
[“_atLastPage”]=>
bool(false)
[“_lastPageNo”]=>
int(-1)
[“_maxRecordCount”]=>
int(0)
[“datetime”]=>
bool(false)
[“adodbFetchMode”]=>
int(0)
}
}
}
[“functionName”]=>
string(26) “_returnUserFromRowWithData”
[“idFields”]=>
array(0) {
}
[“records”]=>
NULL
[“wasEmpty”]=>
bool(true)
[“isFirst”]=>
bool(true)
[“isLast”]=>
bool(true)
[“page”]=>
int(1)
[“count”]=>
int(0)
[“pageCount”]=>
int(1)
}
PHP Fatal error: Call to a member function getId() on null in /var/www/html/ojs3/classes/install/Upgrade.inc.php on line 1025

I can send you a database dump and the full debug log if you wish.
I searched the code but can not find any place where the productionEditor migration is done.

Regards,
Tarcisio Pereira