Jump to content

Table 'database.field_ad_code' doesn't exist


formmailer
 Share

Recommended Posts

Hi!

I just installed Processwire and so far I like it very much.

But I just ran into a problem: I decided to add a field (textarea) to my pagetemplate and everything seemed to work ok, but when I'll try to edit a page I get the following error: Table 'database.field_ad_code' doesn't exist

Did I miss something?

Thanks for your help!

Kind regards,

Jasper

Link to comment
Share on other sites

I found the problem.

First I created a field Ad_code. Later I decided that it should be ad_code instead, so I changed the name. But obviously the name change did not change the name of the database table: Ad_code was there, but ad_code was missing.

I am not sure if this should be reported as a bug or not....

/Jasper

Link to comment
Share on other sites

I've had the same issue once, and was able to reproduce it on one server and not another. It seems to be related to some MySQL setting. MySQL seems to ignore the case when renaming a table, but then pays attention to the case when trying to select from it (resulting in an error). I ended up having to rename the table (field_Something) to something completely different (field_tmp), and then rename it back to the lowercase version (field_something), because MySQL did nothing when trying to rename field_Something to field_something.  I'm thinking we can avoid the problem entirely just by having PW enforce lowercase table names, regardless of the actual field name's case.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...