Search Box in Prosilver not working. SID gets removed!

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Ideas Centre
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
TheFarq
Registered User
Posts: 17
Joined: Mon May 21, 2007 6:59 pm

Search Box in Prosilver not working. SID gets removed!

Post by TheFarq »

When using the prosilver template and the search box to search for results, it logs the user off, so no results are returned.

So before the search I see the following at the top of the page:

FAQ | Search | Members | Logout [username]

After I see:

FAQ | Search | Members | Login


This is not the case when using Advanced Search or other template since they don't implement the search box feature.

I have isolated it to the search.php function I believe. What happens is the SID is dropped from the URL so the queries don't think anyone is logged in. So to test this theory I loaded another style and tried to load this URL:

/search.php?keywords=%2Bcitrix++&sid=ce4d1b92c9a6ec803a2e5f120e233130

That worked. But when using the search box it removes the SID and you are left with:

/search.php?keywords=%2Bcitrix++

Guess what. It doesn't work without the SID. Any ideas????

I have included other details about the site below:



Auth Method: LDAP
Your board's URL: PRIVATE INTERNAL SITE
Version of phpBB3: 3.0 RC1
Was this an update from a previous version? 2.0.22
Was this an install through your host? No
MODs you have installed: None
When the problem started: After Upgrade

Additionally, you may wish to provide the following (where applicable)
Template(s) used: Prosilver
Version of PHP used: 4.4.7
Database and version used: MySQL 4.1.22-community-nt
Do you have a test account for us? NO
Last edited by TheFarq on Tue May 22, 2007 6:25 pm, edited 5 times in total.
TheFarq
Registered User
Posts: 17
Joined: Mon May 21, 2007 6:59 pm

Re: When using search box query string loses SID, so no results

Post by TheFarq »

I thought I would make this a little bit more clear. When someone enters text into the search box, and they perform a search, it doesn't retain their SID on the search.php page. So it doesn't think they are logged in.

So now they don't see any search results and they have to relogin. This only happens in ProSilver, mainly because the other styles don't have a Search Box.
njuzovi
Registered User
Posts: 5
Joined: Mon May 21, 2007 6:08 pm

Re: Clicking on search button using Prosilver logs user off

Post by njuzovi »

TheFarq
Registered User
Posts: 17
Joined: Mon May 21, 2007 6:59 pm

Re: Clicking on search button using Prosilver logs user off

Post by TheFarq »

I don't understand why more people aren't seeing this issue. I don't even get the error you get. The user just gets logged off (or session dropped) and no search results appear.

And just to clarify I don't get any search results because I require the user to login to the forums otherwise they don't see any posts.

If they same user uses the advanced search it works fine.
TheFarq
Registered User
Posts: 17
Joined: Mon May 21, 2007 6:59 pm

Re: Clicking on search button using Prosilver logs user off

Post by TheFarq »

njuzovi wrote:I'm seeing the same thing...

http://www.phpbb.com/community/viewtopi ... 6&t=543607
Any luck on resolving this issue? I have looked at the functions.php which tells {U_Search} which URL to use and everything looks correct. But whenever I click on it it drops my SID from the address line and then the system doesn't think I am logged in any more.

If I click back I see that I am still logged in though.

I am attaching some pictures to make myself more clear:
Address Bar Before Search showing SID
Address Bar Before Search showing SID
phpbb_address_`1.jpg (4.12 KiB) Viewed 1183 times
Logout Link showing me logged in
Logout Link showing me logged in
phpbb_search_before.jpg (9.06 KiB) Viewed 1184 times
Address Bar After clicking search link. SID is lost and user is logged off.
Address Bar After clicking search link. SID is lost and user is logged off.
phpbb_address.jpg (3.1 KiB) Viewed 1183 times
More pics on next post.
TheFarq
Registered User
Posts: 17
Joined: Mon May 21, 2007 6:59 pm

Re: Clicking on search button using Prosilver logs user off

Post by TheFarq »

(continued from last post)

No suitable matches found.
Information alert showing no results because user was not logged in.
Information alert showing no results because user was not logged in.
phpbb_information.jpg (4.65 KiB) Viewed 1214 times
Search using advanced search works fine. Appends SID
Search using advanced search works fine. Appends SID
phpbb_address2.jpg (8.68 KiB) Viewed 1215 times
TheFarq
Registered User
Posts: 17
Joined: Mon May 21, 2007 6:59 pm

Re: Clicking on search button using Prosilver logs user off

Post by TheFarq »

I have also tried changing the search backend thinking maybe something with the MySQL Search code was buggy. Not the case though. Still having problems.
User avatar
Kieran007
Registered User
Posts: 273
Joined: Sun Aug 29, 2004 9:28 am
Location: London, UK
Name: Kieran O'Shea
Contact:

Re: Clicking on search button using Prosilver logs user off

Post by Kieran007 »

TheFarq wrote:I don't understand why more people aren't seeing this issue.
Perhaps because if you have cookies enabled then you don't need to pass the SID around to every page. That aside though this sounds like a bug and should thus be reported to the bug tracker.
Kieran
[ RouterTech - Tech Support for all things networking ]
Useful phpBB links: Use the Forum Search!
No support via PM, please ask your questions in the forum!
TheFarq
Registered User
Posts: 17
Joined: Mon May 21, 2007 6:59 pm

Re: Search Box in Prosilver not working. SID gets removed!

Post by TheFarq »

And that does sound logical because I have tried the search function on other phpBB sites that are using Prosilver and theirs works. So it is possible you don't need the SID up there, but I do notice if I manually append the SID to the URL it works fine and I don't get logged out.
njuzovi
Registered User
Posts: 5
Joined: Mon May 21, 2007 6:08 pm

Re: Search Box in Prosilver not working. SID gets removed!

Post by njuzovi »

I solved it by manually adding

Code: Select all

<input name="sid" value="{_SID}" type="hidden" />
in the template file overall_header.html on line 116.

I think that SID code

Code: Select all

<form action="./search.php?sid=xyz" method="get" id="search">
gets overwritten by GET method when form is submitted.

I also believe that this problem would be solved by making SID be transfered by cookie, but I didn't find this option. on http://area51.phpbb.com/phpBB/ I don't see any SID in the urls...
TheFarq
Registered User
Posts: 17
Joined: Mon May 21, 2007 6:59 pm

Re: Search Box in Prosilver not working. SID gets removed!

Post by TheFarq »

njuzovi,

That worked perfectly. What OS are you running your board on? I was just wondering if it was a IIS, PHP Windows, or MySQL for windows problem, since other people aren't experiencing this issue.

Either way thanks for that code, that new line works great now.

-Ryan
njuzovi
Registered User
Posts: 5
Joined: Mon May 21, 2007 6:08 pm

Re: Search Box in Prosilver not working. SID gets removed!

Post by njuzovi »

TheFarq wrote:njuzovi,

That worked perfectly. What OS are you running your board on? I was just wondering if it was a IIS, PHP Windows, or MySQL for windows problem, since other people aren't experiencing this issue.

Either way thanks for that code, that new line works great now.

-Ryan
No problem... I'm running on Windows XP with Apache 1.3.33. PHP runs like CGI.

Now I'm sure that problem is in sending cookies from phpBB. My "Server configuration -> Cookie settings" seems OK, but it has to do something with upgrade from 2.0.x... In Firefox and in the IE there is no phpbb3 cookie. I need to test server headers...
njuzovi
Registered User
Posts: 5
Joined: Mon May 21, 2007 6:08 pm

Re: Search Box in Prosilver not working. SID gets removed!

Post by njuzovi »

njuzovi wrote:I need to test server headers...
Solved...

In ACP "Server configuration -> Cookie settings" you need to blank "Cookie domain:" field.

Strange... ;)
TheFarq
Registered User
Posts: 17
Joined: Mon May 21, 2007 6:59 pm

Re: Search Box in Prosilver not working. SID gets removed!

Post by TheFarq »

That worked. Very strange. The cookie settings were the same in phpBB2. I don't understand why they would stop working now. Oh well, thank you very much!!!
Locked

Return to “[3.0.x] Support Forum”