WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Fatal error on 3.1.2 (images) (6 posts)

  1. barbapapa
    Member
    Posted 3 years ago #

    Since I use WP 1.2 or so I have never had the singled problem after automated upgrade. Yesterday I switched to 3.1.2 and while posting I tried to put an image in the post and had this

    Fatal error: Call to undefined function get_post_thumbnail_id() in /-/-/-/-/public_html/000-eucmh.com/wp-admin/includes/media.php on line 1314

    Can anyone help me ?

  2. barbapapa
    Member
    Posted 3 years ago #

    Problem solved
    plugin /knowledgering/ caused the problem
    I have found it
    :))

  3. JKendall
    Member
    Posted 3 years ago #

    Hi Barbapapa - I'm having the same issue and it seems to be caused by plugins also. Would you mind providing more detail on how you fixed it? Or did you just remove the plugin?
    Thanks!
    Jk.

  4. jeFFF
    Member
    Posted 3 years ago #

    Hello,

    I had the same problem and I thought it was a plugin but for some reason I wrapped this line :
    add_theme_support( 'post-thumbnails' );
    in a function which caused the crash. If it's the case, just put this line outside a function it should solve the problem.

    Hope this is helpful,
    cheers,
    jeFFF

  5. JKendall
    Member
    Posted 3 years ago #

    Hi JeFF,

    That is awesome thank you, was just revisting this issue today so very timely. I just removed add_theme_support('post-thumbnails') from my themes functions.php and it seems to be working fine now.

    Cheers
    Jk

  6. jeFFF
    Member
    Posted 3 years ago #

    Glad to see it worked, but try another thing, my english is not so good and I think I wasn't very clear.
    What I wanted to say is that this instruction is in my functions.php file but I had this bug if I wrapped it like this :

    function myInit()
    {
      add_theme_support('post-thumbnails');
    }
    add_action('init', 'myInit');

    In this particular case, as "add_theme_support" was wrapped in a function, I had the bug.
    Putting the line outside the myInit function solved the problem.

    Cheers
    jeFFF

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.