Migration error to AtoM 2.9

175 views
Skip to first unread message

MANUEL BUENO LLUCH

unread,
Apr 22, 2025, 7:26:32 AM4/22/25
to AtoM Users
Hi all,

We are migratin AtoM form 2.3.1 versión (OS Windows 7) to AtoM 2.9 (on OS Linux, with Ubuntu 24.04.2 and PHP 8.3). The installation is going well, aparently are no problems.

To import de SQL tables, we first delete AtoM database and we create an empty one and import our old database into the empty one. Next we run the update using this command:  sudo php -d memory=-a symfony tools:upgrade-sql.

It asks for confirmation and gives the following error:
PHP Fatal error: Uncaught TypeError: array-merge(): Argument #1 must be of type array, null given in /usr/share/nginx/atom/lib/task/migrate/QubitMigrate.class.php:541

Afterwards the process of regenerating references to the digital objects also fails.

What are we doing wrong?

Thank you very much in advance and best regards!
Manuel

Amaya Rodrigo

unread,
Apr 29, 2025, 12:12:02 PM4/29/25
to AtoM Users
Hello again, Manuel!

My developers said this upgrade path is not supported in one go. 
It *should* work, but here we are. The truth is it has not been tested.
Their advice is to attempt this upgrade in smaller steps.
I think I remember 2.3 to 2.6 worked fine.Then I'd try 2.6 -> 2.9.

For each version you are upping the code to:
Get to your AtoM source directory (where symfony lives):
cd /var/www/DIRECTORY/SOMETHING/src/

run the upgrade-sql task, this is how I run it (ubuntu):
nice -n -20 sudo -u www-data php symfony tools:upgrade-sql -B

Once the above has worked, and you are on 2.9, go ahead and re-index your site:
sudo -u www-data php symfony propel:build-nested-set | grep -v properly #atom 2.7 bug that clutters the terminal, thus grepping, not needed on 2.8 
sudo -u www-data php symfony propel:generate-slugs
sudo -u www-data php symfony cc
nohup sudo -u www-data php -d memory_limit="-1" symfony search:populate > /root/$(date +%Y-%m-%d_%H%M)_populate.log 2>&1 &

Some clean up and maintenance commands I like to run:

* This new clean up command is pretty cool:
sudo -u www-data php symfony tools:expire-data --older-than=2025-01-01 access_log,clipboard,job -f
(this will take a long time, delete saved clipboards, clean up the job page, and get rid of the access_log info used for the "popular this week" box).
Choose the date carefully ;)

* This will find you any orphans, or data inconsistencies, and attempt to fix them:
sudo -u www-data php symfony tools:data-integrity-repair --mode=fix

Also, when coming from windows, make sure the filesystem permissions are OK (files belong and can be read by www-data, the default for ubuntu).

Hope this helps!

MANUEL BUENO LLUCH

unread,
Jun 25, 2025, 1:21:58 PM6/25/25
to AtoM Users
Hi Amaya! 

I'm so sorry I didn't reply to this message. I completely missed it. Sorry

We finally managed to migrate to 2.9 with Ubuntu and we are delighted with the change. 

Tank you very much for your help and best regards!!
Reply all
Reply to author
Forward
0 new messages