• Resolved motomixon

    (@motomixon)


    I just tried to activate the base plugin 2.0.1, and receive the following error:

    Plugin could not be activated because it triggered a fatal error.
    
    Fatal error: Cannot redeclare image() (previously declared in /home/...deleteing my info.../public_html/mvazmtn/wp-content/themes/overall/framework/options/option_shortcodes.php:152) in
    /home/...deleting my info.../public_html/mvazmtn/wp-content/plugins/oik/bobbfunc.inc on line 123

    The Overall theme is essential to the website, so I cannot change that. Any idea what is going on?

    As far as I can tell, this is the code in the Overall theme file

    function image( $atts, $content = null ) {
    		extract( shortcode_atts( array(
    		'small' => '',
    		'big' => '',
    		'align' => '',
    		'width' => '',
    		'height' => '',
    		'type' => '',
    		'skin' => '',
    		'link' => '',
    		'target' => '',
    		), $atts ) );
    
    		$content =  '<div class="image_frame_'.esc_attr($align).'">';
    
    		if(esc_attr($skin) != "off"){
    		$content .= '<div class="image_skin">';
    		$content .= '<div class="image_inside_border">';
    		$content .= '<div class="image_skin_anime" style="width:'.esc_attr($width).'px; height:'.esc_attr($height).'px;">';
    		$content .= '<div class="image_holder" id="zoom_'.esc_attr($type).'">';
    		}
    
    		if(esc_attr($big) != ""){
    		$content .= '<a href="'.esc_attr($big).'" rel="prettyPhoto[canyon_gallery]">';
    		}
    
    		if(esc_attr($link) != ""){
    		$content .= '<a href="'.esc_attr($link).'" target="'.esc_attr($target).'">';
    		}
    
    		$content .= '<img src="'.esc_attr($small).'" style="width:'.esc_attr($width).'px; height:'.esc_attr($height).'px;" alt=""/>';
    
    		if(esc_attr($big) != "" or esc_attr($link) != ""){
    		$content .= '</a>';
    		}
    
    		if(esc_attr($skin) != "off"){
    		$content .= '</div></div></div></div>';
    		}
    
    		$content .='</div>';
    
    	return $content;
    
    	}
    	add_shortcode('image', 'image');

    https://www.ads-software.com/plugins/oik/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author bobbingwide

    (@bobbingwide)

    Hi, I’ve responded to your email. The workaround is to comment out or delete the image() function from oik/bobbfunc.inc

    I will be deprecating the image() function in a future version.

    Thread Starter motomixon

    (@motomixon)

    duplicate responses on my part

    Thread Starter motomixon

    (@motomixon)

    Unfortunately, this leads to this error:
    Fatal error: Cannot redeclare blockquote() (previously declared in /home/…./wp-content/plugins/oik/bobbfunc.inc:515) in /home/…./wp-content/themes/overall/framework/options/option_shortcodes.php on line 236

    Strange two development teams should choose the same function calls.
    At any rate, is there anything more to do — one cannot comment out all of your functions (!!).

    Plugin Author bobbingwide

    (@bobbingwide)

    I wonder how many more duplicated function names are waiting to be discovered.

    You can try renaming blockquote to _bw_blockquote
    And if you intend to use the [bw_blockquote] shortcode
    then change bw_blockquote in bobbcomp.inc to call the renamed function.

    In the future PHP namespaces may help, but we can’t do that while WordPress is still supported on PHP 5.2

    Plugin Author bobbingwide

    (@bobbingwide)

    The latest alpha test version of oik (v2.1-alpha.1107) contains a fix for this problem. https://www.oik-plugins.com/wordpress-plugins-from-oik-plugins/oik-base-plugin/

    I won’t mark the problem as resolved until a version containing the fix is released to www.ads-software.com

    Plugin Author bobbingwide

    (@bobbingwide)

    The image() function was deprecated in oik v2.1. So closing as resolved.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Fatal error: Cannot redeclare image()’ is closed to new replies.