Can't Add Items after upgrade

Upgraded to 4.1.0 and can’t add items. Everything goes fine but when I get to the Item Set, I click on one and it disappears from the list. If I try to go ahead and, it errors. The logs say:

2024-05-10T13:09:22+00:00 ERR (3): Omeka\Api\Exception\BadRequestException: The API does not support the “v1” resource. in /var/www/vhosts/tplibrary.org/local-history/application/src/Api/Manager.php:200
Stack trace:
#0 /var/www/vhosts/tplibrary.org/local-history/application/src/Api/Manager.php(115): Omeka\Api\Manager->execute()
#1 /var/www/vhosts/tplibrary.org/local-history/application/src/Controller/ApiController.php(81): Omeka\Api\Manager->read()
#2 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-mvc/src/Controller/AbstractRestfulController.php(373): Omeka\Controller\ApiController->get()
#3 /var/www/vhosts/tplibrary.org/local-history/application/src/Controller/ApiController.php(169): Laminas\Mvc\Controller\AbstractRestfulController->onDispatch()
#4 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Omeka\Controller\ApiController->onDispatch()
#5 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners()
#6 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-mvc/src/Controller/AbstractController.php(97): Laminas\EventManager\EventManager->triggerEventUntil()
#7 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-mvc/src/Controller/AbstractRestfulController.php(307): Laminas\Mvc\Controller\AbstractController->dispatch()
#8 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-mvc/src/DispatchListener.php(132): Laminas\Mvc\Controller\AbstractRestfulController->dispatch()
#9 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\DispatchListener->onDispatch()
#10 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners()
#11 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-mvc/src/Application.php(325): Laminas\EventManager\EventManager->triggerEventUntil()
#12 /var/www/vhosts/tplibrary.org/local-history/index.php(21): Laminas\Mvc\Application->run()

If I try adding one without adding an Item Set, it errors still and logs this:

2024-05-10T14:57:06+00:00 ERR (3): Omeka\Api\Exception\NotFoundException: Omeka\Entity\Site entity with criteria {“slug”:“pamphlet”} not found in /var/www/vhosts/tplibrary.org/local-history/application/src/Api/Adapter/AbstractEntityAdapter.php:722
Stack trace:
#0 /var/www/vhosts/tplibrary.org/local-history/application/src/Api/Adapter/AbstractEntityAdapter.php(440): Omeka\Api\Adapter\AbstractEntityAdapter->findEntity()
#1 /var/www/vhosts/tplibrary.org/local-history/application/src/Api/Manager.php(230): Omeka\Api\Adapter\AbstractEntityAdapter->read()
#2 /var/www/vhosts/tplibrary.org/local-history/application/src/Api/Manager.php(115): Omeka\Api\Manager->execute()
#3 /var/www/vhosts/tplibrary.org/local-history/application/src/Mvc/MvcListeners.php(396): Omeka\Api\Manager->read()
#4 /var/www/vhosts/tplibrary.org/local-history/application/src/Mvc/MvcListeners.php(313): Omeka\Mvc\MvcListeners->prepareSite()
#5 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Omeka\Mvc\MvcListeners->preparePublicSite()
#6 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners()
#7 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-mvc/src/Application.php(304): Laminas\EventManager\EventManager->triggerEventUntil()
#8 /var/www/vhosts/tplibrary.org/local-history/index.php(21): Laminas\Mvc\Application->run()
#9 {main}

Neither of these errors looks related to the problem you described. Are you sure you’ve gotten the right error messages?

The first is an attempt to go to a /v1 URL in the REST API, and the second is an attempt to visit a private or nonexistent site “pamphlet.”

I can confirm the problem where the item sets “disappear” when you try to add them (they’re actually being added but we’re not correctly showing the list of current sets there), but that shouldn’t cause an error when saving.

So whatever you have going on that’s causing an error is probably unrelated to that.

Sorry for the delay in the response, those are the only error messages coming up on the log and that’s the only thing I was doing (uploading items).

I just tried to upload again, got the same error when I try to add item and this is what the error log says:

2024-06-05T04:36:29+00:00 ERR (3): Omeka\Api\Exception\BadRequestException: The API does not support the “config” resource. in /var/www/vhosts/tplibrary.org/local-history/application/src/Api/Manager.php:200
Stack trace:
#0 /var/www/vhosts/tplibrary.org/local-history/application/src/Api/Manager.php(59): Omeka\Api\Manager->execute()
#1 /var/www/vhosts/tplibrary.org/local-history/application/src/Controller/ApiController.php(103): Omeka\Api\Manager->search()
#2 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-mvc/src/Controller/AbstractRestfulController.php(377): Omeka\Controller\ApiController->getList()
#3 /var/www/vhosts/tplibrary.org/local-history/application/src/Controller/ApiController.php(169): Laminas\Mvc\Controller\AbstractRestfulController->onDispatch()
#4 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Omeka\Controller\ApiController->onDispatch()
#5 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners()
#6 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-mvc/src/Controller/AbstractController.php(97): Laminas\EventManager\EventManager->triggerEventUntil()
#7 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-mvc/src/Controller/AbstractRestfulController.php(307): Laminas\Mvc\Controller\AbstractController->dispatch()
#8 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-mvc/src/DispatchListener.php(132): Laminas\Mvc\Controller\AbstractRestfulController->dispatch()
#9 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\DispatchListener->onDispatch()
#10 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners()
#11 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-mvc/src/Application.php(325): Laminas\EventManager\EventManager->triggerEventUntil()
#12 /var/www/vhosts/tplibrary.org/local-history/index.php(21): Laminas\Mvc\Application->run()
#13 {main}
2024-06-05T04:36:30+00:00 ERR (3): Omeka\Api\Exception\BadRequestException: The API does not support the “config” resource. in /var/www/vhosts/tplibrary.org/local-history/application/src/Api/Manager.php:200
Stack trace:
#0 /var/www/vhosts/tplibrary.org/local-history/application/src/Api/Manager.php(59): Omeka\Api\Manager->execute()
#1 /var/www/vhosts/tplibrary.org/local-history/application/src/Controller/ApiController.php(103): Omeka\Api\Manager->search()
#2 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-mvc/src/Controller/AbstractRestfulController.php(377): Omeka\Controller\ApiController->getList()
#3 /var/www/vhosts/tplibrary.org/local-history/application/src/Controller/ApiController.php(169): Laminas\Mvc\Controller\AbstractRestfulController->onDispatch()
#4 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Omeka\Controller\ApiController->onDispatch()
#5 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners()
#6 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-mvc/src/Controller/AbstractController.php(97): Laminas\EventManager\EventManager->triggerEventUntil()
#7 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-mvc/src/Controller/AbstractRestfulController.php(307): Laminas\Mvc\Controller\AbstractController->dispatch()
#8 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-mvc/src/DispatchListener.php(132): Laminas\Mvc\Controller\AbstractRestfulController->dispatch()
#9 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\DispatchListener->onDispatch()
#10 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners()
#11 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-mvc/src/Application.php(325): Laminas\EventManager\EventManager->triggerEventUntil()
#12 /var/www/vhosts/tplibrary.org/local-history/index.php(21): Laminas\Mvc\Application->run()
#13 {main}
2024-06-05T04:36:30+00:00 ERR (3): Omeka\Api\Exception\BadRequestException: The API does not support the “config” resource. in /var/www/vhosts/tplibrary.org/local-history/application/src/Api/Manager.php:200
Stack trace:
#0 /var/www/vhosts/tplibrary.org/local-history/application/src/Api/Manager.php(59): Omeka\Api\Manager->execute()
#1 /var/www/vhosts/tplibrary.org/local-history/application/src/Controller/ApiController.php(103): Omeka\Api\Manager->search()
#2 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-mvc/src/Controller/AbstractRestfulController.php(377): Omeka\Controller\ApiController->getList()
#3 /var/www/vhosts/tplibrary.org/local-history/application/src/Controller/ApiController.php(169): Laminas\Mvc\Controller\AbstractRestfulController->onDispatch()
#4 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Omeka\Controller\ApiController->onDispatch()
#5 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners()
#6 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-mvc/src/Controller/AbstractController.php(97): Laminas\EventManager\EventManager->triggerEventUntil()
#7 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-mvc/src/Controller/AbstractRestfulController.php(307): Laminas\Mvc\Controller\AbstractController->dispatch()
#8 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-mvc/src/DispatchListener.php(132): Laminas\Mvc\Controller\AbstractRestfulController->dispatch()
#9 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\DispatchListener->onDispatch()
#10 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners()
#11 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-mvc/src/Application.php(325): Laminas\EventManager\EventManager->triggerEventUntil()
#12 /var/www/vhosts/tplibrary.org/local-history/index.php(21): Laminas\Mvc\Application->run()
#13 {main}
2024-06-05T05:48:21+00:00 ERR (3): Omeka\Api\Exception\NotFoundException: Omeka\Entity\Site entity with criteria {“slug”:“pamphlet”} not found in /var/www/vhosts/tplibrary.org/local-history/application/src/Api/Adapter/AbstractEntityAdapter.php:722
Stack trace:
#0 /var/www/vhosts/tplibrary.org/local-history/application/src/Api/Adapter/AbstractEntityAdapter.php(440): Omeka\Api\Adapter\AbstractEntityAdapter->findEntity()
#1 /var/www/vhosts/tplibrary.org/local-history/application/src/Api/Manager.php(230): Omeka\Api\Adapter\AbstractEntityAdapter->read()
#2 /var/www/vhosts/tplibrary.org/local-history/application/src/Api/Manager.php(115): Omeka\Api\Manager->execute()
#3 /var/www/vhosts/tplibrary.org/local-history/application/src/Mvc/MvcListeners.php(396): Omeka\Api\Manager->read()
#4 /var/www/vhosts/tplibrary.org/local-history/application/src/Mvc/MvcListeners.php(313): Omeka\Mvc\MvcListeners->prepareSite()
#5 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Omeka\Mvc\MvcListeners->preparePublicSite()
#6 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners()
#7 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-mvc/src/Application.php(304): Laminas\EventManager\EventManager->triggerEventUntil()
#8 /var/www/vhosts/tplibrary.org/local-history/index.php(21): Laminas\Mvc\Application->run()
#9 {main}

The trick with those other errors, like the “Omeka\Api\Exception\NotFoundException” one, is that they can be triggered by simply people or bots visiting the site. So they aren’t necessarily (or likely) associated with what you’re doing yourself.

So on these, note the dates. When did you try to make your change?

The earlier messages are from 4:36, the later from 5:48 (UTC). If your server time is correct those are from many hours ago, not recently.

When the save errors, what do you see? An “Omeka has encountered an error” page? Something else?

It would be the more recent one, I hadn’t even logged in earlier then that on the day.

Yes, when I go to add the item, it gives me that error but ONLY when I have a media attached. And I tried it with different ones too (pdf, jpg, png) and it’s the same. I had also turned off all the modeuls too and it didn’t make a difference.

Sorry, but when you say “that error,” what’s the error? An error screen, or another kind of message?

A screenshot would be helpful.

Sorry, should have been clearer. WhenI try to upload I get this screen:

I’m also attaching the error log as well. Ah, actually when I look at the error log there is no entry for what I did today (still got the message above tho).

OK.

Can you follow the instructions under “Display error details” on this manual page? That should have the error display directly on this screen you’re seeing.

Yes! And doing so caused all these errors to come up on the page:

Deprecated : Use of “self” in callables is deprecated in /var/www/vhosts/tplibrary.org/local-history/modules/AmazonS3/vendor/aws/aws-sdk-php/src/S3/RegionalEndpoint/ConfigurationProvider.php on line 83

Deprecated : Use of “self” in callables is deprecated in /var/www/vhosts/tplibrary.org/local-history/modules/AmazonS3/vendor/aws/aws-sdk-php/src/DefaultsMode/ConfigurationProvider.php on line 85

Deprecated : Use of “self” in callables is deprecated in /var/www/vhosts/tplibrary.org/local-history/modules/AmazonS3/vendor/aws/aws-sdk-php/src/Endpoint/UseFipsEndpoint/ConfigurationProvider.php on line 82

Deprecated : Use of “self” in callables is deprecated in /var/www/vhosts/tplibrary.org/local-history/modules/AmazonS3/vendor/aws/aws-sdk-php/src/Endpoint/UseDualstackEndpoint/ConfigurationProvider.php on line 83

Deprecated : Use of “self” in callables is deprecated in /var/www/vhosts/tplibrary.org/local-history/modules/AmazonS3/vendor/aws/aws-sdk-php/src/EndpointDiscovery/ConfigurationProvider.php on line 86

Deprecated : Use of “self” in callables is deprecated in /var/www/vhosts/tplibrary.org/local-history/modules/AmazonS3/vendor/aws/aws-sdk-php/src/Retry/ConfigurationProvider.php on line 88

Deprecated : Use of “self” in callables is deprecated in /var/www/vhosts/tplibrary.org/local-history/modules/AmazonS3/vendor/aws/aws-sdk-php/src/ClientSideMonitoring/ConfigurationProvider.php on line 90

Deprecated : Use of “self” in callables is deprecated in /var/www/vhosts/tplibrary.org/local-history/modules/AmazonS3/vendor/aws/aws-sdk-php/src/S3/UseArnRegion/ConfigurationProvider.php on line 83

This is what I get now after uploading:

Omeka\Mvc\Exception\RuntimeException
POST request exceeded maximum size

Details:

Omeka\Mvc\Exception\RuntimeException: POST request exceeded maximum size in /var/www/vhosts/tplibrary.org/local-history/application/src/Mvc/MvcListeners.php:373 Stack trace: #0 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Omeka\Mvc\MvcListeners->checkExcessivePost() #1 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners() #2 /var/www/vhosts/tplibrary.org/local-history/vendor/laminas/laminas-mvc/src/Application.php(304): Laminas\EventManager\EventManager->triggerEventUntil() #3 /var/www/vhosts/tplibrary.org/local-history/index.php(21): Laminas\Mvc\Application->run() #4 {main}

OK, great: POST request exceeded maximum size is the actual error we’re working with here. You could undo that change you made to show the error now, if you like.

That error happens when you’re trying to upload something that exceeds the size limit set by your server. This is a php.ini setting, called post_max_size. If you click the “System information” link in the footer of any admin page, the page that takes you too will list, among other things, this maximum size, as “POST Size Limit”.

If it’s happening with any kind of file you try, I’d guess that the limit is set uncommonly low. Usually it’s in the tens of megabytes even on the low side.

Huh, that’s weird it’s changed, I haven’t ever gone in and adjusted it. But that seemed to work, thank you!