Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I downloaded and enabled the Skinr module, and I got a lot of errors thrown at me. I tried both the stable and the dev versions.
Here are the errors:
* Notice: Undefined index: style in acquia_slate_button() (line 15 of /Users/{user}/Documents/Devel/Drupal/site/sites/all/themes/acquia_slate/template.php).
* Notice: Undefined index: #upload_validators in acquia_slate_button() (line 15 of /Users/{user}/Documents/Devel/Drupal/site/sites/all/themes/acquia_slate/template.php).
* Notice: Undefined variable: skinr in include() (line 26 of /Users/{user}/Documents/Devel/Drupal/site/sites/all/themes/acquia_slate/page.tpl.php).
* Notice: Undefined property: stdClass::$status in skinr_skinsets() (line 819 of /Users/{user}/Documents/Devel/Drupal/site/sites/all/modules/skinr/skinr.module).
* Notice: Undefined property: stdClass::$status in skinr_skinsets() (line 819 of /Users/{user}/Documents/Devel/Drupal/site/sites/all/modules/skinr/skinr.module).
* Notice: Undefined property: stdClass::$status in skinr_skinsets() (line 819 of /Users/{user}/Documents/Devel/Drupal/site/sites/all/modules/skinr/skinr.module).
* Notice: Undefined property: stdClass::$status in skinr_skinsets() (line 819 of /Users/{user}/Documents/Devel/Drupal/site/sites/all/modules/skinr/skinr.module).
* Notice: Undefined property: stdClass::$status in skinr_skinsets() (line 819 of /Users/{user}/Documents/Devel/Drupal/site/sites/all/modules/skinr/skinr.module).
* Notice: Undefined property: stdClass::$status in skinr_skinsets() (line 819 of /Users/{user}/Documents/Devel/Drupal/site/sites/all/modules/skinr/skinr.module).
* Notice: Undefined index: pushbutton in skinr_skinset_statuses() (line 883 of /Users/{user}/Documents/Devel/Drupal/site/sites/all/modules/skinr/skinr.module).
* Notice: Undefined index: minnelli in skinr_skinset_statuses() (line 883 of /Users/{user}/Documents/Devel/Drupal/site/sites/all/modules/skinr/skinr.module).
* Notice: Undefined index: garland in skinr_skinset_statuses() (line 883 of /Users/{user}/Documents/Devel/Drupal/site/sites/all/modules/skinr/skinr.module).
* Notice: Undefined index: marvin in skinr_skinset_statuses() (line 883 of /Users/{user}/Documents/Devel/Drupal/site/sites/all/modules/skinr/skinr.module).
* Notice: Undefined index: chameleon in skinr_skinset_statuses() (line 883 of /Users/{user}/Documents/Devel/Drupal/site/sites/all/modules/skinr/skinr.module).
* Notice: Undefined index: bluemarine in skinr_skinset_statuses() (line 883 of /Users/{user}/Documents/Devel/Drupal/site/sites/all/modules/skinr/skinr.module).
* Notice: Undefined index: zen in skinr_skinset_statuses() (line 883 of /Users/{user}/Documents/Devel/Drupal/site/sites/all/modules/skinr/skinr.module).
* Notice: Undefined index: fusion_starter_lite in skinr_skinset_statuses() (line 883 of /Users/{user}/Documents/Devel/Drupal/site/sites/all/modules/skinr/skinr.module).
* Notice: Undefined index: fusion_starter in skinr_skinset_statuses() (line 883 of /Users/{user}/Documents/Devel/Drupal/site/sites/all/modules/skinr/skinr.module).
* Notice: Undefined index: fusion_core in skinr_skinset_statuses() (line 883 of /Users/{user}/Documents/Devel/Drupal/site/sites/all/modules/skinr/skinr.module).
* Notice: Undefined index: acquia_slate in skinr_skinset_statuses() (line 883 of /Users/{user}/Documents/Devel/Drupal/site/sites/all/modules/skinr/skinr.module).
* Notice: Undefined variable: output in theme_skinr_ui_admin_skins() (line 850 of /Users/{user}/Documents/Devel/Drupal/site/sites/all/modules/skinr/skinr_ui.admin.inc).
Comment | File | Size | Author |
---|---|---|---|
#12 | skinr_e_all.patch | 1.87 KB | Jacine |
Comments
Comment #1
JacineDid you run update.php?
Comment #2
bobbungee CreditAttribution: bobbungee commentedI didn't have an old version of the module before. This is a fresh install.
Comment #3
travisc CreditAttribution: travisc commentedI'm seeing this on a fresh install too
Comment #4
ericduran CreditAttribution: ericduran commentedI just looked at the code. This is an actual bug.
There's no check on the array index. This can probably be fixed with an isset in certain locations.
Comment #5
bobbungee CreditAttribution: bobbungee commentedComment #6
JacineAnyone want to write a patch? :)
Comment #7
ericduran CreditAttribution: ericduran commentedThese are just notices not errors and this still need to be fixed properly but one way around it is to set php.in error_reporting = E_ALL & ~E_NOTICE .
Drupal 6 is E_ALL compliance but there's a lot of contrib module that aren't.
That being said I'm going to change the Issue title to something more appropriate.
Comment #8
JacineI cannot reproduce these at all, and I have E_ALL set.
Comment #9
ericduran CreditAttribution: ericduran commented@jacine, yep. You're absolutely right. I did confirm this problem before but I think recent changes the the skin_skinset fix it. I think it was something related the the static cache not being used. I did a quick search but didn't find it.
But I guess we can mark this one closed.
Comment #10
JacineOk, good, because I thought I was going insane. I tried for a while to reproduce, and nothing.
Thanks :)
Comment #11
juan_g CreditAttribution: juan_g commentedSorry to reopen, but I'm also getting many notice lines -the same notices of this issue- in fresh installs of the current Skinr 6.x-2.x-dev (Sep 28, 2010). For example:
These are caused by:
skinr.module, line 865, function skinr_skinsets
skinr.module, line 929, function skinr_skinset_statuses
Drupal documentation:
Write E_ALL compliant code (6.x, 7.x)
Related issues:
Let's make Drupal 6 E_ALL compliant (6.x)
E_ALL compliance during installation (6.x)
E_ALL compliance: remove notices on installation screens (5.x)
Those are core issues, but include ideas that can be applied to modules, for development and released versions.
Comment #12
JacineThanks @juan_g. I had tried setting this in settings.php and .htaccess and still wasn't getting the errors, so today I hacked core, and was finally able to see these.
Here's a patch.
Comment #13
juan_g CreditAttribution: juan_g commentedThank you very much, the patch has fixed it by using isset; no more notices left. Will this fix be included in the next Skinr 6.x-2.x, dev or alpha? :)
Comment #14
juan_g CreditAttribution: juan_g commentedUnless other testers find something not correct, and since it's just applying isset, I think this is RTBC.
Tested with Skinr, Skinr UI, and dependencies enabled.
Comment #15
ericduran CreditAttribution: ericduran commentedThere's an extra $output variable that's not really being used
Comment #16
juan_g CreditAttribution: juan_g commentedThis one? (skinr_ui.admin.inc file):
I think that looks ok. It's used some lines later in the same function:
Comment #17
Jacine@ericduran That's for the admin page that lists the skinsets. I was getting a notice there when there where no skinsets on $output.
I have a feeling there are more of these lurking around, but I committed this to dev. Now I need to port this to 1.x-dev and D7.
Comment #18
ericduran CreditAttribution: ericduran commented@jacine, cool. :) I'm working on the other issues :-)
Comment #19
juan_g CreditAttribution: juan_g commentedDepending on the case, something to consider is !empty() :
Comment #20
JacineI read that, and also this:
I think
isset()
was the right choice, but TBH, I'm not sure.Comment #21
juan_g CreditAttribution: juan_g commentedReading PHP docs, I've just made this boolean table. Not completely sure, but it seems at least mostly right. Please correct me if you see any mistake.
It depends on what is exactly needed, but if(!empty($var)) looks like the replacement for if($var) with the most similar behavior, without "undefined" notices.
Comment #22
moonray CreditAttribution: moonray commentedIn general (and in this case) !empty() is better to use than isset(). They did a bunch of testing on it, and it's apparently faster than isset().
The reason to use !empty() in this instance is because the default parameter value, if nothing is passed, is FALSE. FALSE should not trigger the refresh (which it would if you use isset).
Comment #23
JacineThanks @moonray.
This needs work then.
Comment #24
sunA theme's status should always be set, so I do not understand this isset().
The function signature defines a default of FALSE for $refresh, so $refresh should never be not set --- unless something, anything, calls this function with a second argument of NULL, which most likely is not the case.
Powered by Dreditor.
Comment #25
JacineComment #26
moonray CreditAttribution: moonray commentedActually a theme's status isn't always set, apparently (though why that is, I have no idea). See comment #11.
I think that should be a check for !empty() instead of isset(), though.
The $refresh check should indeed not be set.
None of these appear in the D7 version, though. These are all D6 notices.
Comment #27
nomonstersinme CreditAttribution: nomonstersinme commentedyeah, I can't get these notices to show in drupal 7
Comment #28
moonray CreditAttribution: moonray commentedAlright, moving back to D6 since this isn't an issue in D7.
Comment #29
vrajak@gmail.com CreditAttribution: vrajak@gmail.com commentedFrom reading it seems like that status here is that its pending a patch to 1.x-dev and the current code needs some revision? Like the use of empty() over isset() and The $refresh check should indeed not be set as Moonray said. With some direction I could try and help out unless its already being done or out of my capability.
Comment #30
moonray CreditAttribution: moonray commentedSettings back to D6 since none of the issues reported above apply to code in D7.
Comment #31
moonray CreditAttribution: moonray commentedAny code improvements mentioned above, like isset() vs !empty(), aren't crucial here. No notices appear anymore, so closing.