Archived

This topic is now archived and is closed to further replies.

  • 0

Resolved Error Warning: sprintf() [function.sprintf]:

Question

Posted · Report post

Hi. I am getting the following error: Warning: sprintf() [function.sprintf]: Too few arguments in /home/wonderd/public_html/wp-content/themes/pagelines/includes/class.shortcodes.php on line 1067 On this page: http://www.wonderdogs.ca/school-for-dog-trainers/faq/ Any idea why that could be? Thanks in advance!

Share this post


Link to post
Share on other sites

17 answers to this question

Posted · Report post

Hi,

I have just noticed that you're using PageLines Framework 2.2.5, therefore can you perform a backup and update to the latest version which is 2.3.2. Once you have updated, see if the error has been resolved.

**Remember to back up site.

Share this post


Link to post
Share on other sites

Posted · Report post

Hi. I should have mentioned that I am in the process of switching from the Platform Pro theme to Pagelines, an have been working on the site at night - switching back to Platform Pro during the day until I can get all the pages working the way we want them before going live with Pagelines. This said, that error only happens when Pagelines is activated. At any rate, the code at line 1067 in class.shortcodes.php is: $out = sprintf( '

'.do_shortcode( $content ).'
',$atts['name'] ); I am not finished updating all the pages' shortcodes, but so far, the accordions are working on some other pages, but I am getting this error on these pages with Pagelines activated: http://www.wonderdogs.ca/school-for-dog-trainers/career-benefits/ http://www.wonderdogs.ca/school-for-dog-trainers/faq/ http://www.wonderdogs.ca/school-for-dog-trainers/loans-grants/ http://www.wonderdogs.ca/dog-training-victoria-bc/free-dog-training/ Thanks in advance for your help.

Share this post


Link to post
Share on other sites

Posted · Report post

HI.

Sorry for the late reply. Have been out of town.

I am still getting the error message on these pages:

http://www.wonderdogs.ca/school-for-dog-trainers/faq/

http://www.wonderdogs.ca/school-for-dog-trainers/loans-grants/

http://www.wonderdogs.ca/dog-training-victoria-bc/free-dog-training/ **(the entirety of the content on this page is not being displayed; instead I am getting that error)

http://www.wonderdogs.ca/other-services/safety-training-tips/

Any insight would be greatly appreciated, as this is driving us crazy.

Thanks in advance!!

Share this post


Link to post
Share on other sites

Posted · Report post

Thanks for the note.

I updated the framework and it seems to have fixed the problem.

The errors are gone and the accordions work now.

Thanks again!

Share this post


Link to post
Share on other sites

Posted · Report post

HI, I have already informed you that your accordion code is not correctly written, please review the code for mistakes. Once you have resolved these errors, the accordion will work correctly. Regarding the error message - Warning: sprintf() [function.sprintf]: Too few arguments in /home/wonderd/public_html/wp-content/themes/pagelines/includes/class.shortcodes.php on line 1067 Have you made any changes to the class.shortocdes.php file at all ?

Share this post


Link to post
Share on other sites

Posted · Report post

Okay, I'd like you to go to www.pagelines.com/launchpad, login, download PageLines Framework from your account to your local machine. Unzip it. You'll find a folder called "pagelines". Save to the desktop. FTP into your site. Navigate to wp-content/themes. You will see a folder there called 'pagelines'. Do not delete it. Upload the desktop folder called "pagelines" so that it overwrites the existing folder. When asked whether you should overwrite, say yes to all. That should resolve any files that might have been inadequately uploaded. It will not alter any content or custom css you've added, but, if you modified core files (which is a big no-no) those will be fixed. Check to see if you still get the message. If you do, then we may have a plugin conflict going on. If not, then the issue's resolved.

Share this post


Link to post
Share on other sites

Posted · Report post

Hi. Thanks for your reply. I uploaded a fresh copy and am still getting the errors. I also tried deactivating all plugins, refreshing the affected pages and am still getting the error. On this page :http://www.wonderdogs.ca/school-for-dog-trainers/career-benefits/ I am not even getting the accordions displayed. It seems all text is hidden. But the error is still there. I have attached a screenshot. Please let me know if you need any more info.. I am anxious to get this fixed. Thanks so much. PL-vs_2.png

Share this post


Link to post
Share on other sites

Posted · Report post

Ben, do you have something in the template or on the post/page where that error is showing up? Is this a section or shortcode being used there?

Share this post


Link to post
Share on other sites

Posted · Report post

Hi. It seems now that the error comes up and the accordions disappear on the page when I add the closing [/pl_accordion] tag. If I leave the closing tag out, the accordions work, but the don't close the previous tab when you click a new one. I have set the page up like this for now so you can see what I am talking about. There is a clip of the opening code on the page:

[pl_accordion name="accordion"][pl_accordioncontent name="accordion" number="1" heading="Uplifting & Active Work" open="no"]
	
	[caption id="attachment_1943" align="alignright" width="141"] Ben in the fast lane! 2006 Royal Victoria Marathon 8km Race[/caption]
	
	It is well-documented that working with, and being around animals is therapeutic. As a professional dog trainer, you have a unique opportunity to be outdoors in a healthy and active working environment. In essence, you are getting a great workout and making money at the same time.
	
	[/pl_accordioncontent][pl_accordioncontent name="accordion" number="2" heading="Future Career Opportunities"]
	Professional dog trainers and behaviourists worldwide are on the cutting edge of some fascinating[/code]

I have followed the directions on the /tools page for the accordions, opening and closing the same way all the way down the page. This works on other pages on the site, just not a couple of them. Hope this information helps. Thanks a lot.

Share this post


Link to post
Share on other sites

Posted · Report post

The topic was marked as resolved.

Share this post


Link to post
Share on other sites

Posted · Report post

Hi, Can you paste the code that is causing the error on these certain pages to our paste service please. The code above you added to your post, is not complete. http://paste.pagelines.com/

Share this post


Link to post
Share on other sites

Posted · Report post

Hi. Thanks for the note. I have pasted the pages' code using paste service. Please let me know what you see? Thanks!

Share this post


Link to post
Share on other sites

Posted · Report post

Hi, Can you provide a link to the code please.

Share this post


Link to post
Share on other sites

Posted · Report post

OK, I have yet to check this completely, but from taking a quick look http://paste.pagelines.com/5n1 http://paste.pagelines.com/6vk http://paste.pagelines.com/7xw http://paste.pagelines.com/6pf

Share this post


Link to post
Share on other sites

Posted · Report post

When I view your site, I don't actually see the error, but I see the shortcodes are displaying instead of actually working. Can you please open that file, class.shortcodes.php in the pagelines/includes directory and post the code on line 1067?

Share this post


Link to post
Share on other sites

Posted · Report post

Hi. Yes I know I havent closed the accordion on those pages. I didn't, because when I do, the accordions break altogether, and don't show up on the page at all. You can see what I mean here: I have now closed the accordion on this page: http://www.wonderdogs.ca/dog-training-victoria-bc/free-dog-training/ As for the code errors, I don't see where there are errors? Which lines do you see errors on? Thanks so much!

Share this post


Link to post
Share on other sites