News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Search box error - simple fix but where do i find this code ?

Started by JJMPSP, May 23, 2010, 11:06:01 AM

Previous topic - Next topic

JJMPSP

Hi, for some reason i think my theme is messed up and is redirecting users to the wrong url when they search.
Take a look at this.

QuoteNot Found

The requested URL / http://jtagxbox360.info/search2/ was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

I know exactly what the problem is, the site just redirects to the wrong url as i said
Quotehttp://jtagxbox360.info/%20http://jtagxbox360.info/search2/

where as it should be
Quotehttp://jtagxbox360.info/search2/


Can anyone tell me which file to edit to fix this error ?

kat

it's only doing this with that theme, yes? Not the SMF default?


Which theme is it?

JJMPSP

yes just this theme.

I know exactly what is wrong, the board gets redirected to the board url + "http://jtagxbox360.info/search2/"
instead of just the board url + "/search2/

Do you know which file to edit so i can fix this ?

Edit: theme is EOTSDZINE C.O.D MW2

kat

I'm just downloading the theme, to have a look at it's files.


I'll get back to you.

JJMPSP

alright, thank you very much :)
Its probably a very simple 2 minute fix :)

kat

Looking at the theme, I doubt it. :(


First thing to check is index.template.php.


Are these lines the same as in yours?


// Show all the relative links, such as help, search, contents, and the like.
   echo '
   <link rel="help" href="', $scripturl, '?action=help" />
   <link rel="search" href="', $scripturl, '?action=search" />
   <link rel="contents" href="', $scripturl, '" />';



and



echo '
<div id="searchbox">
    <form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
    <input class="inputbox" type="text" name="search" value="', $txt['search'], '....." onfocus="this.value = \'\';" onblur="if(this.value==\'\') this.value=\'', $txt['search'], '...\';" />';





Have you edited any of the files, yourself, for some reason? (Mods, that kinda thing)

JJMPSP

Oh yes i forgot to mention, I have pretty urls mod installed (installed it recently)
I did ask on the support topic but i got a reply from the creator that it was a problem with my board theme.
Will check those files now then report back, thanks.

the first quote of lines is correct, apart from the help option, as i have removed that myself, so thats fine.


The second quote box is totally different though :(
This is the only thing I can find when i look through index.template.php :(


Quote<input class="biginput searchbox" type="text" name="search" value="', $txt['search'], '..." onfocus="this.value = \'\';" onblur="if(this.value==\'\') this.value=\'', $txt['search'], '...\';" style="width: 90px;" />
                        <a href="', $scripturl, '?action=search;advanced" title="', $txt['search_advanced'], '"><img id="advsearch" src="'.$settings['images_url'].'/filter.gif" align="middle" alt="', $txt['search_advanced'], '" /></a>';

JJMPSP


kat

Pretty urls...


I'm growing to abhor that damned mod. It seems to cause some serious problems, on quite a few sites.


Can I suggest that you post in that mod's support topic, with this?


You can be 99% certain that it's that mod that's causing this problem.

JJMPSP

Hi again, sorry I had to leave yesterday.
I did post on the support topic, but they said it was my template or something... I then posted my index file, but got no reply :(

I will try post this link on the thread right now.

Also, I noticed that the searchbox does redirect correctly when you click on the actual search button.
Quotehttp://jtagxbox360.info/search/?advanced

Thanks for your time mate. :)

kat

That's OK, Chief!


I'm pretty sure it's that mod that's causing the hassles.


I'm afraid that I have no idea how to put things right, though.


Sorry'n'all that. :(

Özgür

This isn't a prettyurls issue, i think.
And hat code should in the index.template.php. If you upload in that topic or send me in pm, i wil look it.
So Long

Dannii

Looks like you have an extra space in your <form action=" ">
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

JJMPSP

http://www.simplemachines.org/community/index.php?action=dlattach;topic=146969.0;attach=145323

thats my  index.template.php file.

And Dannii, where did you find that code ? I will look into it if you tell me where i can find it :)

Thanks everyone :)

Özgür

Its here.
<form class="floatright" action=" ', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
Must be
<form class="floatright" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">

Your theme using << action=" ', $scripturl, '?action=search2" >> and this action="" has extra spaces.
So Long

JJMPSP

OMG thank you so much :) :)
I really don't know how this happened, I haven't edited this file myself before .....

Thanks to everyone that looked at this :)

I am so happy now lol, ive been getting about 20 PM's a day asking about it !

Solved, at last ! :D

Advertisement: