0

I have a strange error.

I created a new CMS page with url mtclp/20 and got an error page 404.

If I change url on just lps, it works. If I try with, for example, test/30, It also works. Other pages also works.

Magento does not like only the combination mtclp/20.

We do not have this url anywhere. I cleaned cash and tried to search by global search this combination in project.

  • Hi, have you looked in Marketing -> URL Rewrites if it's there at all? – Cold Fridge Jul 26 '18 at 8:19
  • Don't use / in cms page url. This is not recommended – Sukumar Gorai Jul 26 '18 at 8:20
  • Thank you for the answers. In URL Rewrites everything is all right. No this URL. I must use url, because it is an old project, and other CMS pages work correctly. I can just change URL, but this bug may occur elsewhere – Ola Jul 26 '18 at 8:26
  • I just created cms page url with lps/30 its working fine in magento 1.9.3.9 so might be you have any URL Rewrite there. – Ansar Husain Jul 26 '18 at 8:26
0

I found an answer. The problem is that in magento in cms url is impossible to use lp/ (in our configuration). Because:

in method _rewriteConfig(), path: app\code\core\Mage\Core\Model\Url\Rewrite\Request.php

Logger::log("from: ".$from, "Log");
Logger::log("to: ".$to, "Log");
Logger::log("pathInfo before: ".$this->_request->getPathInfo(), "Log");
$pathInfo = preg_replace($from, $to, $this->_request->getPathInfo());
Logger::log("pathInfo: ".$pathInfo, "Log");

If we look on the log file, we become:

  • from: /lp/(.*)/
  • to: lp/index/index/$1
  • pathInfo before: /mtclp/20
  • pathInfo: /mtclp/index/index/20

lp/ is replaced with lp/indx/index/$1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.