VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: rayge on May 24, 2013, 21:47:45 PM

Title: search page gives 404 error
Post by: rayge on May 24, 2013, 21:47:45 PM
When i search from the VM search module it works fine but if i then search from that page it gives me a 404.
proper search results page

index.php?keyword=022&limitstart=0&option=com_virtuemart&view=category

after trying from within that page (NOT the module)

index.php?keyword=022&search=true&view=category

option=com_virtuemart is dropped and search=true shows up.

IS THIS A BUG?
Title: Re: search page gives 404 error
Post by: PRO on May 24, 2013, 23:50:12 PM
are you using a template override?
Title: Re: search page gives 404 error
Post by: pezhardie on June 03, 2013, 04:07:46 AM
I have the same issue. It only happens when you search in the field at the top of the returned results page.

Where can i find the code to remove this search box as the module is always shown on the left column.

Thanks
Title: Re: search page gives 404 error
Post by: jenkinhill on June 03, 2013, 10:56:56 AM
Quote from: pezhardie on June 03, 2013, 04:07:46 AM
Where can i find the code to remove this search box as the module is always shown on the left column.

Just unpublish the Joomla module you do not want to show.
Title: Re: search page gives 404 error
Post by: rayge on June 04, 2013, 08:46:36 AM
I am using one NOW to fix it but NO I wasn't before that. THis is a bug im sure.
Title: Re: search page gives 404 error
Post by: mb000000 on July 04, 2013, 13:00:58 PM
VM 2.0.20b & J1.5

I've just found the same problem. I *did*/do have a template override, but with it or without it, the same problem occurs, namely the loss of the option=com_virtuemart in the resultant URI when the search box is clicked within the content rather than the module.  That URI then causes a 404.

My workaround in the override is to add
<input type="hidden" name="option" value="com_virtuemart"/>
within the search form in my override.

Not a great solution, but the easiest one I can come up with for the moment.

My initial thought was that the JS maze called by OnClick (this.form.keywork.focus()) was mangling the form entity's action value, but I see now that the module also has the hidden input as per my workaround, so now I think it *is* a bug - sorry Milbo!  If I'm right, then my "workaround" needs to go in to views/category/tmpl/default.php and any override (which is where I put it).


Mark
Title: Re: search page gives 404 error
Post by: ahmadjan on September 01, 2013, 22:28:07 PM
Quote from: mb000000 on July 04, 2013, 13:00:58 PM
VM 2.0.20b & J1.5

I've just found the same problem. I *did*/do have a template override, but with it or without it, the same problem occurs, namely the loss of the option=com_virtuemart in the resultant URI when the search box is clicked within the content rather than the module.  That URI then causes a 404.

My workaround in the override is to add
<input type="hidden" name="option" value="com_virtuemart"/>
within the search form in my override.

Not a great solution, but the easiest one I can come up with for the moment.

My initial thought was that the JS maze called by OnClick (this.form.keywork.focus()) was mangling the form entity's action value, but I see now that the module also has the hidden input as per my workaround, so now I think it *is* a bug - sorry Milbo!  If I'm right, then my "workaround" needs to go in to views/category/tmpl/default.php and any override (which is where I put it).


Mark

Thanks mb000000! It worked!