formmailer Posted August 9, 2011 Share Posted August 9, 2011 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 More sharing options...
Pete Posted August 9, 2011 Share Posted August 9, 2011 Does the mySQL user for your database have permissions to create/update/delete tables? It needs to be able to. That's all I can think of right now. Link to comment Share on other sites More sharing options...
formmailer Posted August 10, 2011 Author Share Posted August 10, 2011 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 More sharing options...
Adam Kiss Posted August 10, 2011 Share Posted August 10, 2011 Jasper, report is as issue on github: https://github.com/ryancramerdesign/P21/issues – if it'll be non-reproducible, we'll write it off as your machine Link to comment Share on other sites More sharing options...
formmailer Posted August 10, 2011 Author Share Posted August 10, 2011 Jasper, report is as issue on github: https://github.com/ryancramerdesign/P21/issues Will do! if it'll be non-reproducible, we'll write it off as your machine Sounds good. I usually blame the user. Link to comment Share on other sites More sharing options...
ryan Posted August 10, 2011 Share Posted August 10, 2011 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now