Removing an image from library => Unexpected Error, please contact support

I’m facing with this error when removing an image resource from library:

Unexpected Error, please contact support.

The permissions seem ok, this resource is replaced every day by the same user, to solve I have retired the affected image and prepared another similar one.

There’s a way to check the root issue ?

Which version of Xibo? Docker or not? What is logged in the CMS log for that error?

Xibo 1.8.1
Docker edition

error logged: SQLSTATE[21000]: Cardinality violation: 1242 Subquery returns more than 1 row Exception Type: PDOException

@dan any ideas on this?


CMS library folder has 0755 permission, every file inside has 0664.

It won’t be a filesystem issue. There’s an issue with the data in the database judging by the error. I don’t know the best way to go about tracking down what that is however.

It’s possible to connect Adminer to xibo database instance ?
If yes, what’s the port/user etc of the db ?

You can either connect something like PHPMyAdmin to the MySQL container (Change PHP-Code in 1.8 with Docker installation on Ubuntu), or you can connect to the database via the MySQL command line utility from the web container.

So, docker ps. From that, find the container that includes the name cms-web_1

Then, substitute name in the following

docker exec -ti name bash

That will get you a shell inside the web container. To connect to MySQL, you’d then run

mysql -u cms -h mysql -p cms

The password will be the one you set in config.env

Please avoid making direct changes however as we can’t offer support once you’ve done so. Many of the tables reference each other so it’s not safe to delete or modify things directly.

1 Like

I have notice another strange behaviour that can be related to this issue.
In our company we use Xibo to show injuries reports too, this report is an image that is update (replaced) every day, the image maintains the same name as is the name in Xibo library (injuries,jpg / Injuries),
I notice that after the bug descrived in the OP (that’s related to this resource) the replace function sometimes doesn’t work.
I have to retire/deleteevery time the resource and add a new one, using a different name for image name and resource, if I do not select a different name I do not receive any error but the image is not replaced.

There’s a way to force the deleting of the stuck resource (at the moment is flagged as retired) ?

Also tidy library function still not work.

Library tidy won’t delete files that you can’t delete manually. If it’s offering retire only, then the system thinks that file is in use somewhere.

For test I have added and removed a resource (an image), it’s in the library and NOT assigned elsewhere => tidy function doesn’t delete it.

If you manually delete it, does it allow you to do so? Or does it only allow you to retire?

Keep in mind also that we know you have other issues in your database may make this an invalid test - since the whole routine may be simply erroring as a result of that.

I can manually delete it.
Yep, I think that the db issue affects also tidy library function.
There’s a way to fix the stuck file ?

I have already asked Dan to take a look with you. When he has time, he will respond. If you require support with a particular SLA, then there are commercial options available.

Ok, I have no SLA so I can wait… anyway can you link me the commercial options ?

Can you please repeat the issue by running through the Report Fault Wizard (you could truncate your logs first to clean them out).

This will give us some extra auditing information to try and narrow down the issue.

I’ve logged an issue for the Library Tidy here:

1 Like

I have the, how can I share it to you ?

You’ll need to upload it (Dropbox, Google Drive etc) and then share the link to it in a PM.