apeisa Posted September 17, 2011 Share Posted September 17, 2011 TemplateFile: Table 'muksut.field_tiedostot_END' doesn't exist DELETE FROM `field_tiedostot_END` WHERE pages_id=5857 #0 /srv/www/P21/wire/core/Fieldtype.php(580): Database->query('DELETE FROM `fi...') #1 [internal function]: Fieldtype->___deletePageField(Object(Page), Object(Field)) #2 /srv/www/P21/wire/core/Wire.php(267): call_user_func_array(Array, Array) #3 /srv/www/P21/wire/core/Wire.php(229): Wire->runHooks('deletePageField', Array) #4 [internal function]: Wire->__call('deletePageField', Array) #5 /srv/www/P21/wire/core/Pages.php(708): FieldtypeFieldsetClose->deletePageField(Object(Page), Object(Field)) #6 [internal function]: Pages->___delete(Object(Page), true) #7 /srv/www/P21/wire/core/Wire.php(267): call_user_func_array(Array, Array) #8 /srv/www/P21/wire/core/Wire.php(229): Wire->runHooks('delete', Array) #9 [internal function]: Wire->__call('delete', Array) #10 /srv/www/P21/wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module(704): Pages->delete(Object(Page), true) #11 /srv/www/P21/wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module(151): ProcessPageEdit->deletePage() #12 /srv/www/P21/wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module(102): ProcessPageEdit->processSave() #13 [internal function]: ProcessPageEdit->___execute() #14 /srv/www/P21/wire/core/Wire.php(267): call_user_func_array(Array, Array) #15 /srv/www/P21/wire/core/Wire.php(229): Wire->runHooks('execute', Array) #16 [internal function]: Wire->__call('execute', Array) #17 /srv/www/P21/wire/core/ProcessController.php(194): ProcessPageEdit->execute() #18 [internal function]: ProcessController->___execute() #19 /srv/www/P21/wire/core/Wire.php(267): call_user_func_array(Array, Array) #20 /srv/www/P21/wire/core/Wire.php(229): Wire->runHooks('execute', Array) #21 [internal function]: Wire->__call('execute', Array) #22 /srv/www/P21/wire/core/admin.php(45): ProcessController->execute() #23 /srv/www/P21/wire/templates-admin/controller.php(13): require('/srv/www/P21/wi...') #24 /srv/www/muksut.com/live/site/templates/admin.php(13): require('/srv/www/P21/wi...') #25 /srv/www/P21/wire/core/TemplateFile.php(88): require('/srv/www/muksut...') #26 [internal function]: TemplateFile->___render() #27 /srv/www/P21/wire/core/Wire.php(267): call_user_func_array(Array, Array) #28 /srv/www/P21/wire/core/Wire.php(229): Wire->runHooks('render', Array) #29 [internal function]: Wire->__call('render', Array) #30 /srv/www/P21/wire/modules/PageRender.module(194): TemplateFile->render() #31 [internal function]: PageRender->___renderPage(Object(HookEvent)) #32 /srv/www/P21/wire/core/Wire.php(267): call_user_func_array(Array, Array) #33 /srv/www/P21/wire/core/Wire.php(229): Wire->runHooks('renderPage', Array) #34 [internal function]: Wire->__call('renderPage', Array) #35 /srv/www/P21/wire/core/Wire.php(289): PageRender->renderPage(Object(HookEvent)) #36 /srv/www/P21/wire/core/Wire.php(229): Wire->runHooks('render', Array) #37 [internal function]: Wire->__call('render', Array) #38 /srv/www/P21/wire/modules/Process/ProcessPageView.module(73): Page->render() #39 [internal function]: ProcessPageView->___execute() #40 /srv/www/P21/wire/core/Wire.php(267): call_user_func_array(Array, Array) #41 /srv/www/P21/wire/core/Wire.php(229): Wire->runHooks('execute', Array) #42 [internal function]: Wire->__call('execute', Array) #43 /srv/www/muksut.com/live/index.php(170): ProcessPageView->execute() #44 {main} Page that I try to remove does have tiedostot_END field assigned. In my db it is actually field_tiedostot_end, not END. Not sure if this is something that got fixed recently in new installations? This site has been installed few months ago. Link to comment Share on other sites More sharing options...
ryan Posted September 18, 2011 Share Posted September 18, 2011 Like you said, the problem is that the database table is lowercase "_end" and the system thinks it's uppercase "_END". The question is where the lowercase version same from. I just tried creating some fieldsets but the tables are all ending up with uppercase _END as they should. Can you think of any other factors that might have resulted in the database table ending up with a lowercase version of the field? Thanks, Ryan Link to comment Share on other sites More sharing options...
apeisa Posted September 18, 2011 Author Share Posted September 18, 2011 Just tested and created new FieldsetTabOpen and it saved it _END. This must have happened in db export => import process. I have used phpmyadmin with pretty much default settings. I did import from win localhost to ubuntu server. Interesting read: http://www.sitepoint.com/mysql-table-naming/ Should pw force lowercase table names to prevent things like this happening? Link to comment Share on other sites More sharing options...
ryan Posted September 18, 2011 Share Posted September 18, 2011 That is interesting. I wasn't aware of that issue with MySQL tables... can't say that it's ever occurred here, so hadn't considered those potential issues. I guess we should go all lowercase. But doing so would break existing installs. So will probably will need to come up with a new config toggle for this. 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