Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a note about plugin assets not working without url rewrite #1113

Closed
wants to merge 10 commits into from
12 changes: 10 additions & 2 deletions app/Config/core.php
Expand Up @@ -92,7 +92,15 @@
* /app/.htaccess * /app/.htaccess
* /app/webroot/.htaccess * /app/webroot/.htaccess
* *
* And uncomment the App.baseUrl below: * And uncomment the App.baseUrl below. But keep in mind
* that plugin assets such as images, CSS and Javascript files
* will not work without url rewriting!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably also add the solution. i.e. you should either copy or symlink the plugin assets into webroot

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about this addition?

To work around this issue you should either symlink or copy the plugin assets into you app's webroot directory. This is recommended even when you are using mod_rewrite. Handling static assets through the Dispatcher is incredibly inefficient and included primarily as a development convenience - and thus not recommended for production applications.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Please squash your commits after making this change.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be squashed now. Fixed also my typos. Thanks

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No the commits are not squashed. Your pull request now has 8 commits and expected is just 1 😄

* To work around this issue you should either symlink or copy
* the plugin assets into you app's webroot directory. This is
* recommended even when you are using mod_rewrite. Handling static
* assets through the Dispatcher is incredibly inefficient and
* included primarily as a development convenience - and
* thus not recommended for production applications.
*/ */
//Configure::write('App.baseUrl', env('SCRIPT_NAME')); //Configure::write('App.baseUrl', env('SCRIPT_NAME'));


Expand Down Expand Up @@ -246,7 +254,7 @@
* *
* Note: 'default' and other application caches should be configured in app/Config/bootstrap.php. * Note: 'default' and other application caches should be configured in app/Config/bootstrap.php.
* Please check the comments in boostrap.php for more info on the cache engines available * Please check the comments in boostrap.php for more info on the cache engines available
* and their setttings. * and their settings.
*/ */
$engine = 'File'; $engine = 'File';


Expand Down
12 changes: 10 additions & 2 deletions lib/Cake/Console/Templates/skel/Config/core.php
Expand Up @@ -92,7 +92,15 @@
* /app/.htaccess * /app/.htaccess
* /app/webroot/.htaccess * /app/webroot/.htaccess
* *
* And uncomment the App.baseUrl below: * And uncomment the App.baseUrl below. But keep in mind
* that plugin assets such as images, CSS and Javascript files
* will not work without url rewriting!
* To work around this issue you should either symlink or copy
* the plugin assets into you app's webroot directory. This is
* recommended even when you are using mod_rewrite. Handling static
* assets through the Dispatcher is incredibly inefficient and
* included primarily as a development convenience - and
* thus not recommended for production applications.
*/ */
//Configure::write('App.baseUrl', env('SCRIPT_NAME')); //Configure::write('App.baseUrl', env('SCRIPT_NAME'));


Expand Down Expand Up @@ -307,7 +315,7 @@
* *
* Note: 'default' and other application caches should be configured in app/Config/bootstrap.php. * Note: 'default' and other application caches should be configured in app/Config/bootstrap.php.
* Please check the comments in boostrap.php for more info on the cache engines available * Please check the comments in boostrap.php for more info on the cache engines available
* and their setttings. * and their settings.
*/ */
$engine = 'File'; $engine = 'File';


Expand Down