I created a module, which I later deleted. The homepage of my site loads, and my categories page loads, but my products pages don't load.

I get an error saying

1 exception(s):
Exception #0 (ReflectionException): Class Company\Modulename\Model\Product\Attribute\FileUpload does not exist

That module doesn't exist. I've searched the entire project, and nothing that looks like that class exists.

I've delete var/viewpreprocessed, var/cache, var/page_cache, pub/static/frontend, pub/static/adminhtml, generated.

I've run setup/upgrade, setup:di:compile, setup:static-content:deploy -f, and c:c/c:f multiple times, and removed the record of the module from the db entirely, but it's changed nothing

Any other ideas?



If you have kept the module before deleting it, you may check the folder Setup within the module root folder.

If the module installs anything in the database, it may have created attribute in the database (this is quite common) and these attributes would point onto Models that might have disappeared.

you would need to delete (manually is possible) these new attributes. Do keep a backup of the database before doing this of course

  • @Toan Tam a lot of those directories don't exist anymore, but even so, that didn't work. – web master Jun 23 '20 at 12:35
  • That's probably it. It did add an EAV attribute. I'll look for it and delete it. – web master Jun 23 '20 at 12:35

Sometimes, I have this kind of issue. And I was able to fix it by running composer dump-autoload.

Can you try to run the following commands?

composer dump-autoload
rm -rf var/cache/ var/generation/ var/page_cache/ var/view_preprocessed/ var/di/ generated/* var/generation/*
  • what does "composer dump-autoload" do ? – devmage Jun 23 '20 at 5:35
  • 1
    It regenerates the list of classes that need to be included in the project. – Toan Tam Jun 23 '20 at 8:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.