Search Bug in 3.0.1 toolkit

phpBB SEO Premod for phpBB3 support forum.
This premodded version of phpBB3 includes the three different type of URL rewriting for phpBB3 by phpBB SEO. It comes with several other Search Engine Optimization mods installed.

Moderator: Moderators

Search Bug in 3.0.1 toolkit

Postby pacorl » Thu May 01, 2008 5:47 pm

I'm using phpBB3-SEO-Premod_V_3-0-1.zip , and I've notice an strange error in searches (pagination).

If I search for example "wing tsun kuen", the second page, the third, etc, looks like this:

-http://myforum.com/foros/search.php?st=0&sk=t&sd=d&keywords=wing+tsun+kuen&start=15

But if the search is a word that finish in "A" key, for example "mercedes mila", the first page appears OK, but the pagination is wrong, because look like this:

-http://myforum.com/foros/search.php?st=0&sk=t&sd=d&keywords=mercedes+mil&start=15

This is, the last "A" dissappear, and search is wrong (not coincidences).

If I search "taekwondoka", the "A" dissappear:

-http://myforum.com/foros/search.php?st=0&sk=t&sd=d&keywords=taekwondok&start=15

:shock: :shock: :shock: :shock: :shock: :shock: :shock:

A solution, please!

ps. If I replace search.php with de phpbb original one, it search works ok.
pacorl
 
Posts: 4
Joined: Thu May 01, 2008 5:38 pm

Advertisement

Postby SeO » Fri May 02, 2008 1:49 pm

Now this is an interesting bug :shock:

I could reproduce it and found the reason.

The guilty line is :
Code: Select all
   $u_search = trim($u_search, '&');


For some obscure reasons, trim() does delete the ending 'a' where we ask it do delete '&'. The fix is simple, replace the above line with :

Code: Select all
   $u_search = preg_replace('`(^&|&$)`i', '', $u_search);


http://phpbb3.phpbb-seo.net/search.php? ... words=maya

Thanks for reporting, will be added to next update ;)
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby pacorl » Fri May 02, 2008 7:36 pm

Works! , thank you :D :D :D

ps. For people that read this post, the file to modify is search.php :wink:
pacorl
 
Posts: 4
Joined: Thu May 01, 2008 5:38 pm


Return to phpBB SEO Premod

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 8 guests