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