WPIntell

Source evidence

Bug: Recursive replacement

Image Optimization For SEO · support · 2016-11-28T15:11:00+00:00

mixedsentiment
mediumseverity
0.85relevance
11replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

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

5 / 34 rows with source links

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

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

29 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
getiem resolved
Hello Weblizar, The current version of Seo Image Optimizer is replacing the alt and title tags good. Bug there is a loop bug/ recursive bug in this: For every extra image in the post, it repeats the image title or tags in the alt text. Example: Post with 4 images. 2 tags and 1 category Replacement is defined as: %tags, %category Result is: image 1: alt = tag1, tag2, category1 image2: alt = tag1, tag2, category1, tag1, tag2, category1 image3: alt = tag1, tag2, category1, tag1, tag2, category1, tag1, tag2, category1 etc… Loop on line 175 of option-panel.php contains an error. It adds the properties of the post to the existing variable every time the loop continues with every image. Can you fix this? Fixed it myself in my own site, Can you please update your code? Fix to apply: options-panel.php Add on line 207: $alt_text = ”; Add on line 212: $title_text = ”; Thanks Getiem for the information, We have fixed the issue and update the plugin. Thanks if you want to see more information about our plugin please visit documentation link Hi, I have installed the Version: 1.0.6 and I have the same issue, that getiem has reported. Could you please help me? Paulo I have just downloaded and installed the actual version from the WP repository and the issue is still there. Would be nice to have it fixed. I am using the Divi theme what is not fetching the image information used in the media library automatically. That means, that title and alt have to be set manually when placing the image with the Divi Page Builder. So it would be nice to have the settings-option to chose the title and alt-information as saved in the media library (e. g. %img_title and %img_alt). This reply was modified 9 years, 3 months ago by DanyelAndre . This reply was modified 9 years, 3 months ago by DanyelAndre . Indeed, in updates this issue is back. Fixed it again in my own code. Please fix in repository too. At line 141 of option-panel.php, add two extra lines: $alt_text = ”; $title_text = ”; Remark: Be sure to analyse the scope of your variables in the future. You are now looping on a variable and doing a recursive add with the .= on the variables. See lines: $alt_texts = $wl_wsio_options[‘wsio_alt_attribute_value’]; if ($alt_texts!=”){ foreach($alt_texts as $alt_texted){ $alt_text .= $alt_texted.’ ‘;} } $title_texts = $wl_wsio_options[‘wsio_title_tag_value’]; if ($title_texts!=”){ foreach($title_texts as $title_texted){ $title_text .= $title_texted.’ ‘;} } Thanks so much. We will add this into nextupdate. Please fix again, still in this update…. Fixed it myself on my local blog with my fix from post https://wordpress.org/support/topic/bug-recursive-replacement/#post-8944262 This reply was modified 8 years, 11 months ago by getiem . Please, current version 1.0.10 has the same bug again. Fix is again the same as in my previous post. Please add this in the next update, I now keep editing your code… We will update this by next surely with a new update. Thanks for reminding me again and again. Resolve – loop bug in alt and title tag’s value fixed. Please install new version of Seo Image Optimizer plugin (Version – 1.0.11 )

Comments

11 shown
getiem 2016-11-28T15:28:00+00:00

Fixed it myself in my own site, Can you please update your code? Fix to apply: options-panel.php Add on line 207: $alt_text = ”; Add on line 212: $title_text = ”;

weblizar_support 2016-11-29T05:52:00+00:00

Thanks Getiem for the information, We have fixed the issue and update the plugin. Thanks if you want to see more information about our plugin please visit documentation link

ingrevallo 2017-01-05T20:13:00+00:00

Hi, I have installed the Version: 1.0.6 and I have the same issue, that getiem has reported. Could you please help me? Paulo

DanyelAndre 2017-02-27T06:51:00+00:00

I have just downloaded and installed the actual version from the WP repository and the issue is still there. Would be nice to have it fixed. I am using the Divi theme what is not fetching the image information used in the media library automatically. That means, that title and alt have to be set manually when placing the image with the Divi Page Builder. So it would be nice to have the settings-option to chose the title and alt-information as saved in the media library (e. g. %img_title and %img_alt). This reply was modified 9 years, 3 months ago by DanyelAndre . This reply was modified 9 years, 3 months ago by DanyelAndre .

getiem 2017-03-22T14:05:00+00:00

Indeed, in updates this issue is back. Fixed it again in my own code. Please fix in repository too. At line 141 of option-panel.php, add two extra lines: $alt_text = ”; $title_text = ”; Remark: Be sure to analyse the scope of your variables in the future. You are now looping on a variable and doing a recursive add with the .= on the variables. See lines: $alt_texts = $wl_wsio_options[‘wsio_alt_attribute_value’]; if ($alt_texts!=”){ foreach($alt_texts as $alt_texted){ $alt_text .= $alt_texted.’ ‘;} } $title_texts = $wl_wsio_options[‘wsio_title_tag_value’]; if ($title_texts!=”){ foreach($title_texts as $title_texted){ $title_text .= $title_texted.’ ‘;} }

Weblizar – WordPress Themes & Plugin 2017-03-23T07:30:00+00:00

Thanks so much. We will add this into nextupdate.

getiem 2017-06-08T08:17:00+00:00

Please fix again, still in this update….

getiem 2017-06-08T08:22:00+00:00

Fixed it myself on my local blog with my fix from post https://wordpress.org/support/topic/bug-recursive-replacement/#post-8944262 This reply was modified 8 years, 11 months ago by getiem .

getiem 2017-08-18T12:19:00+00:00

Please, current version 1.0.10 has the same bug again. Fix is again the same as in my previous post. Please add this in the next update, I now keep editing your code…

Weblizar – WordPress Themes & Plugin 2017-08-19T06:55:00+00:00

We will update this by next surely with a new update. Thanks for reminding me again and again.

weblizar_support 2017-08-21T10:16:00+00:00

Resolve – loop bug in alt and title tag’s value fixed. Please install new version of Seo Image Optimizer plugin (Version – 1.0.11 )