CSV Import error "The source is undefined."

When attempting to import a CSV file I receive the error message The source is undefined.
I have tried both CSV import versions 2.2.1 and 2.2.0. I am running Omekas 3.0.2.

I have made sure that the CSV file is UTF-8 and have tried different CSV files.

When are you getting this error? Right at the first step, after mapping, or when running the job?

It happens on the first step.
I think this error is also related to another one. When editing a theme’s logo, and a png file is selected to upload and I click the upload button (to upload the logo to the theme) I receive the error below. It seems that jquery is failing to get the file from the form. This seems to be true in both cases but I am not 100% sure.

I am running Omeka-s using XAMMP and PHP version is 7.4.21.

["Asset uploads must be POSTed."]
jquery.min.js:formatted:3918 POST http://localhost/omeka-s/admin/asset/add 500 (Internal Server Error)
send @ jquery.min.js:formatted:3918
ajax @ jquery.min.js:formatted:3680
S.<computed> @ jquery.min.js:formatted:3795
(anonymous) @ asset-form.js?v=3.0.2:46
dispatch @ jquery.min.js:formatted:2030
v.handle @ jquery.min.js:formatted:1962
Uncaught SyntaxError: Unexpected token < in JSON at position 0
    at JSON.parse (<anonymous>)
    at Object.<anonymous> (asset-form.js?v=3.0.2:56)
    at c (jquery.min.js:formatted:1319)
    at Object.fireWith [as rejectWith] (jquery.min.js:formatted:1372)
    at l (jquery.min.js:formatted:3773)
    at XMLHttpRequest.<anonymous> (jquery.min.js:formatted:3900)
(anonymous) @ asset-form.js?v=3.0.2:56
c @ jquery.min.js:formatted:1319
fireWith @ jquery.min.js:formatted:1372
l @ jquery.min.js:formatted:3773
(anonymous) @ jquery.min.js:formatted:3900
load (async)
send @ jquery.min.js:formatted:3908
ajax @ jquery.min.js:formatted:3680
S.<computed> @ jquery.min.js:formatted:3795
(anonymous) @ asset-form.js?v=3.0.2:46
dispatch @ jquery.min.js:formatted:2030
v.handle @ jquery.min.js:formatted:1962

When I try to upload media to an item I also receive this error.

Laminas\Filter\Exception\InvalidArgumentException
Invalid target, must be a string

Details:

Laminas\Filter\Exception\InvalidArgumentException: Invalid target, must be a string in /Applications/XAMPP/xamppfiles/htdocs/omeka-s/vendor/laminas/laminas-filter/src/File/RenameUpload.php:82
Stack trace:
#0 /Applications/XAMPP/xamppfiles/htdocs/omeka-s/vendor/laminas/laminas-filter/src/AbstractFilter.php(50): Laminas\Filter\File\RenameUpload->setTarget(false)
#1 /Applications/XAMPP/xamppfiles/htdocs/omeka-s/vendor/laminas/laminas-filter/src/File/RenameUpload.php(50): Laminas\Filter\AbstractFilter->setOptions(Array)
#2 /Applications/XAMPP/xamppfiles/htdocs/omeka-s/application/src/File/Uploader.php(41): Laminas\Filter\File\RenameUpload->__construct(Array)
#3 /Applications/XAMPP/xamppfiles/htdocs/omeka-s/application/src/Media/Ingester/Upload.php(53): Omeka\File\Uploader->upload(Array, Object(Omeka\Stdlib\ErrorStore))
#4 /Applications/XAMPP/xamppfiles/htdocs/omeka-s/application/src/Api/Adapter/MediaAdapter.php(159): Omeka\Media\Ingester\Upload->ingest(Object(Omeka\Entity\Media), Object(Omeka\Api\Request), Object(Omeka\Stdlib\ErrorStore))
#5 /Applications/XAMPP/xamppfiles/htdocs/omeka-s/application/src/Api/Adapter/AbstractEntityAdapter.php(607): Omeka\Api\Adapter\MediaAdapter->hydrate(Object(Omeka\Api\Request), Object(Omeka\Entity\Media), Object(Omeka\Stdlib\ErrorStore))
#6 /Applications/XAMPP/xamppfiles/htdocs/omeka-s/application/src/Api/Adapter/ItemAdapter.php(240): Omeka\Api\Adapter\AbstractEntityAdapter->hydrateEntity(Object(Omeka\Api\Request), Object(Omeka\Entity\Media), Object(Omeka\Stdlib\ErrorStore))
#7 /Applications/XAMPP/xamppfiles/htdocs/omeka-s/application/src/Api/Adapter/AbstractEntityAdapter.php(607): Omeka\Api\Adapter\ItemAdapter->hydrate(Object(Omeka\Api\Request), Object(Omeka\Entity\Item), Object(Omeka\Stdlib\ErrorStore))
#8 /Applications/XAMPP/xamppfiles/htdocs/omeka-s/application/src/Api/Adapter/AbstractEntityAdapter.php(417): Omeka\Api\Adapter\AbstractEntityAdapter->hydrateEntity(Object(Omeka\Api\Request), Object(Omeka\Entity\Item), Object(Omeka\Stdlib\ErrorStore))
#9 /Applications/XAMPP/xamppfiles/htdocs/omeka-s/application/src/Api/Manager.php(233): Omeka\Api\Adapter\AbstractEntityAdapter->update(Object(Omeka\Api\Request))
#10 /Applications/XAMPP/xamppfiles/htdocs/omeka-s/application/src/Api/Manager.php(136): Omeka\Api\Manager->execute(Object(Omeka\Api\Request))
#11 /Applications/XAMPP/xamppfiles/htdocs/omeka-s/application/src/Mvc/Controller/Plugin/Api.php(152): Omeka\Api\Manager->update('items', '4', Array, Array, Array)
#12 /Applications/XAMPP/xamppfiles/htdocs/omeka-s/application/src/Controller/Admin/ItemController.php(245): Omeka\Mvc\Controller\Plugin\Api->update('items', '4', Array, Array)
#13 /Applications/XAMPP/xamppfiles/htdocs/omeka-s/vendor/laminas/laminas-mvc/src/Controller/AbstractActionController.php(77): Omeka\Controller\Admin\ItemController->editAction()
#14 /Applications/XAMPP/xamppfiles/htdocs/omeka-s/vendor/laminas/laminas-eventmanager/src/EventManager.php(321): Laminas\Mvc\Controller\AbstractActionController->onDispatch(Object(Laminas\Mvc\MvcEvent))
#15 /Applications/XAMPP/xamppfiles/htdocs/omeka-s/vendor/laminas/laminas-eventmanager/src/EventManager.php(178): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure))
#16 /Applications/XAMPP/xamppfiles/htdocs/omeka-s/vendor/laminas/laminas-mvc/src/Controller/AbstractController.php(103): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent))
#17 /Applications/XAMPP/xamppfiles/htdocs/omeka-s/vendor/laminas/laminas-mvc/src/DispatchListener.php(139): Laminas\Mvc\Controller\AbstractController->dispatch(Object(Laminas\Http\PhpEnvironment\Request), Object(Laminas\Http\PhpEnvironment\Response))
#18 /Applications/XAMPP/xamppfiles/htdocs/omeka-s/vendor/laminas/laminas-eventmanager/src/EventManager.php(321): Laminas\Mvc\DispatchListener->onDispatch(Object(Laminas\Mvc\MvcEvent))
#19 /Applications/XAMPP/xamppfiles/htdocs/omeka-s/vendor/laminas/laminas-eventmanager/src/EventManager.php(178): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure))
#20 /Applications/XAMPP/xamppfiles/htdocs/omeka-s/vendor/laminas/laminas-mvc/src/Application.php(331): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent))
#21 /Applications/XAMPP/xamppfiles/htdocs/omeka-s/index.php(21): Laminas\Mvc\Application->run()
#22 {main}

Hmm, I’m not sure what’s happening here but yeah, the problems are probably related. Can you upload files normally?

It seems like something is maybe causing POST requests not to work? Sometimes things like redirects can do that.

No no am unable to upload files either. I think any file that is being uploaded failes.
Media, file, logo, CSV, they all failed with similar errors.

Could it be caused by my config being wrong? I am running omeka-s on max big sur.

'http_client' => [
        'sslcapath' => null,
        'sslcafile' => null,
    ],
    'cli' => [
        'phpcli_path' => null,

I don’t think it would be anything in Omeka S’s config but rather something about your server/XAMPP setup.

This topic was automatically closed 250 days after the last reply. New replies are no longer allowed.