• Resolved succeedingsteps

    (@succeedingsteps)


    I am getting the following error on all my blog entries and not sure how to fix.

    Warning: printf() [function.printf]: Too few arguments in ……../wp-content/themes/sela/inc/template-tags.php on line 343

Viewing 15 replies - 1 through 15 (of 18 total)
  • Moderator Kathryn Presner

    (@zoonini)

    Are you running the latest version of Sela – 1.0.3?

    Could you try installing a fresh copy of the theme?

    What version of WordPress are you running?

    Thread Starter succeedingsteps

    (@succeedingsteps)

    I was running WordPress 4.1.3, just upgraded to 4.2 to see if it would help, but problem still exists.

    Using Sela 1.0.3. Per your suggestion, deleted the theme and reinstalled.

    Also tested deactivating all of my plugins just in case.

    Error still showing up.

    I have the same problem. Waiting for response. Thanks.

    Moderator Kathryn Presner

    (@zoonini)

    succeedingsteps & alexuadrop – since I haven’t been able to replicate the issue on a test site, could you both please provide links to your sites so I can have a look and see if I can spot anything your two sites have in common? Thanks a lot!

    Thread Starter succeedingsteps

    (@succeedingsteps)

    I was not able to replicate the problem either with another install on the same server.

    Here is a link – all plugins turned off for now:
    https://susanhalpern.com/1/hello-world/

    Moderator Kathryn Presner

    (@zoonini)

    Thanks, succeedingsteps!

    alexuadrop – I’d love a link to your site too if possible.

    I’ll let you know what I find.

    Moderator Kathryn Presner

    (@zoonini)

    succeedingsteps – could you please tell me:

    Hello world! – what category is it in? What tags?
    Test Post – what category is it in? What tags?

    Edit – I just noticed the category widget in the sidebar, so they must be in Uncategorized, but I’d still like to know if there are any tags. Thanks!

    Thread Starter succeedingsteps

    (@succeedingsteps)

    Ah that must be it! When I add a category or a tag, the error goes away. It fixed it on my other test post too.

    Moderator Kathryn Presner

    (@zoonini)

    Strange that I’m still not able to replicate with posts with no tags/default Uncategorized.

    Hi,
    With me is the same. Just as the succeedingsteps said. When add a category or a tag, the error goes away.

    i added a tag, and it didn’t….i will try again ??

    All fixed!

    Hi, I’ve done some fix.

    function sela_footer_entry_meta() {
    	/* translators: used between list items, there is a space after the comma */
    	$category_list = get_the_category_list( __( ', ', 'sela' ) );
    
    	/* translators: used between list items, there is a space after the comma */
    	$tag_list = get_the_tag_list( '', ', ' );
    	$enable_tags = true;
    
    	if ( ! sela_categorized_blog() ) {
    		// This blog only has 1 category so we just need to worry about tags in the meta text
    		if ( '' != $tag_list ) {
    			$meta_text = __( 'Tagged: %2$s', 'sela' );
    		} else {
    			$meta_text = __( '<a href="%3$s" title="Permalink to %4$s" rel="bookmark">Permalink</a>.', 'sela' );
    			$enable_tags = false;
    		}
    
    	} else {
    		// But this blog has loads of categories so we should probably display them here
    		if ( '' != $tag_list ) {
    			$meta_text = __( 'Posted in: %1$s | Tagged: %2$s', 'sela' );
    		} else {
    			$meta_text = __( 'Posted in: %1$s', 'sela' );
    		}
    
    	} // end check for categories on this blog
    
    	if($enable_tags) {
    		printf(
    			$meta_text,
    			$category_list,
    			$tag_list,
    			the_title_attribute( 'echo=0' )
    		);
    	}
    }

    Moderator Kathryn Presner

    (@zoonini)

    Thanks, alexuadrop! I’ll pass this along to our developers.

    I was finally able to replicate the issue on a different test with with only the default Uncategorized category present, and no tags created. I’ll keep you posted once this is fixed.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘printf() [function.printf] error’ is closed to new replies.