Child pages
  • [cms] Incorrect links built from CLI with Mod-Rewrite disabled [5.3.0-B1]
Skip to end of metadata
Go to start of metadata

The "$this->Application->HREF" method needs to be used, when there is a need to build a link to any page on the website. Internally method uses $_SERVER['PHP_SELF'] for detecting PHP script used for accessing In-Portal. Here are example values of that variable depending on how In-Portal was accessed:

Accessed ViaValue of $_SERVER['PHP_SELF']
URL: /index.php/index.php
URL: /admin/index.php/admin/index.php
CLI PATH: /in-portal./in-portal

The detected PHP script is then placed in each URL for Mod-Rewrite is disabled and this is a problem, because form used from CLI then URL looks like this:

http://www.website.tld/./in-portal?env=-index%3Am------

Solution

Inside each CLI script (the "/in-portal" in above example) define the INDEX_FILE constant like below above everything else:

define('INDEX_FILE', 'index.php');

Related Tasks

INP-1517 - Getting issue details... STATUS