News:

Looking for documentation? Take a look on our wiki

Main Menu

404 in URL search module

Started by pvlooy, June 08, 2016, 17:59:41 PM

Previous topic - Next topic

pvlooy

Hello,

I'm using the latest version of Joomla (3.5.1) and Virtuemart (VM3.0.14) and I'm experiencing problems when both using the search module and the search box on the category page.
For some reason 404 appears in my URL or it just searches in random categories. This makes the navigation (next page of search results) and changing the number of results to display also not function (also 404 in url).
So it puts either a random category in the url or it comes up with something like this when searching on "bord": /webshop/search/404?keyword=bord&limitstart=0&option=com_virtuemart&view=category&virtuemart_category_id=0

Any ideas on how to fix this?
I tried manually changing the url to /webshop/search/bord (thus, immediately followed by the keyword), which fixes all the issues, however, I don't know where to change this.

Kind regards,
Patrick

PRO

are you using a 3rd party sef component?


shoud be

webshop/search?keyword=bord&x=0&y=0&limitstart=0&option=com_virtuemart&view=category&virtuemart_category_id=0

pvlooy

Thanks for your response. But no, I'm not using a 3rd party component for SEF urls.

GJC Web Design

have u got a menu, hidden or otherwise set to the vm cat view and virtuemart_category_id=0 ?

you could try that and call it search for example.. the search should pick up the menu and use it
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

pvlooy

#4
Unfortunately, I have not been able to find a fix yet. Any suggestions ?
When searching my url becomes: /webshop/search/404?keyword=stift&limitstart=0&option=com_virtuemart&view=category&virtuemart_category_id=0

So in essence, I only need the 404 part out. Sometimes this is 404, another time (it seems) it is just a random category name. When I remove this part manually, everything works just fine.

GJC Web Design

have u made a menu to the VM search?

or just manually change the action url in the form

also - why does it matter?  if it works...
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

pvlooy

I have been trying to change the action URL, but do you know where to find the piece of code I need to delete? I have not been able to locate it yet...

GJC Web Design

???

the search form is in the module and on the category template page
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

pvlooy

Yes, I know that. But I mean the piece of code I need to delete... I do not see what causes the 404 or random category...

GJC Web Design

it is a jroute 'd url...  the router forms this

you can stick a static url in there if u want
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

pvlooy

Okay, I changed the Jroute URL to /webshop/search?keyword=.$output.&limitstart=0&option=com_virtuemart&view=category&virtuemart_category_id=0
Now it works fine. Thanks!

GJC Web Design

or u can make a menu to the search (hidden or otherwise) then add the itemid to the end of that url .. then it should route
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation