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.
Hi,
i dont know is it a bug, but i get this notice on my front page after a fresh install 7.x3.0
drupal 7.15 Notice: Undefined offset: 1 in adaptivetheme_field__image() (Zeile 598 von ./sites/all/themes/adaptivetheme/at_core/inc/theme.inc).
Zeile 598 $width = $matches[1] . 'px';
Comments
Comment #1
Jeff Burnz CreditAttribution: Jeff Burnz commentedYes, I think we can consider this a bug, need to check if [1] isset. Can you tell me if you are using any image related modules, or just standard Drupal?
Comment #2
eule CreditAttribution: eule commentedhi,
i just use Image 7.15 drupal´s standard module and File Field Sources 7.x-1.4, frontpage is maket with panels but i get it everywhere
Comment #3
Jeff Burnz CreditAttribution: Jeff Burnz commentedDo the images show? If so can you see the code for the image tag - I want to know if you can see width and height attributes in the image tags - that is what the theme is looking for. Pretty sure by memory this problem will only occur if you are using the captions, if you turn captions off in theme settings the problem should go away, but then of course so will captions...
Comment #4
eule CreditAttribution: eule commentedHi,
i do a new install with corolla all fine..i setup a picture and add it to a post..booom the error appears
<section class="field field-name-field-image field-type-image field-label-above view-mode-full"><h2 class="field-label">Bild: </h2><div class="field-items" id="md2"><figure class="clearfix field-item even"><img itemprop="image" src="image.gif" alt="x" title="x"></figure></div></section> </div>
can´t see width and height attributes
Comment #5
eule CreditAttribution: eule commentederror comes up if u try " Image alignment and captions " disabling fix it...but no image alignment
Comment #6
eule CreditAttribution: eule commentedhow i can fix this? the error suxxs, i need to alignment the pictures
Comment #7
Jeff Burnz CreditAttribution: Jeff Burnz commentedI am not really able to reproduce this, is your site online? Can I access it as an admin and via FTP etc, I really need to get in there and see what is causing this problem, feel free to email me using my contact form.
Comment #8
Jeff Burnz CreditAttribution: Jeff Burnz commentedThe real bug here is the fact that no height or width is printing for images, so I have crafted a workaround that accounts for this missing data, so the error will not occur.
This will be committed shortly and be in the new version.
eule - note that I already updated this on your site ;)
Comment #9
eule CreditAttribution: eule commentedthanks a lot mate ;)
Comment #10
lzbeth3201 CreditAttribution: lzbeth3201 commentedI just started getting the same error after I enabled alt text and titles for image fields ... but I don't get the error consistently. I updated to the newest available version of Adaptive Theme, and am still getting the error. I noticed I was only getting the error on Ubercart product catalog pages, so I tried disabling alt text and titles for images in products, but no luck. Tried disabling the same for all content types image fields; still no luck. It only seems to happen when navigating from a product page to another page (and the error shows up on the page navigated to from the product page). Other pages with images do not seem to be affected.
error: Notice: Undefined offset: 1 in adaptivetheme_field__image() (line 598 of /homepages/35/d402257102/htdocs/WOTD_Drupal/sites/all/themes/adaptivetheme/at_core/inc/theme.inc).
testing at: wareofthedog.com/WOTD_Drupal/
Comment #11
lzbeth3201 CreditAttribution: lzbeth3201 commentedUPDATE: Disable File (Field) Paths and Advanced Page modules, and now error still happening but not consistently in any real, identifiable pattern
Comment #12
Jeff Burnz CreditAttribution: Jeff Burnz commentedSee #8, copy the image element output and paste it here or link to the page that causes the notice
Comment #13
mattbloomfield CreditAttribution: mattbloomfield as a volunteer commented