Duplicate entry in ctools_css_cache

digi24 - August 4, 2009 - 10:10
Project:Chaos tool suite
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:minor
Assigned:Unassigned
Status:active
Description

Hi,

im am observing a sporadic error in the ctools css cache table (see below). The error message occurs only for exactly one element. I understand that this is probably caused by a script being executed twice, and no locking in place. Or is this the result of a misconfiguration on the panels-UI?

FILE: modules/ctools/includes/css.inc on line 79.

ERROR: Duplicate entry 'rounded-corner:.rounded-corner' for key 'PRIMARY'

QUERY: INSERT INTO tableprefix_ctools_css_cache (cid, filename, css, filter) VALUES ('rounded-corner:.rounded-corner', ...

#1

merlinofchaos - August 17, 2009 - 20:21

I think you're probably right about the lack of locking causing this. Not quite sure how to fix this. We're not supposed to use lock tables, but...

#2

bloto - November 2, 2009 - 05:58

I have similar error message:

Duplicate entry 'rounded-corner:.rounded-corner' for key 1 query: INSERT INTO ctools_css_cache (cid, filename, css, filter) VALUES (&#
...
/sites/all/modules/ctools/includes/css.inc, line 79.

Have you managed to fix this somehow?

#3

digi24 - November 3, 2009 - 11:17

Hey bloto,

I am not aware of fixing it or applying a patch, besides the usual updates, but the problem disappeared.

The only thing I see from my svn logs that I have altered and might be related, was a small perfomance thingie in panels. Please report in case it solves your problems.

(only applicable if you are using panels and have css aggregation enabled)

Index: panels/plugins/styles/corners/rounded_corners.inc
===================================================================
--- panels/plugins/styles/corners/rounded_corners.inc  (revision 848)
+++ panels/plugins/styles/corners/rounded_corners.inc  (revision 944)
@@ -132,7 +132,7 @@
     $filename = ctools_css_store($css_id, _panels_rounded_corners_css($idstr), FALSE);
   }

-  drupal_add_css($filename, 'module', 'all', FALSE);
+  drupal_add_css($filename, 'module', 'all', TRUE);
}

#4

bloto - November 14, 2009 - 09:03

Thank you,
I applied it yesterday, so far 1 event occured with this. So there must be something else that fix this.... I will keep observing..

 
 

Drupal is a registered trademark of Dries Buytaert.