Known Issues
When a CakePHP application being run through Drake sends a redirect(), user is taken out of Drupal
CakePHP redirects cannot be caught (simply because there’s no way to catch a header and discard it.) Drake takes care of the links automatically, but it cannot prevent your application from getting out of Drake by using redirect() from a controller. Therefore, if you want to make sure your CakePHP application stays on Drake, you will need to catch the calls to Controller::redirect(). To do so, you can overload the function redirect() at the AppController level.
Create the file app/app_controller.php in your CakePHP application main directory (if you already have one just add the code to your version), with the following contents:
function redirect($url, $status=null) {
if (defined('DRAKE'))
{
$drake =& Drake::getInstance();
$url = $drake->getUrl($url);
}
return parent::redirect($url, $status);
}
}
CakePHP’s built in AJAX/Javascript Events support doesn’t work properly with certain Drupal themes
Drupal uses the JQuery javascript library, while CakePHP’s built in AJAX support is achieved through the Prototype javascript library. While the two libraries don’t normally coexist, there’s no reason why they can’t. If you wish to avoid any problems between Drupal’s JQuery integrated Javascript library and CakePHP’s prototype, then you will need to update Drupal’s JQuery library to its latest version. After doing so, Drake will automatically prevent any collisions between the two.
To update your Drupal’s JQuery installation do the following:
- Go to JQuery’s website and click on Download jQuery (compressed).
- Save that file on your hard disk, and rename it to
jquery.js - Upload that file to your
misc/folder inside your Drupal’s main directory, overwriting the existing file.
Documentation
Navigate
Categories
Can't Miss
- SYPAD Developers CommunityQuality articles, tutorials and projects for developers.
- SYPAD Outsourcing MarketplaceGet your project done, or bid on projects.