Skip to main content
added 895 characters in body
Source Link
Gloweye
  • 133
  • 7

In once place, I have a /Vendor/Module/etc/routes.xml, showing:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="standard">
        <route id="categories" frontName="categories">
            <module name="Vendor_Module" />
        </route>
    </router>
</config>

which points to a valid (as far as I can see) controller. (Index/Index, to be precisely. )

In the database, table mg_url_rewrite, "categories" is pointed towards catalog/product/view/id/.

How can I figure out where a request for www.mysite.com/categories actually goes?

How can I figure outMy instinct says the routes.xml file, but an exact duplicate of that controller in another module shows an empty page, where .../categories actually shows the categories of the webshop. All the controller does is:

public function __construct(Context $context, PageFactory $resultPageFactory)
    {
        $this->resultPageFactory = $resultPageFactory;
        parent::__construct($context);
    }

public function execute()
    {
        $resultPage = $this->resultPageFactory->create();
        $resultPage->getConfig()->getTitle()->prepend(__('Categories'));
        return $resultPage;
    }

But the page doesn't even have a request fortitle, which the other www.mysite.com/categories(controller exact duplicate except from namespaces, and same for the routes.xml except ofcourse for the Vendor_Module, route id and frontname) module does.

However, if I manually enter the url provided by the actually goes?mg_url_rewrite table, I get a 404.

In once place, I have a /Vendor/Module/etc/routes.xml, showing:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="standard">
        <route id="categories" frontName="categories">
            <module name="Vendor_Module" />
        </route>
    </router>
</config>

which points to a valid (as far as I can see) controller. (Index/Index, to be precisely. )

In the database, table mg_url_rewrite, "categories" is pointed towards catalog/product/view/id/.

How can I figure out where a request for www.mysite.com/categories actually goes?

In once place, I have a /Vendor/Module/etc/routes.xml, showing:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="standard">
        <route id="categories" frontName="categories">
            <module name="Vendor_Module" />
        </route>
    </router>
</config>

which points to a valid (as far as I can see) controller. (Index/Index, to be precisely. )

In the database, table mg_url_rewrite, "categories" is pointed towards catalog/product/view/id/.

How can I figure out where a request for www.mysite.com/categories actually goes?

My instinct says the routes.xml file, but an exact duplicate of that controller in another module shows an empty page, where .../categories actually shows the categories of the webshop. All the controller does is:

public function __construct(Context $context, PageFactory $resultPageFactory)
    {
        $this->resultPageFactory = $resultPageFactory;
        parent::__construct($context);
    }

public function execute()
    {
        $resultPage = $this->resultPageFactory->create();
        $resultPage->getConfig()->getTitle()->prepend(__('Categories'));
        return $resultPage;
    }

But the page doesn't even have a title, which the other (controller exact duplicate except from namespaces, and same for the routes.xml except ofcourse for the Vendor_Module, route id and frontname) module does.

However, if I manually enter the url provided by the mg_url_rewrite table, I get a 404.

Source Link
Gloweye
  • 133
  • 7

How do I find out where a specific route goes?

In once place, I have a /Vendor/Module/etc/routes.xml, showing:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="standard">
        <route id="categories" frontName="categories">
            <module name="Vendor_Module" />
        </route>
    </router>
</config>

which points to a valid (as far as I can see) controller. (Index/Index, to be precisely. )

In the database, table mg_url_rewrite, "categories" is pointed towards catalog/product/view/id/.

How can I figure out where a request for www.mysite.com/categories actually goes?