Thursday, September 27, 2012

Re: Plugin assets not loading in production server

If you are using Cake 2.2.x, do you have this in your bootstrap.php?

Configure::write('Dispatcher.filters', array(      'AssetDispatcher',      'CacheDispatcher'  ));
See http://book.cakephp.org/2.0/en/appendices/2-2-migration-guide.html for more info...

On Thursday, September 27, 2012 12:48:05 PM UTC-7, Xoubaman wrote:
The app is working with no issue in the development server (Windows), but not loading the plugin assets in production server (Linux). I get a "controller not found" error in each one.

Some things I have out of a clean app or may be useful to know:

- Plugins can be placed in Plugin folder or Modules folder. I have App::build(array('Plugin' => array(APP.'Modules'.DS))); in bootstrap.
- Neither Plugin nor Module folder assets are being loaded (as an example, I can't access domain.com/debug_kit/css/debug_toolbar.css).
- Base webroot assets are loaded correctly.
- All app routes, included plugin ones, work fine (but look crappy without some css in the views).

Trying to solve it, I deployed a fresh Cake install, created a test plugin with just one css file in Plugin/Test/webroot/css and loaded all plugins in bootstrap. I can see the css content in the url www.mydomain.com/test/css/file.css. In my app i'm not doing anything weird, just load assets with the paht or plugin notation, neither working.

Any idea of what could be going on?

--
Like Us on FacekBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

No comments: