Missing slugs error

Hello1
I just upgraded to the latest Omeka S, but after deleting some pages from the installation i get the error below. Anyone has had this issue? Thanks

Omeka\Api\Exception\NotFoundException: Omeka\Entity\Site entity with criteria {“slug”:“korca”} not found in /home/albanon1/adsh.al/application/src/Api/Adapter/AbstractEntityAdapter.php:714 Stack trace: #0 /home/albanon1/adsh.al/application/src/Api/Adapter/AbstractEntityAdapter.php(432): Omeka\Api\Adapter\AbstractEntityAdapter->findEntity(Array, Object(Omeka\Api\Request)) #1 /home/albanon1/adsh.al/application/src/Api/Manager.php(230): Omeka\Api\Adapter\AbstractEntityAdapter->read(Object(Omeka\Api\Request)) #2 /home/albanon1/adsh.al/application/src/Api/Manager.php(115): Omeka\Api\Manager->execute(Object(Omeka\Api\Request)) #3 /home/albanon1/adsh.al/application/src/Mvc/MvcListeners.php(396): Omeka\Api\Manager->read(‘sites’, Array) #4 /home/albanon1/adsh.al/application/src/Mvc/MvcListeners.php(313): Omeka\Mvc\MvcListeners->prepareSite(Object(Laminas\Mvc\MvcEvent)) #5 /home/albanon1/adsh.al/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Omeka\Mvc\MvcListeners->preparePublicSite(Object(Laminas\Mvc\MvcEvent)) #6 /home/albanon1/adsh.al/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure)) #7 /home/albanon1/adsh.al/vendor/laminas/laminas-mvc/src/Application.php(304): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent)) #8 /home/albanon1/adsh.al/index.php(21): Laminas\Mvc\Application->run() #9 {main}

Did you delete a site? This error is saying the site with slug “korca” doesn’t exist.

@jflatnes yes i deleted a couple of sites. Is the system suppose to query of the deleted sites?

This looks like you’re trying to visit the deleted site. What URL are you accessing that shows this error?

I am visiting the only site left on my installation. It generates to many errors and the log keeps building up.
https://adsh.al/

I don’t have a problem visiting that URL. Maybe you had the old one set as your default site and your browser has cached the old redirect? Try clearing your browser’s cache and see if that helps.

The remaining site works, with a few issues, however the Log module has errors like in the attached image that build up very quickly. There are now close to 2000 logs. I cleaned the cache many times, tried different themes, it still looking for the deleted sites. Is it better to do a fresh installation and transfer all the items?

Is it just these log entries you’re seeing?

That could just be caused by bots or crawlers (or other visitors) trying to visit your now-deleted site.

1 Like

These types of logs are mostly the ones i am seeing.

I am also getting this error when trying to install a new module on an existing site. I get Omeka\Api\Exception\NotFoundException: Omeka\Entity\Site entity with criteria {“slug”:“my-slug”} not found in /var/www/html/application/src/Api/Adapter/AbstractEntityAdapter.php:714

When I check the database the site and the slug are both there, and the site performs normally.

Full stack trace:

#0 /var/www/html/application/src/Api/Adapter/AbstractEntityAdapter.php(432): Omeka\Api\Adapter\AbstractEntityAdapter->findEntity(Array, Object(Omeka\Api\Request))
#1 /var/www/html/application/src/Api/Manager.php(230): Omeka\Api\Adapter\AbstractEntityAdapter->read(Object(Omeka\Api\Request))
#2 /var/www/html/application/src/Api/Manager.php(115): Omeka\Api\Manager->execute(Object(Omeka\Api\Request))
#3 /var/www/html/application/src/Mvc/MvcListeners.php(393): Omeka\Api\Manager->read(‘sites’, Array)
#4 /var/www/html/application/src/Mvc/MvcListeners.php(314): Omeka\Mvc\MvcListeners->prepareSite(Object(Laminas\Mvc\MvcEvent))
#5 /var/www/html/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Omeka\Mvc\MvcListeners->preparePublicSite(Object(Laminas\Mvc\MvcEvent))
#6 /var/www/html/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure))
#7 /var/www/html/vendor/laminas/laminas-mvc/src/Application.php(304): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent))
#8 /var/www/html/index.php(21): Laminas\Mvc\Application->run()
#9 {main}

Just to clarify for the same reasons, you’re getting this error where? If you’re looking in the error log, you can easily be looking at just a normal 404 and not something that indicates a problem. If your site is private, for example, an attempt by a non-logged-in user (or a bot/crawler) to visit the site would log this error.

Correct. In either public or private I see this error when trying to install the Robots module. The module is in the modules directory, the module page can see it, and I get this error when I click Install as an administrator

And this error, the NotFoundException and all the text you pasted, is displayed on the error page you see when you click Install?

The reason I ask is that your trace for the error doesn’t indicate a request to install a module. So it looks like an error that would not be related.

When I click install I see this -

Omeka S encountered an error

To learn how to see more detailed information about this error, see the Omeka S User Manual page on retrieving error messages.

When I look at the log page I’m seeing hundreds of these entries (we’re getting hammered by bots ATM) If this is not the relevant error I’ll see if I can find something more telling in the database

So, that page doesn’t indicate a specific error, like the one you posted, but just that there’s an error. I’m fairly certain that what’s happening is that the error you’re finding in the log is not the one you’re getting here (the best evidence there is that the trace looks wrong for this).

The link to “retrieving error messages” offers an option to display the error (“Display error details”). If you follow those instructions, the error page you get should directly include the relevant error right on the page so you’re certain you’re looking at the right one.

I cleared the logs, and tried the module install again, and there were (within a minute) several hundred of the entries above, but no entry specifically relating to the module install. Each of the errors in the log table was identical.

I’m… about 99% sure that what’s happening here is just that a bot or crawler is trying many times to load the site mentioned in these errors, and the site either doesn’t exist or is private, so those attempts cause “not found” errors to be logged. Since it’s getting crawled so much, there are enough of these to fill your view of the log when you go to look for the error from your module install.

You were correct that the actual error was buried in a pile of others.
The actual error is

Laminas\ServiceManager\Exception\ServiceNotFoundException: Unable to resolve service “EasyMeta” to a factory; are you certain you provided it during configuration? in /var/www/html/vendor/laminas/laminas-servicemanager/src/ServiceManager.php:559

This seems like an issue possibly related to the module having a dependency on another module called “Common”… you might try reporting it to the developer at the Robots module’s issue tracker.

If you do report it, be sure to include the entire error, including the “stack trace” lines.

Thanks for your help with this - I installed Common, and everything works as it should now.