VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: safire on September 10, 2018, 17:41:01 PM

Title: 404 when searching (VM 3.2.14) SOLVED
Post by: safire 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
Title: Re: 404 when searching (VM 3.2.14)
Post by: Studio 42 on September 11, 2018, 22:11:38 PM
DO you have set a link to the virtuemart root category or shop home ?
Title: Re: 404 when searching (VM 3.2.14)
Post by: safire on September 12, 2018, 21:56:27 PM
yes, these links are set. All was working fine until recently.
Title: Re: 404 when searching (VM 3.2.14)
Post by: Studio 42 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.
Title: Re: 404 when searching (VM 3.2.14)
Post by: safire 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.
Title: Re: 404 when searching (VM 3.2.14)
Post by: kishoreonwork 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
Title: Re: 404 when searching (VM 3.2.14)
Post by: safire on September 14, 2018, 01:59:02 AM
Changing to correct form post URL did the trick. Thank you!
Title: Re: 404 when searching (VM 3.2.14) SOLVED
Post by: olizan2 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)