We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'simplicity' for key 'name' | Forum

Topic location: Forum home » Development » Themes
IntrigU
IntrigU Nov 6 '15
Hi, I attempted to install Simplicity theme on 1.8. But it failed and I am now getting this error when navigating to the Themes section in the Admin panel:


Error details:

Type:Exception

Message:SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'simplicity' for key 'name'

File:/public_html/oxwal/ow_core/database.php

Line:720

Trace:#0 /public_html/oxwal/ow_core/database.php(720): PDOStatement->execute() #1 /public_html/oxwal/ow_core/database.php(473): OW_Database->execute('INSERT INTO `ox...', Array) #2 /public_html/oxwal/ow_core/database.php(509): OW_Database->insert('INSERT INTO `ox...', Array) #3 /public_html/oxwal/ow_core/base_dao.php(216): OW_Database->insertObject('oxwa_base_theme', Object(BOL_Theme)) #4 /public_html/oxwal/ow_system_plugins/base/bol/theme_service.php(210): OW_BaseDao->save(Object(BOL_Theme)) #5 /public_html/oxwal/ow_system_plugins/admin/controllers/themes.php(81): BOL_ThemeService->updateThemeList() #6 [internal function]: ADMIN_CTRL_Themes->chooseTheme(Array) #7 /public_html/oxwal/ow_core/request_handler.php(266): call_user_func_array(Array, Array) #8 /public_html/oxwal/ow_core/application.php(342): OW_RequestHandler->dispatch() #9 /public_html/oxwal/index.php(76): OW_Application->handleRequest() #10 {main}


Any help would be much appreciated.









The Forum post is edited by IntrigU Nov 6 '15
IntrigU
IntrigU Nov 6 '15
P.S. I've tried renaming the simplicity key in the DB but then I loose access to the Admin entirely with this error:


Error details:

Type:Exception

Message:Cant find theme `simplicity` in DB!

File:/public_html/oxwal/ow_system_plugins/base/bol/theme_service.php

Line:463

Trace:#0 /public_html/oxwal/ow_core/theme_manager.php(86): BOL_ThemeService->getThemeObjectByName('simplicity', false) #1 /public_html/oxwal/ow_core/application.php(163): OW_ThemeManager->initDefaultTheme() #2 /public_html/oxwal/index.php(54): OW_Application->init() #3 {main}


It looks like it is stuck in some sort of limbo state....

The Forum post is edited by IntrigU Nov 6 '15
Darryl B Leader
Darryl B Nov 6 '15
Install, or activate? The theme is included in version 1.8, and just needs to be activated from the admin panel. 
IntrigU
IntrigU Nov 6 '15
Darryl,


It was not available for activation in the Admin Panel, so I downloaded and attempted to install. It appears that the files and db entries for the theme were already present though. I think that's what's caused it to crash.
Any ideas on how to revert back and get access to the theme section in the Admin panel?



Darryl B Leader
Darryl B Nov 6 '15
Something must have went south on the update to 1.8. You could try uploading the Simplicity theme file to cpanel using ftp, I do this by creating a folder to upload to, unzip the file there, then copy the file over into the theme folder to see if it will overwrite the files,and maybe correct the issue. Other than that Ross may need to jump in with cpanel access. I would post it in the support section as well. It seems to get more attention to issues like this.
IntrigU
IntrigU Nov 6 '15
Thanks Daryl,


I have already tried to overwrite the theme directory, but same error appears. Will post this in support. If anything else comes to mind would be great to hear from you!

Darryl B Leader
Darryl B Nov 6 '15
If you have a backup of your database, you could try restoring at a point prior to installing the theme. It wouldn't solve your overall issue, but should get you back to where you started.
IntrigU
IntrigU Nov 6 '15
Hi Darryl, I 've considered that option, but my latest backup is about a week old, with many changes to the site in that period. So I am hoping to get it fixed. 


It appears that something's triggering the install script for the theme even though it's already there. Just need to find what that is and disable it...

Darryl B Leader
Darryl B Nov 6 '15
Yea. Sounds like it's hung in a loop since there are files present for the Simplicity theme, but it wasn't showing. From what you are saying; it's like the update never finished, and is still trying to complete.
IntrigU
IntrigU Nov 6 '15
Daryl,


This is afresh install of 1.8. So there shouldn't be any hanging update tasks...

IntrigU
IntrigU Nov 6 '15
I'm not sure what on earth happened but the error is gone now. The only change I made was to fix an unrelated issue with  mailchimp plugin described here: http://www.oxwall.org/forum/topic/20266


Thanks for your help Darryl!

The Forum post is edited by IntrigU Nov 6 '15
IntrigU
IntrigU Nov 6 '15
Having thought of that, the mailchimp issue was somehow interfering with the cron run and causing the simplicity theme to be stuck in the install state. I still don't see simplicity in the list of available themes though....


Attachments:
  Capture.JPG (62Kb)