| Project: | Skinr |
| Version: | 6.x-1.4 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Sorry guys, I forgot about the previous problems with system_theme_data() (#581604: skinr disable the active theme) and used that function in my patch for v1.4 (#693252: Skinr not correctly identifying inherited script/css file paths).
So here's a new patch that should fix the dblog errors and theme disabling that's happening when a site is under load (or fast refreshes).
In addition, I cached the results in a static variable to further improve performance, though it's probably not required to fix the issue.
As in the previous issue, the problem was that getting base themes in the way that looks standard--with system_theme_data()--was making a lot of database calls. With enough page hits or refreshes, that was causing a race condition described here #445052: Race Condition in system_theme_data() function. Duplicate entry error for every theme. which was causing the db errors.
So instead I'm now using _system_theme_data(), which uses cached theme information and eliminates the race condition.
Attached is the patch against Skinr v1.4.
Thanks!
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| skinr_dblog_error.patch | 995 bytes | Ignored: Check issue status. | None | None |
Comments
#1
Seems to work for me. Thanks for the quick turnaround!
I do see one new error:
array_keys() [function.array-keys]: The first argument should be an array in /modules/skinr/skinr.module on line 292.
This wasn't there before the patch as far as I can tell... From what I can see right now the error only appears to come when the admin account edits a panels page... The pages do, however, appear to load fine and all the other errors are gone.
#2
I noticed this problem as well...
I fixed the error in the patch reported in #1
#3
jrglasgow,
Thanks for the fix!
#4
Is this still the case? If so, let's fix it first.
#5
Yes, I can reproduce the array key error everytime by clicking on the "edit panel" button on a panels page as admin:
Location http://site/admin/build/pages/edit/page-front
Referrer http://site/
Message array_keys() [function.array-keys]: The first argument should be an array in /sites/all/modules/skinr/skinr.module on line 292.
Severity error
#6
The error doesn't only occur when panels are being edited...
On a high load site... or on multiple page refreshes, like when you are working on testing/creating a new theme on every 4-6 page refreshes the theme doesn't load at all.
#7
I also noticed I can no longer set skinr/fusion styles on panels pages. If I set a panel to skinr and pick a style it simply displays no style at all. Maybe I'll open a new report for this, but it seems related to the upgrade so I thought I would mention it...
#8
A fix for this has been committed to CVS for the 6.x dev version (DRUPAL-6--1). Can you guys please test it out?
#9
So far so good. No errors, skinr settings on panels appear to save fine now. Thanks for the quick turnaround!
#10
Actually scratch that -- sorry. Now when you save a panel as skinr it saves and everything works fine. ---But--- if you try to then save the panel as a non-skinr style (no style, rounded corners, etc.) it keep the last skinr style and simply applies the new style over top (so you get rounded corners inside of the last skinr style chosen, or no style with the last skinr style chosen...)
#11
@Chad_Dupuis: I've opened a new issue for the panels style switch issue. It's unrelated. Marking this issue as fixed.
#721916: Switching to style other than skinr in panels still outputs skinr styles
#12
Automatically closed -- issue fixed for 2 weeks with no activity.