Tagger icon indicating copy to clipboard operation
Tagger copied to clipboard

Redirect issues after updating MODX to 272

Open sdrenth opened this issue 6 years ago • 0 comments

After updating MODX to the latest version (2.7.2-pl) I've found that the taggergateway class keeps redirecting my taggergroup page, for example: domain.ext/tag-test/my-tag-alias.

This is because the code checks if the latest array value is not an empty string, then it will redirect. But because that always has a value it will also always keep redirecting the page:

if ($this->pieces[count($this->pieces) - 1] != '') {
    $this->modx->sendRedirect(MODX_SITE_URL . implode('/', $this->pieces) . '/', array('responseCode' => $_SERVER['SERVER_PROTOCOL'] . ' 301 Moved Permanently'));
}	

sdrenth avatar Jan 07 '20 10:01 sdrenth