cancel
Showing results for 
Search instead for 
Did you mean: 

Advanced search on home page results all 404

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

Advanced search on home page results all 404

Hi,

On Magento 2.3 I have added 

 

{{block class="Magento\CatalogSearch\Block\Advanced\Form" template="Magento_CatalogSearch::advanced/form.phtml"}}

 

to my cms homepage but all results are 404, if i use the advanced search in the footer it works fine.  Im very new to this so i apologize if it is something simple.

Thanks 
Colin

 

3 REPLIES 3

Re: Advanced search on home page results all 404

Hello @colinpuk 

 

So you want to show search box on the CMS page ? that's what you are trying to achieve ? and your page is not opening and redirecting on the 404 page ?

 

What if you are not adding this text and open CMS page at that time it is working ?

if issue solved,Click Kudos & Accept as Solution

Re: Advanced search on home page results all 404

Inspect the DOM and check the Search form action URL. Possibly it is going to a invalid page.

 

The class responsible for Advanced Search Block is 

vendor/magento/module-catalog-search/Block/Advanced/Form.php
/**
     * Retrieve search form action url
     *
     * @return string
     */
    public function getSearchPostUrl()
    {
        return $this->getUrl('*/*/result');
    }

Block PHTML file 

vendor/magento/module-catalog-search/view/frontend/templates/advanced/form.phtml
Suman Kar(suman.jis@gmail.com) Magento Certified Developer Plus Skype: sumanphptech Problem solved? Please give 'Kudos' and accept 'Answer as Solution'.

Re: Advanced search on home page results all 404

can you teach me how to configure it?


@Suman Kar wrote:

Inspect the DOM and check the Search form action URL. Possibly it is going to a invalid page.

 

The class responsible for Advanced Search Block is 

vendor/magento/module-catalog-search/Block/Advanced/Form.php
/**
     * Retrieve search form action url
     *
     * @return string
     */
    public function getSearchPostUrl()
    {
        return $this->getUrl('*/*/result');
    }

Block PHTML file 

vendor/magento/module-catalog-search/view/frontend/templates/advanced/form.phtml