<p>I created a Matrix field with 1 block type called "Logo" and 2 fields inside that: 1) a related entries field and 2) an image asset.  I then created a global that has this Matrix field in it that allows you to create up to 4 logo blocks in the Matrix.</p>

<p>When I try to create any number of logo blocks, whether I add an asset, choose an entry, or both, I get this CDb error when saving the global.</p>

<p>I get that the error is saying it can't locate a column of data it needs, but I don't know what the cause could be. I've tried deleting my Matrix field and global and starting over, but it's the same error each time.</p>

<p>I've checked the asset group for the logo images and everything seems fine: everything's named properly, no missing images, did an asset index update. No dice.</p>

<p>Here's a screenshot of the full error. I'm working on my local machine and the front end is unaffected.</p>

<p><a href="https://i.sstatic.net/OkVWy.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/OkVWy.png" alt="CDbException: Column not found"></a></p>

CC BY-SA 3.0
2016-04-21T02:28:01.527Z
Did you delete a field at some point in this process?
Brad Bell
CC BY-SA 3.0
2016-04-21T22:59:27.947Z
No, but I did mess with the organization of the image assets. Originally I nested the images to be like `press > logos > footer-logos` but then changed my mind after having originally set these fields up. I suspected this might have been responsible for the error, so I tried deleting my custom fields and starting over with the new asset structure.
Ryan
CC BY-SA 3.0
2016-04-22T00:02:47.973Z
If you do a database dump can you search the schema and see if your tables have foreign key constraints setup? It sounds like they might be missing.
Brad Bell
CC BY-SA 3.0
2016-04-22T00:26:34.997Z
I take it you mean export the db and do a search for CONSTRAINT or FOREIGN KEY?
Ryan
CC BY-SA 3.0
2016-04-22T00:27:43.467Z
That's exactly what I mean.
Brad Bell
CC BY-SA 3.0
2016-04-22T00:52:09.980Z
Yes, when I do a search for those two terms, they pop up everywhere. Do you want me to search in a particular table?
Ryan
CC BY-SA 3.0
2016-04-22T01:08:21.773Z
No, usually if it's missing from one, it's missing from all of them. Can you send a database dump to support@craftcms.com and reference this thread?
Brad Bell
CC BY-SA 3.0
2016-04-22T01:15:07.810Z
Yep, just sent :D
Ryan
<matrix><database>
CDbException: Column not found
# CDbException: Column not found

(Asked by: username_0 on 2016-04-20)

I created a Matrix field with 1 block type called "Logo" and 2 fields inside that: 1) a related entries field and 2) an image asset. I then created a global that has this Matrix field in it that allows you to create up to 4 logo blocks in the Matrix.

When I try to create any number of logo blocks, whether I add an asset, choose an entry, or both, I get this CDb error when saving the global.

I get that the error is saying it can't locate a column of data it needs, but I don't know what the cause could be. I've tried deleting my Matrix field and global and starting over, but it's the same error each time.

I've checked the asset group for the logo images and everything seems fine: everything's named properly, no missing images, did an asset index update. No dice.

Here's a screenshot of the full error. I'm working on my local machine and the front end is unaffected.

[![CDbException: Column not found](https://i.sstatic.net/OkVWy.png)](https://i.sstatic.net/OkVWy.png)

**Tags:** matrix, database
> **Comments:**
> **username_1**: Did you delete a field at some point in this process?  
> **username_0**: No, but I did mess with the organization of the image assets. Originally I nested the images to be like `press > logos > footer-logos` but then changed my mind after having originally set these fields up. I suspected this might have been responsible for the error, so I tried deleting my custom fields and starting over with the new asset structure.  
> **username_1**: If you do a database dump can you search the schema and see if your tables have foreign key constraints setup? It sounds like they might be missing.  
> **username_0**: I take it you mean export the db and do a search for CONSTRAINT or FOREIGN KEY?  
> **username_1**: That's exactly what I mean.  
> **username_0**: Yes, when I do a search for those two terms, they pop up everywhere. Do you want me to search in a particular table?  
> **username_1**: No, usually if it's missing from one, it's missing from all of them. Can you send a database dump to support@craftcms.com and reference this thread?  
> **username_0**: Yep, just sent :D  

---

## 0 answers

