FIX: Guestbook error: Warning: vsprintf(): Too few arguments

A place to discuss the testing process in beta cycles or against SVN for the CMS Made Simple CORE package.
Locked
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm
Location: Raalte, the Netherlands

FIX: Guestbook error: Warning: vsprintf(): Too few arguments

Post by RonnyK »

Tobik, published the fix for the error above in the addon-board.
Please embed this fix in the SVN (Posted a bug-report in the DEV-area as well)
tobik wrote: The root cause is in modules/Guestbook/lib/classes/module/class.Guestbook.php. Change line 767 from

Code: Select all

$delconf        = lang('deleteconfirm');
to

Code: Select all

$delconf        = lang('deleteconfirm', $r);
Ronny
Last edited by RonnyK on Fri Sep 07, 2007 1:18 pm, edited 1 time in total.
tobik
Translator
Translator
Posts: 149
Joined: Thu Aug 16, 2007 6:18 pm

Re: FIX: Guestbook error: Warning: vsprintf(): Too few arguments

Post by tobik »

I put this in the SVN

Tobik
herbshirt
Forum Members
Forum Members
Posts: 145
Joined: Thu Jul 26, 2007 3:47 am

Re: FIX: Guestbook error: Warning: vsprintf(): Too few arguments

Post by herbshirt »

Excuse my ignorance. I don't fully understand "SVN". Nor can I find the "addon-board".

I found this: http://dev.cmsmadesimple.org/scm/?group_id=34
but I'm not sure what I should be downloading, if anything. I understand it stands for Subversion something or other...

Where do I find this SVN. Is it not here? http://dev.cmsmadesimple.org/frs/?group ... ase_id=771
tobik
Translator
Translator
Posts: 149
Joined: Thu Aug 16, 2007 6:18 pm

Re: FIX: Guestbook error: Warning: vsprintf(): Too few arguments

Post by tobik »

I know the access to SVN is not very straightforward nor comfortable for non-developers. SVN is a software managment system. Various developers can work together collecting all their modifications/additions to the source code in a centralized SVN repository. Guest may checkout the latest versions and use them on their systems.

When I moved to CMSMS some weeks ago I found that no one is active maintaining the Guestbook nor Smileys module.  I made some changes and fixes to this modules and committed them to the SVN. But I never got any feedback to my modifications.

I hesitate to create public releases because of this lack of feedback. Additionally I am not sure if it would be desired by the original  maintainers. But if there would be a request or at least feedback I would happily provide public releases of this modules.

You can find a example of the latest version on http://www.tobik.de/gastbuch.html

Tobias
herbshirt
Forum Members
Forum Members
Posts: 145
Joined: Thu Jul 26, 2007 3:47 am

Re: FIX: Guestbook error: Warning: vsprintf(): Too few arguments

Post by herbshirt »

Thanks Tobik. I understand.
I changed the code as suggested by RonnyK above and it seems to have removed the error.

But unfortunately guestbook entries are no longer appearing in admin and when I try 'Preview' I get a massive error.

Any further suggestions appreciated, otherwise I'll persist.

Thanks guys.
Last edited by herbshirt on Sun Nov 11, 2007 12:07 am, edited 1 time in total.
tobik
Translator
Translator
Posts: 149
Joined: Thu Aug 16, 2007 6:18 pm

Re: FIX: Guestbook error: Warning: vsprintf(): Too few arguments

Post by tobik »

Please could you confirm. You are using Guestbook 1.9 and applied the patch above?
Where do you press "Preview"? Which error do you get exactly? Please give the precise text or provide a screenshot.
herbshirt
Forum Members
Forum Members
Posts: 145
Joined: Thu Jul 26, 2007 3:47 am

Re: FIX: Guestbook error: Warning: vsprintf(): Too few arguments

Post by herbshirt »

You mention Guestbook "1.9". Did you mean "1.1.9"?

The attached screenshot goes the width of both monitors hopefully you'll get the info you need.

In Dreamweaver cs3 and PSPad  it's line 758 which I replaced. It removes the previous error but throws up the new big one. I don't get the notification email nor does the entry appear in admin.

I press preview here: Content > Pages > Guestbook > (there's a Content and a Preview tab)
Attachments
Snapshot_003.jpg
tobik
Translator
Translator
Posts: 149
Joined: Thu Aug 16, 2007 6:18 pm

Re: FIX: Guestbook error: Warning: vsprintf(): Too few arguments

Post by tobik »

Right, the latest Guestbook module release is 1.1.9 and line 758 is the one to change here.

- Please can you empty the cache.
- And what page is viewed in background. Is there a guestbook related page with the tabs "Content" and "Preview"?
- Did you modify your guestbook templates? Try reset them to standard.
- Does the error vanish when you restore the modifications in line 758 back to original?
herbshirt
Forum Members
Forum Members
Posts: 145
Joined: Thu Jul 26, 2007 3:47 am

Re: FIX: Guestbook error: Warning: vsprintf(): Too few arguments

Post by herbshirt »

Hi Tobik,

Thanks for looking at this for me.

Before I got your reply I had actually completely removed the guestbook and re-installed which seems to have fixed it.
Yes I had tweaked the template just to remove the 'Homepage' field. Perhaps that affected it?

If I want to remove that field do I remove...

{if $entry.homepage}

{$titles.homepage}: {$entry.homepage}

{/if}

from the Entry List Template. Is that right?

Also I want to format the Thankyou page (the page after submission). I can't find it in the templates.
tobik
Translator
Translator
Posts: 149
Joined: Thu Aug 16, 2007 6:18 pm

Re: FIX: Guestbook error: Warning: vsprintf(): Too few arguments

Post by tobik »

herbshirt wrote: If I want to remove that field do I remove...

{if $entry.homepage}

{$titles.homepage}: {$entry.homepage}

{/if}

from the Entry List Template. Is that right?
Thats right
herbshirt wrote: Also I want to format the Thankyou page (the page after submission). I can't find it in the templates.
In the Guestbook Template you find
{if $show_msg}
{$msg}
{/if}

Here you can add your classes or styles.
herbshirt
Forum Members
Forum Members
Posts: 145
Joined: Thu Jul 26, 2007 3:47 am

Re: FIX: Guestbook error: Warning: vsprintf(): Too few arguments

Post by herbshirt »

Thanks again Tobik.

Its all good.
Locked

Return to “[locked] Quality Assurance”