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/
Stack trace:
#0 /var/www/vhosts/ Omeka\Api\Manager->execute()
#1 /var/www/vhosts/ Omeka\Api\Manager->read()
#2 /var/www/vhosts/ Omeka\Controller\ApiController->get()
#3 /var/www/vhosts/ Laminas\Mvc\Controller\AbstractRestfulController->onDispatch()
#4 /var/www/vhosts/ Omeka\Controller\ApiController->onDispatch()
#5 /var/www/vhosts/ Laminas\EventManager\EventManager->triggerListeners()
#6 /var/www/vhosts/ Laminas\EventManager\EventManager->triggerEventUntil()
#7 /var/www/vhosts/ Laminas\Mvc\Controller\AbstractController->dispatch()
#8 /var/www/vhosts/ Laminas\Mvc\Controller\AbstractRestfulController->dispatch()
#9 /var/www/vhosts/ Laminas\Mvc\DispatchListener->onDispatch()
#10 /var/www/vhosts/ Laminas\EventManager\EventManager->triggerListeners()
#11 /var/www/vhosts/ Laminas\EventManager\EventManager->triggerEventUntil()
#12 /var/www/vhosts/ 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/
Stack trace:
#0 /var/www/vhosts/ Omeka\Api\Adapter\AbstractEntityAdapter->findEntity()
#1 /var/www/vhosts/ Omeka\Api\Adapter\AbstractEntityAdapter->read()
#2 /var/www/vhosts/ Omeka\Api\Manager->execute()
#3 /var/www/vhosts/ Omeka\Api\Manager->read()
#4 /var/www/vhosts/ Omeka\Mvc\MvcListeners->prepareSite()
#5 /var/www/vhosts/ Omeka\Mvc\MvcListeners->preparePublicSite()
#6 /var/www/vhosts/ Laminas\EventManager\EventManager->triggerListeners()
#7 /var/www/vhosts/ Laminas\EventManager\EventManager->triggerEventUntil()
#8 /var/www/vhosts/ 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.