Error 500 in company logo settings

Migrated InvoiceNinja installation from one host to another. Instead of copying the files from old installation, I only downloaded the zip of the latest version (release from GitHub) on the new host, extracted, and copied over the DB (since we didn’t use any of the file storage features etc.) and entered the DB creds of the new host. Everything works… except, I forgot that I had a company logo uploaded for one company on the old installation which was stored in the files I didn’t copy over. So now when I go to Settings>Company Details>Logo and press Delete it shows Error 500: server error. I suspect it’s due to some reference in the database still pointing to the old non existent image path. Upload new logo also doesn’t work.
How can I clear any past references to the old logo file so it doesn’t give 500 in the logo settings (where is logo path referenced in DB)?

Hi,

Are there any details about the error in storage/logs when uploading a new image?

I’m attaching the error that happens when try to delete logo (too big to paste text here). Probably the database wasn’t updated on version change, need to run some migrations to patch the DB? Migrated from v5.5.119 to v5.6.19.
companylogoerrorlog.txt (39.6 KB)

Since the image doesn’t exist on the server it makes sense that you’d see an error when deleting, however I’d expect you to be able to upload a new image.

For other companies on this invoiceninja instance that didn’t have a previous logo setup, there is no delete button so there is no error. Adding logo also works fine. And when I add a logo and try to delete it, there’s no errors.

However- for the company that had a logo previously and the file wasn’t imported (only DB), the DELETE logo button won’t disappear and gives error 500 and so does the upload logo button sometimes. So that is why there must still be some reference to the old image somewhere that I need to remove.

@david do you have any suggestions?

@icedroit

We’ll handle this edge case for the next release.

1 Like