Omeka 2 Importer only imports collections

Hello all,

I would be enormously happy if someone could help me in an issue I’m having importing items from an Omeka 2 to Omeka S sites.

Importing items and their associated files using Omeka 2 Import Module used to work very well from the beginning, some weeks ago, but because of organisation issues in our database, we deleted the contents (and items) imported into Omeka S and started over again. But then problems came, as now it only imports the collections, but not a single item is imported / created.

Moreover, in Omeka S site it says the job is running, but it never stops nor give any kind of error. And when I tell it to attempt stop, it keeps saying Stopping. So now I have 3 jobs saying Stopping, only the Collections are imported, but not a single item is created. All the items are public, I’ve tried with and without api key… even reduce the maximum number of API results displayed per page to only 3… but nothing.

Two more things: nothing was really changed in the Omeka sites, and it’s like the problem came from nowhere; and if I go FTP to the folder Files, one or two files from the Omeka 2 actually appear in there, but are not created as items (nor I understand why that files are imported, as they are not “special” in any way I can understand)

Best regards to all,
Isaac

Is there anything in the logs/application.log file? You might need to go into the config/local.config.php file to make sure it is turned on:

    'logger' => [
        'log' => true,
        'priority' => \Zend\Log\Logger::INFO,
    ],

Yes, there is! A lot! In the “application.log”.

“2018-06-13T10:52:29+00:00 INFO (6): Importing item page 1
2018-06-13T10:53:28+00:00 ERR (3): PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in /home/inetbase/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:105
Stack trace:
#0 /home/inetbase/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(105): PDOStatement->execute(NULL)
#1 /home/inetbase/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(847): Doctrine\DBAL\Driver\PDOStatement->execute()
#2 /home/inetbase/public_html/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/SingleSelectExecutor.php(50): Doctrine\DBAL\Connection->executeQuery(‘SELECT r0_.id A…’, Array, Array, NULL)
#3 /home/inetbase/public_html/vendor/doctrine/orm/lib/Doctrine/ORM/Query.php(321): Doctrine\ORM\Query\Exec\SingleSelectExecutor->execute(Object(Doctrine\DBAL\Connection), Array, Array)
#4 /home/inetbase/public_html/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(962): Doctrine\ORM\Query->_doExecute()
#5 /home/inetbase/public_html/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(917): Doctrine\ORM\AbstractQuery->executeIgnoreQueryCache(NULL, NULL)
#6 /home/inetbase/public_html/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(759): Doctrine\ORM\AbstractQuery->execute(NULL, NULL)
#7 /home/inetbase/public_html/application/src/Api/Adapter/AbstractEntityAdapter.php(629): Doctrine\ORM\AbstractQuery->getOneOrNullResult()
#8 /home/inetbase/public_html/application/src/Api/Adapter/ItemAdapter.php(174): Omeka\Api\Adapter\AbstractEntityAdapter->findEntity(Array)
#9 /home/inetbase/public_html/application/src/Api/Adapter/AbstractEntityAdapter.php(552): Omeka\Api\Adapter\ItemAdapter->hydrate(Object(Omeka\Api\Request), Object(Omeka\Entity\Item), Object(Omeka\Stdlib\ErrorStore))
#10 /home/inetbase/public_html/application/src/Api/Adapter/AbstractEntityAdapter.php(267): Omeka\Api\Adapter\AbstractEntityAdapter->hydrateEntity(Object(Omeka\Api\Request), Object(Omeka\Entity\Item), Object(Omeka\Stdlib\ErrorStore))
#11 /home/inetbase/public_html/application/src/Api/Manager.php(224): Omeka\Api\Adapter\AbstractEntityAdapter->create(Object(Omeka\Api\Request))
#12 /home/inetbase/public_html/application/src/Api/Manager.php(78): Omeka\Api\Manager->execute(Object(Omeka\Api\Request))
#13 /home/inetbase/public_html/application/src/Api/Adapter/AbstractEntityAdapter.php(310): Omeka\Api\Manager->create(‘items’, Array, Array, Array)
#14 /home/inetbase/public_html/application/src/Api/Manager.php(227): Omeka\Api\Adapter\AbstractEntityAdapter->batchCreate(Object(Omeka\Api\Request))
#15 /home/inetbase/public_html/application/src/Api/Manager.php(97): Omeka\Api\Manager->execute(Object(Omeka\Api\Request))
#16 /home/inetbase/public_html/modules/Omeka2Importer/src/Job/Import.php(226): Omeka\Api\Manager->batchCreate(‘items’, Array, Array, Array)
#17 /home/inetbase/public_html/modules/Omeka2Importer/src/Job/Import.php(202): Omeka2Importer\Job\Import->createItems(Array)
#18 /home/inetbase/public_html/modules/Omeka2Importer/src/Job/Import.php(83): Omeka2Importer\Job\Import->importItems(Array)
#19 /home/inetbase/public_html/application/src/Job/DispatchStrategy/Synchronous.php(37): Omeka2Importer\Job\Import->perform()
#20 /home/inetbase/public_html/application/src/Job/Dispatcher.php(105): Omeka\Job\DispatchStrategy\Synchronous->send(Object(Omeka\Entity\Job))
#21 /home/inetbase/public_html/application/data/scripts/perform-job.php(43): Omeka\Job\Dispatcher->send(Object(Omeka\Entity\Job), Object(Omeka\Job\DispatchStrategy\Synchronous))
#22 {main}”

Shall I post the whole file?
Many thanks,
Isaac

Thanks. That gets a start at least. It looks like the importer encounters an error as soon as it gets to the items due to some kind of problem that causes Omeka’s connection to the database to get broken (Collections are imported before Items, so the order you are seeing make a certain kind of sense).

It’s pretty difficult to track down exactly what’s causing the problem, though. If your Omeka Classic site is public, could you give the URL so I can try it on my machine?

Shure! I appreciate all the help!

The items and files are set to public.

http://fcsh.unl.pt/mozdata/