Closed (fixed)
Project:
Skinr
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Jan 2011 at 18:30 UTC
Updated:
19 May 2011 at 12:02 UTC
Jump to comment: Most recent file
I have this NOTICE:
Notice: Undefined index: _options in skinr_ui_form_alter() (line 422 of /home/content/70/7233670/html/modules/skinr/skinr_ui.module).
some help or suggestion ?
thanks
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | skinr_notice.patch | 679 bytes | moonray |
Comments
Comment #1
stuen93 commentedI received the same error..
Notice: Undefined index: _options in skinr_ui_form_alter() (line 422 of /srv/www/htdocs/drupal7-theme/sites/all/modules/skinr/skinr_ui.module).
Comment #2
jacineThis is the least of Skinr's problems right now. Have you seen the project page?
Comment #3
stuen93 commentedof course... just posting anything that may be helpful, if it's not then ignore it.
Comment #4
moonray commentedLooks like you upgraded from a previous version of skinr. This is currently not supported for D7 version of skinr; your db is no longer compatible with skinr.
The upgrade path will be dealt with once we've stabilized skinr.
Comment #5
pitxels commentedI have same error with installation from skratch (but please don't hit me)
Comment #6
ChrisBryant commented@pitxels, can you confirm and verify that you have this problem on a clean installation with the most recent dev version dated 2011-Jan-16?
Comment #7
bmx269 commentedI just did a clean install of D7, and Skinr, and have the same error.
Comment #8
Stephan EJ commentedSo we just have to wait till an update is coming? Or are there any other solutions? By the way, it works even with this failure ...
Comment #9
moonray commentedHere's a patch for the notice.
Comment #10
sunWe need a clear bug report first. Just hiding an error without knowing why and where it is caused doesn't help.
Once we know what triggers it, we likely want to add a test to prove that it can be reproduced, and right afterwards, that a patch including the same test and fix resolves the bug.
Comment #11
moonray commentedWell, actually I did figure out what triggered the error.
Steps to reproduce:
Since no skin options are saved, only the additional classes, the '_options' array never exists. The fix is the right fix, but we might need to add a test.
Comment #12
jibberish commentedSame error - subscribe
Comment #13
404 commentedclean d7 installation
skinr 7.x-2.x-dev (2011-Mar-04)
same error.
Comment #14
BenK commentedI just wanted to confirm that I've got the same error using a fresh install of the -dev version dated April 6, 2011. The steps to reproduce document by moonray in #11 are exactly the steps that resulted in the error.
Otherwise, the module is adding CSS classes just fine (no other problems) so I'd love to see the patch in #9 committed (perhaps with a test added as well).
--ben
Comment #15
yuriy.babenko commentedAlso confirming what is outlined in #11. Got the error after following the same steps.
The
skinr_submit_handler()submit handler is called when a Skinr configuration form is submitted, and this function sets up the missing '_options' index if there is any widget data. We could default the '_options' index to an empty array right here, but then it would get stripped out inskinr_skin_save()whenskinr_skin_validate()gets called.I think the patch in #9 is a good (clean) solution here. The alternative would be to provide a default (empty array) value for '_options' and ensure that it doesn't get stripped out during validation.
Comment #16
moonray commentedWith the latest commits to Skinr this should no longer be an issue (the '_options' index no longer exists).