Forums

CataBlog
Edit item error (5 posts)

  1. yakos
    Member
    Posted 10 months ago #

    Hi all,
    Great plugin.
    I am getting an error which I cannot understand. This error is appearing every time I hit the save button on editing an item.

    Warning: sprintf() [function.sprintf]: Too few arguments in /home/xxxxxxx/public_html/xxxxxxx/wp-content/plugins/catablog/lib/CataBlog.class.php on line 585

    Is this a known error ?

    I am running the latest version of Catablog with WP 3.2.1

  2. macguru2000
    Member
    Posted 10 months ago #

    I have not run into this error myself, will have to look into later when I have more time, still thank you very much for the bug report and look forward to solving this issue with you at a later date.

  3. sock2me
    Member
    Posted 10 months ago #

    I'm getting the same error. It seems to happen when I change an attribute of a item in the Library (like assigning it a new order number or category). Other than that, it doesn't show up. I hope we can figure this out, makes me a little nervous....

  4. macguru2000
    Member
    Posted 10 months ago #

    So this is line 585 of CataBlog.class.php, it would seem the sprintf is simply trying to make an addition to the saved message string. In other words this is a rather trivial error message, that you could remove simply by removing the entire line of code. This line of code is also only run when the public option is enabled. Strangely, there is nothing I can see wrong with the line of code, any ideas?

    585  $message .= sprintf(" (<a href='$permalink'>%s</a>)", __("View Now"));
  5. macguru2000
    Member
    Posted 9 months ago #

    Perhaps it's the use of a variable in the first sprintf parameter, it should be a string token like the second variable most likely :)

    585  $message .= sprintf(" (<a href='%s'>%s</a>)", $permalink, __("View Now"));

Reply

You must log in to post.

About this Plugin

About this Topic

Tags