WPIntell

Source evidence

WordPress Undefined index: full

Responsify WP · support · 2018-05-28T20:35:00+00:00

mixedsentiment
mediumseverity
0.85relevance
9replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

1 / 27 rows with source links

3.7% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

26 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
WPO+ resolved
There is an issue with the // Fix E_WARNING: Illegal string offset 'width' if(!is_array($image_meta_data['sizes']['full'])) { $image_meta_data['sizes']['full'] = array(); code at the website without the ‘full’ image-size. Our WordPress website started to show a Notice – https://i.imgur.com/a7UcRAU.png – in the header of every page of the website: Notice: Undefined index: full in /wp-content/plugins/responsify-wp/includes/create_responsive_image.php 67 This topic was modified 8 years ago by WPO+ . This topic was modified 8 years ago by WPO+ . This topic was modified 8 years ago by WPO+ . This topic was modified 8 years ago by WPO+ . Same issue in the plugin back-end’s settings: Notice: Undefined index: full in …/wp-content/plugins/responsify-wp/admin/views/selected_sizes.php on line 23 View post on imgur.com Looking at the following code: $image_meta_data = wp_get_attachment_metadata( $this->id ); … why do you expect to see ‘full’ parent image-size in the array of sub-sizes? // Fix E_WARNING: Illegal string offset 'width' if(!is_array($image_meta_data['sizes']['full'])) { $image_meta_data['sizes']['full'] = array(); } The standard wp_get_attachment_metadata() output looks like this: Array ( [width] => 2400 [height] => 1559 [file] => 2011/12/press_image.jpg [sizes] => Array ( [thumbnail] => Array ( [file] => press_image-150x150.jpg [width] => 150 [height] => 150 [mime-type] => image/jpeg ) [medium] => Array ( [file] => press_image-4-300x194.jpg [width] => 300 [height] => 194 [mime-type] => image/jpeg ) [large] => Array ( [file] => press_image-1024x665.jpg [width] => 1024 [height] => 665 [mime-type] => image/jpeg ) [post-thumbnail] => Array ( [file] => press_image-624x405.jpg [width] => 624 [height] => 405 [mime-type] => image/jpeg ) ) [image_meta] => Array ( [aperture] => 5 [credit] => [camera] => Canon EOS-1Ds Mark III => [created_timestamp] => 1323190643 [copyright] => [focal_length] => 35 [iso] => 800 [shutter_speed] => 0.016666666666667 [title] => ) ) https://developer.wordpress.org/reference/functions/wp_get_attachment_metadata/ This reply was modified 8 years ago by WPO+ . This reply was modified 8 years ago by WPO+ . Info: $fullpath = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), ‘full’ ); Try to dump the array with: $image_meta_data = wp_get_attachment_metadata( $this->id ); echo '<pre>'; var_dump($image_meta_data); echo '</pre>'; Hi Ivan! Thanks for taking the time reporting this. I actually got a pull request with a fix for this, which I released right now (RWP 1.9.10). Does it solve the issue for you? Hello Stefan, thank you for fixing this in the front-end. Please, notice, as I said earlier, that the issue also exists in the back-end in the plugin setting page – /wp-admin/options-general.php?page=responsify-wp Screenshot: https://i.imgur.com/UIfOzvh.png Notice: Undefined index: full in /wp-content/plugins/responsify-wp/admin/views/selected_sizes.php on line 23 and 24 Hi again, would you please consider trying out RWP 1.9.11 before I release it? I think it should solve both errors. I had to refactor the solutions from the latest pull requests… You can download it here: https://github.com/stefanledin/responsify-wp/tree/1-9-11 Yes, Stefan, the new version fixed the ‘notice’ issues in the front-end and the back-end for our website. Thank you a lot! Great! Thank you Ivan for helping out!

Comments

9 shown
WPO+ 2018-05-28T20:48:00+00:00

Same issue in the plugin back-end’s settings: Notice: Undefined index: full in …/wp-content/plugins/responsify-wp/admin/views/selected_sizes.php on line 23 View post on imgur.com

WPO+ 2018-05-28T20:54:00+00:00

Looking at the following code: $image_meta_data = wp_get_attachment_metadata( $this->id ); … why do you expect to see ‘full’ parent image-size in the array of sub-sizes? // Fix E_WARNING: Illegal string offset 'width' if(!is_array($image_meta_data['sizes']['full'])) { $image_meta_data['sizes']['full'] = array(); } The standard wp_get_attachment_metadata() output looks like this: Array ( [width] => 2400 [height] => 1559 [file] => 2011/12/press_image.jpg [sizes] => Array ( [thumbnail] => Array ( [file] => press_image-150x150.jpg [width] => 150 [height] => 150 [mime-type] => image/jpeg ) [medium] => Array ( [file] => press_image-4-300x194.jpg [width] => 300 [height] => 194 [mime-type] => image/jpeg ) [large] => Array ( [file] => press_image-1024x665.jpg [width] => 1024 [height] => 665 [mime-type] => image/jpeg ) [post-thumbnail] => Array ( [file] => press_image-624x405.jpg [width] => 624 [height] => 405 [mime-type] => image/jpeg ) ) [image_meta] => Array ( [aperture] => 5 [credit] => [camera] => Canon EOS-1Ds Mark III => [created_timestamp] => 1323190643 [copyright] => [focal_length] => 35 [iso] => 800 [shutter_speed] => 0.016666666666667 [title] => ) ) https://developer.wordpress.org/reference/functions/wp_get_attachment_metadata/ This reply was modified 8 years ago by WPO+ . This reply was modified 8 years ago by WPO+ .

WPO+ 2018-05-28T20:56:00+00:00

Info: $fullpath = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), ‘full’ );

WPO+ 2018-05-28T21:00:00+00:00

Try to dump the array with: $image_meta_data = wp_get_attachment_metadata( $this->id ); echo '<pre>'; var_dump($image_meta_data); echo '</pre>';

stefanledin 2018-05-29T05:16:00+00:00

Hi Ivan! Thanks for taking the time reporting this. I actually got a pull request with a fix for this, which I released right now (RWP 1.9.10). Does it solve the issue for you?

WPO+ 2018-05-29T08:22:00+00:00

Hello Stefan, thank you for fixing this in the front-end. Please, notice, as I said earlier, that the issue also exists in the back-end in the plugin setting page – /wp-admin/options-general.php?page=responsify-wp Screenshot: https://i.imgur.com/UIfOzvh.png Notice: Undefined index: full in /wp-content/plugins/responsify-wp/admin/views/selected_sizes.php on line 23 and 24

stefanledin 2018-06-05T08:34:00+00:00

Hi again, would you please consider trying out RWP 1.9.11 before I release it? I think it should solve both errors. I had to refactor the solutions from the latest pull requests… You can download it here: https://github.com/stefanledin/responsify-wp/tree/1-9-11

WPO+ 2018-06-05T21:00:00+00:00

Yes, Stefan, the new version fixed the ‘notice’ issues in the front-end and the back-end for our website. Thank you a lot!

stefanledin 2018-06-07T06:22:00+00:00

Great! Thank you Ivan for helping out!