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

CommentFileSizeAuthor
#9 skinr_notice.patch679 bytesmoonray

Comments

stuen93’s picture

I 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).

jacine’s picture

This is the least of Skinr's problems right now. Have you seen the project page?

stuen93’s picture

of course... just posting anything that may be helpful, if it's not then ignore it.

moonray’s picture

Status: Active » Closed (won't fix)

Looks 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.

pitxels’s picture

I have same error with installation from skratch (but please don't hit me)

ChrisBryant’s picture

Status: Closed (won't fix) » Postponed (maintainer needs more info)

@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?

bmx269’s picture

I just did a clean install of D7, and Skinr, and have the same error.

Stephan EJ’s picture

So 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 ...

moonray’s picture

Category: support » bug
Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new679 bytes

Here's a patch for the notice.

sun’s picture

Title: Notice: Undefined index: » Notice: Undefined index: _options in skinr_ui_form_alter()
Status: Needs review » Active

We 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.

moonray’s picture

Status: Active » Needs work

Well, actually I did figure out what triggered the error.

Steps to reproduce:

  1. Install skinr and skinr_ui (but no skin plugins).
  2. Use the cog to edit a skin for a page element.
  3. Set CSS classes, then save.
  4. (you get redirected back to the page you were on previously)
  5. Edit the same page element you previously edited and saved.
  6. profit!

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.

jibberish’s picture

Same error - subscribe

404’s picture

clean d7 installation
skinr 7.x-2.x-dev (2011-Mar-04)

same error.

BenK’s picture

I 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

yuriy.babenko’s picture

Also 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 in skinr_skin_save() when skinr_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.

moonray’s picture

Status: Needs work » Fixed

With the latest commits to Skinr this should no longer be an issue (the '_options' index no longer exists).

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.