I receive the following error only when I clear the cache:

enter image description here

When I try to rebuild the image index, all of my image paths go missing. I'm not sure what caused this error but I do need to fix it.

I've checked my image transforms and everything is named correctly. I even tried to delete and re-add and still nothing. I'm getting this same error on another one of my craft sites when I empty the cache.

I have no idea what's causing it.

I did come across this post: CDbException: Column not found

I read through the comments but no solution has been posted. I did a db search for CONSTRAINT or FOREIGN KEY and have both.

Any and all help is appreciated. Thanks in advance.


Things I tested and found:

I looked at the assettransformindex in the database and it was empty.

I ran an INSERT statement to populate the rows with proper information - it inserted successfully. I refreshed the site, the CBd exception was gone.

I cleared the cache, minus the image transform index and the site still worked perfectly.

I cleared the cache with image transform index selected and it stripped everything from the DB.

If I try to upload an asset that uses the transform, it throws the CBd exception again and clears the DB.

I hope this information helps... Thank you in advance.

  • My guess is there is an asset source path not setup somewhere correct. Can you upload Asset successfully though the asset index page?
    – Brad Bell
    Apr 28, 2016 at 23:56
  • Hi Brad. I'm able to upload an asset through the asset index page. I just double checked the asset paths and they all appear correct. When I try to update the asset index, I get the following error: "The following files could not be found. Should they be deleted from the index?" -- but those assets are all accessible from the front-end. Apr 29, 2016 at 1:44
  • Hrm... might be easier if you shared your file system directory structure and how you've got your local Asset sources defined.
    – Brad Bell
    Apr 29, 2016 at 16:52
  • @BradBell can I send you a copy of the site + db? If so, how can I send that info to you? Apr 29, 2016 at 21:00
  • If you want to zip them up and send them to [email protected], we can take a look at them.
    – Brad Bell
    Apr 29, 2016 at 21:31

1 Answer 1


Turns out this was because several tables were missing the MySQL auto-increment flag for their id integer primary keys.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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