Friday, September 28, 2012

Re: Plugin assets not loading in production server

So many hours wasted with this... the development version was 2.1 and the uploaded version 2.2.1.

Updating the bootstrap made it. At this point I think I will fully update to 2.2.

Thanks chronon.

El viernes, 28 de septiembre de 2012 01:58:36 UTC+2, chronon escribió:
If you are using Cake 2.2.x, do you have this in your bootstrap.php?

Configure::write('Dispatcher.filters', array(      'AssetDispatcher',      'CacheDispatcher'  ));

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: