PHP warings with cli command tools:delete-drafts

27 views
Skip to first unread message

Martin

unread,
Mar 9, 2021, 12:43:59 PM3/9/21
to AtoM Users
Hi AtoM users

Since version 2.6. I get a lot of this php warnings:

PHP Warning:  in_array() expects parameter 2 to be array, null given in /usr/share/nginx/atom_A/plugins/arElasticSearchPlugin/lib/model/arElasticSearchModelBase.class.php on line 106

and

PHP Warning:  Invalid argument supplied for foreach() in /usr/share/nginx/atom_A/plugins/arElasticSearchPlugin/lib/arElasticSearchPluginUtil.class.php on line 514

It happens with the cli command:

sudo -u www-data /usr/bin/php symfony tools:delete-drafts

Is this a common problem or am I doing something wrong.

Thanks,
Martin

Dan Gillean

unread,
Mar 10, 2021, 9:52:19 AM3/10/21
to ICA-AtoM Users
Hi Martin, 

I will ask our devs to take a look at this thread and respond. In the meantime, what version of PHP do you have installed with 2.6? Are you using PHP 7.2 as recommended, or a later/earlier version?

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/67179a42-691e-4496-8af1-b3463e2acc97n%40googlegroups.com.

Martin Kunz

unread,
Mar 10, 2021, 10:19:37 AM3/10/21
to ica-ato...@googlegroups.com
Hi Dan,

Thank you very much for the quick response.

I'm with
. os:  ubuntu 18.04.7
. AtoM: 2.6.2
. php 7.2.24

One thing I must mention: The DB gets upgraded from version 2.4.1. But the same happens after an upgrade from 2.5.1. The upgrades are successful. This is the code I'm using:

  rm -f /data/Atom_A/downloads/jobs/*
  mysql --host localhost --execute "UPDATE atom_A.setting_i18n SET value='https://xxxxxxx.com' WHERE id=(SELECT id FROM atom_A.setting WHERE name='siteBaseUrl' LIMIT 1);"
  mysql --host localhost --execute "UPDATE atom_A.setting_i18n SET value='0' WHERE id=(SELECT id FROM atom_A.setting WHERE name='global_login_button' LIMIT 1);"
  sudo -u www-data php -d memory_limit=-1 /usr/share/nginx/atom_A/symfony tools:upgrade-sql --no-confirmation
  sudo -u www-data php -d memory_limit=-1 /usr/share/nginx/atom_A/symfony search:populate
  sudo -u www-data php -d memory_limit=-1 /usr/share/nginx/atom_A/symfony tools:delete-drafts --no-confirmation
  sudo -u www-data php /usr/share/nginx/atom_A/symfony cache:clear
  systemctl restart php7.2-fpm
  systemctl restart memcached

The draft records gets deleted but very slow (about 2h for 200 records) and with a lot of these php warnings.

Thanks a lot
Martin



--
Martin Kunz
Archivinformatiker

docuteam AG
Informationsmanagement und Archivdienstleistungen
Im Langacker 16, CH-5405 Baden-Dättwil
T +41 56 511 11 48
www.docuteam.ch

Anwesenheit: Montag - Mittwoch

Digitale Archivierung in der Cloud: https://cosmos.docuteam.ch

Dan Gillean

unread,
Mar 11, 2021, 12:58:37 PM3/11/21
to ICA-AtoM Users
Hi Martin, 

I have asked our developers to look into this a bit, and so far they have not been able to reproduce the issue described with the delete-descriptions task. Their current theory is that a) it may in fact be the search:populate task run before this that is generating the warnings, and b) the warnings may be a result of cached information on the server. 

To test this, we would recommend the following: 

First, try running the cache:clear task first, before any other symfony tasks. Second, if this is a script you are using, please try running the steps manually one after the other, so we can determine what step exactly is producing the errors. 

Our hope is that clearing the cache earlier may resolve the issue - and if not, hopefully we'll have a bit more information to work with. 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him

Reply all
Reply to author
Forward
0 new messages