problem with serendipity_event_entrypaging

Found a bug? Tell us!!
Post Reply
Frandy

problem with serendipity_event_entrypaging

Post by Frandy »

Hi,

I got a strange message in my page using prev/next entries links :

Warning: sprintf() [function.sprintf]: Too few arguments in /blog/plugins/serendipity_event_entrypaging/serendipity_event_entrypaging.php on line 158

Warning: sprintf() [function.sprintf]: Too few arguments in /blog/plugins/serendipity_event_entrypaging/serendipity_event_entrypaging.php on line 159

i add a look into serendipity_event_entrypaging.php

Code: Select all

            $prevID = serendipity_db_query(sprintf($querystring, '<', 'DESC'));
            $nextID = serendipity_db_query(sprintf($querystring, '>', 'ASC'));
could you explain what's happening please ?

thanks for help

Frandy
Frandy

Post by Frandy »

Now it works !

very strange.
wesley
Regular
Posts: 197
Joined: Sun Jul 10, 2005 11:15 am
Contact:

Post by wesley »

It's hinting that something's wrong with $querystring being passed to here...
Although there SHOULDN'T be. Perhaps a loophole? It would've been nice
to capture what was in $querystring when the error occurred.
I make s9y plugins, too.
My s9y blog depends on them. :)
Frandy

Post by Frandy »

wesley wrote:It's hinting that something's wrong with $querystring being passed to here...
Although there SHOULDN'T be. Perhaps a loophole? It would've been nice
to capture what was in $querystring when the error occurred.
I can repeat the problem
it appends only when i'm connected as an admin user to the blog with some specific entries hidden to other users. i can read these 'protected' entries but the error is on.

when i'm connected as a visitor, sure i can't see hidden entries but the problem doesn't appear.

have an idea ?
how can i help you ?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Thanks for debugging this.

In fact the problem was caused because once entryproperties plugin is active, it inserts SQL parts like

Code: Select all

LIKE '%serendipity...%'
into the $querystring varaible. Sprintf() now thinks that the "%s" is yet another string which needs parametrization.

Thus we now need to to our own string replacement which doesn't cat %s as an evil character.

( That means: Fixed in CVS, version 1.19 of the plugin :-) )

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Frandy

Post by Frandy »

Great :lol:
Post Reply