WordPress.org

Forums

Featured Image doesn't work in 3.3.1 -> sprintf() error on add post page (5 posts)

  1. ethorn
    Member
    Posted 3 years ago #

    I'm trying to add support for Featured Image by adding:

    if ( function_exists( 'add_theme_support' ) ) {
    add_theme_support( 'post-thumbnails' );
    }

    in the functions.php

    Usually this works fine, but today I got this error (which shows in the Featured Image box on the add-post page):

    Warning: sprintf() [function.sprintf]: Too few arguments in ....

    What I've tried:
    *Redownloaded latest zip from wordpress.org
    *Reinstalled with new install and database
    *Other themes (The same error shows on the twentyeleven theme, haven't tried twentyten)

    I'm doing this locally through WAMP (which has never been a problem before).

    Does anyone know what's wrong?

    [No bumping. If it's that urgent, consider hiring someone.]

  2. victorlopes
    Member
    Posted 3 years ago #

    I'm having the smae problem! Anyone?!

  3. ceotron
    Member
    Posted 3 years ago #

    Same problem here!! need help!! please!!

    now it works with this:

    if ( function_exists( 'add_theme_support' ) ) {
      add_theme_support( 'post-thumbnails' );
    }
  4. tomaslieberkind
    Member
    Posted 3 years ago #

    I have a similar problem, only that nothing shows up in my "Featured Image" box. The same problem appears using the twentyeleven and twentyten themes. Anyone who knows if this is fixable, or if it is a bug?

  5. nouveller
    Member
    Posted 3 years ago #

    I had this occur today with 3.3.1. I was running my website locally and the parent folder that I had WordPress in had a space, so "localhost/Folder%20Name/wordpress". The sprintf was trying to do something with the "%", so changing the folder to "FolderName", solved it. Slightly annoying.

    Don't forget to update all your WP url's in the database after that one.

Topic Closed

This topic has been closed to new replies.

About this Topic