• I noticed when using the plugin that sometimes error messages were shown near the size charts, regarding image-position not being set.

    I altered this in code to prevent this happening –?in public/includes/productsize-chart-contents.php I changed the following:

    $position_c1 = $assets['chart-1'][0]['image-position'] == 'left' ? 'image-left' : 'image-right';

    to

    if (isset($assets['chart-1'][0]['image-position'])) {
    	$position_c1 = $assets['chart-1'][0]['image-position'] == 'left' ? 'image-left' : 'image-right';
    } else {
    	$position_c1 = 'image-left';
    }

    and the following:

    $position_c2 = $assets['chart-2'][0]['image-position-1'] == 'left' ? 'image-left' : 'image-right';

    to

    if (isset($assets['chart-1'][0]['image-position'])) {
    	$position_c2 = $assets['chart-2'][0]['image-position'] == 'left' ? 'image-left' : 'image-right';
    } else {
    	$position_c2 = 'image-left';
    }

    This prevents errors occurring. Any chance this change, or a similar one, can be incorporated into the plugin code?

    Thanks!

  • The topic ‘Errors shown when image-position not set’ is closed to new replies.