Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Minifier doesn't work with manager on different subdomain #9282
danya_postfactum created Redmine issue ID 9282
I have defined MODX_MANAGER_URL as '/' and moved manager to http://manager.site.com. It works with disabled minifier. When I enable it, I get 400 (Bad Request) error from manager/min/index.php . This is because of line 58:
$hasVirtualManagerURL = empty($min_documentRoot) || strpos(MODX_MANAGER_PATH, $min_documentRoot) !== 0 || strpos(MODX_MANAGER_PATH, MODX_MANAGER_URL) === false || substr(MODX_MANAGER_PATH, 0, strpos(MODX_MANAGER_PATH, MODX_MANAGER_URL)) !== $min_documentRoot;
This does not works with '/' MODX_MANAGER_URL. The solution is changing the second and the third strpos functions to strrpos. Same with MODX_ASSETS_URL, I suppose, since it can be placed on differend subdomain.