Closed (duplicate)
Project:
Drupal core
Version:
6.13
Component:
system.module
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Apr 2009 at 23:34 UTC
Updated:
20 Dec 2010 at 14:14 UTC
Even though this theme is disabled and the theme page wasn't being viewed I get this error. New error appears for every theme, disabled or enabled.
Location admin/content/node2?order=changed&sort=desc - Views Bulk Operations Page
Referrer admin/reports/dblog?page=2
Duplicate entry 'themes/pushbutton/pushbutton.info' for key 1 query: INSERT INTO system (name, owner, info, type, filename, status, throttle, bootstrap) VALUES ('pushbutton', 'themes/engines/phptemplate/phptemplate.engine', 'a:13:{s:4:\"name\";s:10:\"Pushbutton\";s:11:\"description\";s:52:\"Tabled, multi-column theme in blue and orange tones.\";s:7:\"version\";s:4:\"6.10\";s:4:\"core\";s:3:\"6.x\";s:6:\"engine\";s:11:\"phptemplate\";s:7:\"project\";s:6:\"drupal\";s:9:\"datestamp\";s:10:\"1235596218\";s:7:\"regions\";a:5:{s:4:\"left\";s:12:\"Left sidebar\";s:5:\"right\";s:13:\"Right sidebar\";s:7:\"content\";s:7:\"Content\";s:6:\"header\";s:6:\"Header\";s:6:\"footer\";s:6:\"Footer\";}s:8:\"features\";a:10:{i:0;s:20:\"comment_user_picture\";i:1;s:7:\"favicon\";i:2;s:7:\"mission\";i:3;s:4:\"logo\";i:4;s:4:\"name\";i:5;s:17:\"node_user_picture\";i:6;s:6:\"search\";i:7;s:6:\"slogan\";i:8;s:13:\"primary_links\";i:9;s:15:\"secondary_links\";}s:11:\"stylesheets\";a:1:{s:3:\"all\";a:1:{s:9:\"style.css\";s:27:\"themes/pushbutton/style.css\";}}s:7:\"scripts\";a:1:{s:9:\"script.js\";s:27:\"themes/pushbutton/script.js\";}s:10:\"screenshot\";s:32:\"themes/pushbutton/screenshot.png\";s:3:\"php\";s:5:\"4.3.5\";}', 'theme', 'themes/pushbutton/pushbutton.info', 0, 0, 0) in /modules/system/system.module on line 821.
Don't know what triggers this error, it's not VBO.
Comments
Comment #1
skizzo commentedI am seeing the same error for all my themes (Garland variations)
see also http://drupal.org/node/367966
Comment #2
mikeytown2 commentedLooks like this error is in the 7.x branch as well. Usual process is to fix it there then back port it.
http://api.drupal.org/api/function/system_theme_data
Comment #3
mikeytown2 commentedhttp://api.drupal.org/api/function/db_lock_table would be a bad fix for 6.x; what about 7.x?
Should we set a semaphore?
Comment #4
berdirCan someone check if this still happens with latest D7? Those functions were changed and do now use the same logic to insert themes as modules do.
Comment #5
mikeytown2 commentedLooking at the code in http://api.drupal.org/api/function/system_update_files_database/7 and it goes over each entry, updating them if they exist, killing if they don't; in 6.x it deleted first. The should not be a problem for 7.x.
Moving this back to a 6.x bug report.
Comment #6
crea commentedsubscribing...
Comment #7
pimok3000 commentedsubscribing using Zen Subtheme
Comment #8
bcobin commentedsubscribing - same problem using ATCK but is intermittent.
Comment #9
mikeytown2 commented#307756: Backport of #147000: Unify and rewrite module_rebuild_cache() and system_theme_data()
Comment #10
jefkin commentedThis problem persists though Drupal 6.19.
I found a solution, though it may not pass the mustard for all databases, it works for mine, and it means I'm not trying to explain how a damn error in drupal is not 'my problem' to my clients.
I'm still too busy to learn how to roll a patch but this is the code change:
Drupal 6.19:
file: modules/system/system.module original code line 822:
My modification:
This version of the sql doesn't fail on duplicates, it just reinserts over-top (that's why it's replace instead of insert) -- which is fine for my purposes and maybe some of you will benefit too. I saw on another thread how the drupal community is worried about leaving postgres users behind.
My take on this is too bad for them, I've had to explain this one bug away for nearly 2 years now, and I simply no longer care, I just need a solution.
Comment #11
mikeytown2 commented@jefkin
Look into Pressflow; the MySQL only fork of Drupal.