I'm getting several of these warnings while trying to view a responsive image after setting my imagestyles, breakpoints, and mappings.

Warning: Invalid argument supplied for foreach() in resp_img_field_attach_view_alter() (line 231 of sites/all/modules/resp_img/resp_img.module).

Comments

attiks’s picture

Version: 7.x-2.0-beta3 » 7.x-2.x-dev

Can you try the latest dev version, lots has changed

JJSON’s picture

Hi attiks, thanks for your reply.
It turns out I was actually using 2.x-dev already but the admin/module screen confused me, it says "7.x-2.0-beta3+1-dev". In any case, I did a fresh install and this time I used the latest dev version of reap_img and breakpoints as well.

This seems to have done the trick. The images are now loaded correctly, including on resize and it works great on retina displays too. Magic.

However, I'm actually still getting this error (six times):

Warning: Invalid argument supplied for foreach() in resp_img_field_attach_view_alter() (line 231 of sites/all/modules/resp_img.module).

and these errors:

Warning: Illegal offset type in isset or empty in image_style_load() (line 632 of modules/image/image.module).
Warning: mb_strtolower() expects parameter 1 to be string, array given in drupal_strtolower() (line 476 of includes/unicode.inc).

I figure that perhaps these errors have something to do with me using adaptivetheme? If I switch to Omega, there are no visible errors.

Thank you so much for all the work on this module, I look forward to a stable 2.0 release.

attiks’s picture

I guess it's related to adaptivetheme, I think they are changing the theme_image_formatter, theme_image. I tried it and my HTML source did only contain 1 img tag.

attiks’s picture

see adaptivetheme_field__image in at_core/inc/theme.inc

I'll try to find a solution, but I'm afraid it isn't solvable without changing adaptivetheme

carajito’s picture

Same problem using Omega 3.x

Error:
Invalid argument supplied for foreach() in resp_img_field_attach_view_alter() (line 231

I don't know if I'm doing well

- Drupal 7.15
- Omega 3.1
- Ctools 7.x-1.2
- Field formatter settings 7.x-1.0
- Breakpoints 7.x-1.0-beta3
- Resp_img 7.x-2.0-beta3

attiks’s picture

#5 can you try the dev version

carajito’s picture

Two erros

  • Notice: Undefined index: mapping in theme_picture() (line 394 of test1/sites/all/modules/resp_img/resp_img.module).
  • Warning: Invalid argument supplied for foreach() in theme_picture() (line 394 of test1/sites/all/modules/resp_img/resp_img.module).

- Drupal 7.15
- Omega 3.1
- Ctools 7.x-1.2
- Field formatter settings 7.x-1.0
- Breakpoints 7.x-1.0-beta3
- Resp_img 7.x-2.x-dev

carajito’s picture

StatusFileSize
new33.35 KB

Two erros

  • Notice: Undefined index: mapping in theme_picture() (line 394 of test1/sites/all/modules/resp_img/resp_img.module).
  • Warning: Invalid argument supplied for foreach() in theme_picture() (line 394 of test1/sites/all/modules/resp_img/resp_img.module).

- Drupal 7.15
- Omega 3.1
- Ctools 7.x-1.2
- Field formatter settings 7.x-1.0
- Breakpoints 7.x-1.0-beta3
- Resp_img 7.x-2.x-dev

jelle_s’s picture

Two erros

Notice: Undefined index: mapping in theme_picture() (line 394 of test1/sites/all/modules/resp_img/resp_img.module).
Warning: Invalid argument supplied for foreach() in theme_picture() (line 394 of test1/sites/all/modules/resp_img/resp_img.module).

Should be fixed in latest dev now. Can you confirm?

carajito’s picture

No error at the moment, but pleace can you tell me if I doing well at this point #5 ????

Because the images is not showing and it is not show as responsive.

Cheers

carajito’s picture

Component: Code » User interface
Category: bug » feature
Priority: Normal » Minor
StatusFileSize
new52.47 KB
new122.86 KB
new37.33 KB

I add a new group (articletwo)

The new group

The new group is not showing at any place

new group not showing

A link to here will be good

link to here

attiks’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Old issue, I think you better update to the picture module