We’ve been experiencing a problem with the ‘CSV Import’ plugin since we upgraded to PHP 8.
Whatever file is sent, including files that have worked in the past, an error is displayed: ‘import settings expired’.
Server technical data :
Omeka Classic 3.1.2
PHP 8.1.2
Zend Engine v4.1.2
mysql Ver 8.0.41
Apache/2.4.52
Has anyone found a solution to this problem ? Thank
maybe it’s because of our server?
here’s a csv file that was imported successfully
even mapping to a single column doesn’t work, and I’ve tried on several php files http://eman-archives.org/creation_notice_theatre-sophistes2.csv
thanks in advance
best
richard
Hi ! I am currently working with Richard on several Omeka projects.
I have been investigating this issue in the past few days and i was able to narrow down the issue.
It seems that the ‘import settings expired’ flash message comes from the fact that the sessions expires before we send the “/map-columns” form.
By default, the session is set to expire after 2 hops (L58 in IndexController.php : $this->session->setExpirationHops(2);).
By using the devtools to monitor the network, it appears that 3 request are fired before the job is started :
POST request that sends the data contained in the “/csv-import” form.
GET request from the redirection fired after the previous request that get us the “/map-columns” page
POST request that sends the “/map-colums” form’s data and starts the job.
Redirection to the browse page.
Expected requests :
With the expiration of the session set after 2 hops, it seems that request 3 can’t be verified with the function _isSessionValid() and the data stored in the session are lost.
I assumed that the POST requests are counted as “hops” even though we are not trully hopping.
A workaround i have found is to change the following line from :
This way, the hop counter decrease only when we are redirected and does not take into account the POST request. And it won’t change anything for the users that are not dealing with this issue if i understand correctly how Zend_Session_Namespace is working.
I would like to have your insight because i might be overlooking some things here.