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.
After upgrading to beta10 got message on all pages:
Notice: Undefined index: image_weight in marinelli_get_banners() (line 264 of /home2/sites/all/themes/marinelli/template.php).
(replied 6 times on each page)
Comments
Comment #1
Lioz CreditAttribution: Lioz commentedtry to save the theme settings and clear the cache, let me know then if the problem persist.
Comment #2
Fozzie CreditAttribution: Fozzie commentedOn my site Banner configuration is set to classic Drupal region.
Switching it to Marinelli banners and back to Drupal region solved the problem.
Comment #3
DenMas CreditAttribution: DenMas commentedI also have this problem.
So, I go to Home » Administration » Appearance » Settings » Appearance » Marinelli,
Here found that image (banners) weight was -10.
After I all change to 0 and save, problem was solved.
Comment #4
Dane Powell CreditAttribution: Dane Powell commentedYou should probably release beta11, and include a schema update to fix this error.
Comment #5
mavimo CreditAttribution: mavimo commented@Dane Powell: themes do not support install/update_N schema, or I'm wrong? I think is not recommended add into code all change to fix this problem. It can increase code complexity without add real benefit (save theme settings can solve it really fast), what do you think about it?
Comment #6
Dane Powell CreditAttribution: Dane Powell commentedHuh? I've never heard anything about themes not supporting hook_update_n. They're a package just like a module or install profile, all of which should support hook_update_n. If an update causes errors to be thrown, and a simple hook_update_n can prevent those, then it is absolutely warranted and worth it.
Comment #7
MochaMan CreditAttribution: MochaMan commentedI received the same message after updating. I went to the configuration page and clicked save and the problem went away. So far, I have had no reoccrence of the problem.
Comment #8
mavimo CreditAttribution: mavimo commented@ Dane Powell: I try to use *.install files into marinelli on first development (approx 8 month ago) and it dont' work, I retry today and do not work again. Are you sure *.install files are supported? I have a long search and i just find this #187289: Support .install files for themes issue, so, i think is not possible have hook_[install|unistall|update_N] for themes.
Comment #9
Dane Powell CreditAttribution: Dane Powell commented@mavimo Wow, I am utterly shocked. I had no idea that themes couldn't be updated. I guess I stand corrected... and somewhat disappointed :/
Comment #10
mavimo CreditAttribution: mavimo commented@Dane Powell: I think we can write on project page to resave theme settings and close this issue.
@Lioz:
Please add into project page this alert:
Comment #11
Lioz CreditAttribution: Lioz commented@mavimo: ok, just added
Comment #12
Dane Powell CreditAttribution: Dane Powell commentedGreat, so, as fixed as it can get I suppose
Comment #14
emilorol CreditAttribution: emilorol commentedHi,
I still got the error and I fix it this way:
Complaining line of code:
$banner['weight'] = $banner['image_weight'];
Replaced with the same code plus a validation:
$banner['weight'] = array_key_exists('image_weight', $banner)? $banner['image_weight'] : '';
Note: I don't know if where the key image_weight on the $banner array does not exist the 'weight' key should be empty ('') or 0 (zero)
Thank you.
Comment #15
bruba CreditAttribution: bruba commentedhad the same problem with beta 11, changing the image weight as described in posting #3 solved the problem for me too. Thx
Comment #16
avoura CreditAttribution: avoura commented"If you upgrade from marinelli-3.0-beta10 to marinelli-3.0-beta11 please resave your theme settings from page Apparence » Marinelli » Settings to remove warning appairs."
What was meant by "appairs"?
Comment #17
Dane Powell CreditAttribution: Dane Powell commentedProbably 'to prevent warnings from appearing'.
Comment #18
Piccoro CreditAttribution: Piccoro commentedClearing all cache solved this problem for me, after upgrading to Marinelli 7.x-3.0-beta11. I'm on Drupal 7.8.
Thanks :)
Comment #19
dustinface CreditAttribution: dustinface commentedSame issue here! It appears that changing the weight corrected this issue for me as well. That was... after I cleared the cache and made sure my database & modules were updated. To change the Weight, simply go to your Marinelli them (appearance) and work your way to the bottom (after the banner information) and you will see "Weight" and the default is -10. Change that to 0 & it should work.
Comment #20
Chi CreditAttribution: Chi commentedGot the same problem with beta 11.
Comment #21
Chi CreditAttribution: Chi commentedSubmitting Marinelli settings form solved this problem.
Comment #22
gyanendraveer CreditAttribution: gyanendraveer commentedAll Friend Try this
Comment #23
mohib.ap CreditAttribution: mohib.ap as a volunteer and commentedComment #24
mohib.ap CreditAttribution: mohib.ap as a volunteer and commented