Forum associate/dissociate error when Chamilo is installed in a sub directory
Wrong url when associate or dissociate a forum to an item button is clicked:
To fix this: api_get_path(WEB_PATH) should be api_get_path(WEB_SERVER_ROOT_PATH) instead in:
Line 1333 : header('Location:' . api_get_path() . api_get_self() . '?' ...
Line 1375 : header('Location:' . api_get_path() . api_get_self() . '?' ...
Updated by Angel Quiroz almost 4 years ago
- Status changed from New to Needs more info
iban goenaga wrote:
Here is the pull request: https://github.com/chamilo/chamilo-lms/pull/976
I reviewed the changes and I can not reproduce the bug. I have an installation in a subdirectory and it works obtaining the correct path (like /PR977/main/newscorm/lp_controller.php) for the redirection after associate/dissociate a forum
In any case, in the PR you use the strstr function (to remove the last character of api_get_path(WEB_SERVER_ROOT_PATH)) but
strstr doesn't this, you should use