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)


Status:Active» Needs review

try to save the theme settings and clear the cache, let me know then if the problem persist.

On my site Banner configuration is set to classic Drupal region.
Switching it to Marinelli banners and back to Drupal region solved the problem.

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

You should probably release beta11, and include a schema update to fix this error.

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

Huh? 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.

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

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

@mavimo Wow, I am utterly shocked. I had no idea that themes couldn't be updated. I guess I stand corrected... and somewhat disappointed :/

@Dane Powell: I think we can write on project page to resave theme settings and close this issue.

Please add into project page this alert:

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. Please see #1180832: Undefined index: image_weight in marinelli_get_banners() for more info.

@mavimo: ok, just added

Status:Needs review» Fixed

Great, so, as fixed as it can get I suppose

Status:Fixed» Closed (fixed)

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


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.

Version:7.x-3.0-beta10» 7.x-3.0-beta11

had the same problem with beta 11, changing the image weight as described in posting #3 solved the problem for me too. Thx

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

Probably 'to prevent warnings from appearing'.

Clearing all cache solved this problem for me, after upgrading to Marinelli 7.x-3.0-beta11. I'm on Drupal 7.8.
Thanks :)

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

Status:Closed (fixed)» Active

Got the same problem with beta 11.

Submitting Marinelli settings form solved this problem.

All Friend Try this