Author Topic: 404 when searching (VM 3.2.14) SOLVED  (Read 1370 times)

safire

  • Beginner
  • *
  • Posts: 32
404 when searching (VM 3.2.14) SOLVED
« on: September 10, 2018, 17:41:01 pm »
Every search brings "Category not found" error and this added to URL: ?error=404

Only happening on this site, my other VM sites are fine:
https://www.vintagecoinconcepts.com

J 3.8.12, VM 3.2.14, PHP 7.0.22

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4381
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: 404 when searching (VM 3.2.14)
« Reply #1 on: September 11, 2018, 22:11:38 pm »
DO you have set a link to the virtuemart root category or shop home ?

safire

  • Beginner
  • *
  • Posts: 32
Re: 404 when searching (VM 3.2.14)
« Reply #2 on: September 12, 2018, 21:56:27 pm »
yes, these links are set. All was working fine until recently.

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4381
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: 404 when searching (VM 3.2.14)
« Reply #3 on: September 12, 2018, 22:27:41 pm »
You have component/virtuemart/ in the search link. Check the module setting if adding a item ID in the setting help to solve the problem.

safire

  • Beginner
  • *
  • Posts: 32
Re: 404 when searching (VM 3.2.14)
« Reply #4 on: September 13, 2018, 19:27:34 pm »
As suggested I added the itemID to module, but it didn't help.

I can provide you access to our development site. I am willing to pay for support.

kishoreonwork

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 63
  • Free Virtuemart Consulting For Non Profits
    • virtuemart expert
  • Skype Name: kishore2607
  • VirtueMart Version: 3
Re: 404 when searching (VM 3.2.14)
« Reply #5 on: September 13, 2018, 23:17:27 pm »
There is a problem with the module. The form action url set on the module is wrong.
Please see the attached image for the same. Some one has commented the  correct url  and placed  sef friendly url.

instead of those both the url you can also add 'index.php' for it.




Thanks
Kishore
I am available for paid joomla and virtuemart consulting.
http://www.kishoreweblabs.com/
skype kishore2607

safire

  • Beginner
  • *
  • Posts: 32
Re: 404 when searching (VM 3.2.14)
« Reply #6 on: September 14, 2018, 01:59:02 am »
Changing to correct form post URL did the trick. Thank you!

olizan2

  • Beginner
  • *
  • Posts: 10
  • A beginner
Re: 404 when searching (VM 3.2.14) SOLVED
« Reply #7 on: October 18, 2018, 15:03:45 pm »
Hello, i have the same problem but the module file seems to be good.
default.php

<?php // no direct access
defined('_JEXEC') or die('Restricted access'); ?>
<!--BEGIN Search Box -->
<form action="<?php echo JRoute::_('index.php?option=com_virtuemart&view=category&search=true&limitstart=0&virtuemart_category_id='.$category_id ); ?>" method="get">
<div class="search<?php echo $params->get('moduleclass_sfx'); ?>">
   <?php $output = '<input name="keyword" id="mod_virtuemart_search" maxlength="'.$maxlength.'" placeholder="'.$text.'" class="inputbox'.$moduleclass_sfx.'" type="text" size="'.$width.'" />';
 $image = JURI::base() . $imagepath;
...

Strange .... when i turn off SEF, it's working.
when i turn on, the error message is : 404 Not Found - nginx

When i place the "search" word in the url, its' working even if the sef is turn on :

domaine/component/virtuemart/?keyword=rouge&x=0&y=0&limitstart=0&option=com_virtuemart&view=category&virtuemart_category_id=0
should be :
domaine/component/virtuemart/search?keyword=rouge&x=0&y=0&limitstart=0&option=com_virtuemart&view=category&virtuemart_category_id=0


[SOLVED] The problem seems to be solved after i turn php to 7.1.23 and Application FastCGI (before : FPM)