Support » How-To and Troubleshooting » [Resolved] Fatal error on 3.1.2 (images)

[Resolved] Fatal error on 3.1.2 (images)

  • 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 ?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Problem solved
    plugin /knowledgering/ caused the problem
    I have found it

    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?


    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,

    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.


    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_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.


Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Fatal error on 3.1.2 (images)’ is closed to new replies.