#6419: When using caching componets performing redirects fail - fix provided -----------------------------------------------+---------------------------- Reporter: nickfoster | Type: Bug Status: new | Priority: Medium Milestone: 1.2.x.x | Component: Cache Version: 1.2 Final | Severity: Normal Keywords: cache, redirect, command order | Php_version: PHP 5 Cake_version: 1.2.0.7962 | -----------------------------------------------+---------------------------- We have been developing an internal application and have discovered what we believe is a bug in the order of the commands output into cached controllers by the cache helper.
[[BR]] This bug seems to be present when running an application that isn't located in the root of the website ie. http://www.example.com/blah/<app> [[BR]] We have developed a custom plugin (using a component) for authenticating against the IBM Intranet authentication mechanism, when not authenticated or logging out it redirects to the login page. This works fine without controller caching however when controller caching is switched on it redirects to the root ( ie. http://www.example.com/ ) of the website rather than to the /blah/ portion of the website ( ie. http://www.example.com/blah/ ). [[BR]] The issue seems to be the order that the commands are placed in to the cache php file by the cache Helper - cake/libs/view/helpers/cache.php. By moving the "Router::setRequestInfo" line (278) to line (268), above the "if ($useCallbacks == true) {" line the problem is resolved. [[BR]] We imagine that some of the parameters required for the redirect() to work within the authentication plugin were not being set correctly before this change was made. [[BR]] Hopefully this bug report allows you to fix the source and include the fix in the next release of cakephp. -- Ticket URL: <https://trac.cakephp.org/ticket/6419> CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/> Cake is a rapid development framework for PHP which uses commonly known design patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "tickets cakephp" group. To post to this group, send email to tickets-cakephp@googlegroups.com To unsubscribe from this group, send email to tickets-cakephp+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/tickets-cakephp?hl=en -~----------~----~----~----~------~----~------~--~---