Content
View differences
Updated by Martin Linkhorst over 12 years ago
The news preview functionality is not working.
**Expected behavior**
- a click on “Preview” should show a preview of the news entry
**Actual behavior**
- Nothing happens
**Reproduction**
1. Go to a project
2. Click on News / Add News
3. Enter some content for all fields
4. Click on the link that says “Preview”
**Solution Propositions**
- Console output suggests that the correct route is missing
<!-- end list -->
Started PUT "/projects/seeded_project/news/preview" for 127.0.0.1 at 2013-12-18 16:36:53 +0100
RailsDevTweaks: Skipping ActionDispatch::Reloader hooks for this request.
ActionController::RoutingError (No route matches [PUT] "/projects/seeded_project/news/preview"):
- PreviewsController\#create expects the method to be POST but the Preview link generates PUT requests. This change to PUT was made here: https://github.com/opf/openproject/commit/bba42a46516e101d73afa30cea876c54a5d5274b\#diff-a9c3bd311eab80c9ebe6a69830f9ad02L1402
**Expected behavior**
- a click on “Preview” should show a preview of the news entry
**Actual behavior**
- Nothing happens
**Reproduction**
1. Go to a project
2. Click on News / Add News
3. Enter some content for all fields
4. Click on the link that says “Preview”
**Solution Propositions**
- Console output suggests that the correct route is missing
<!-- end list -->
Started PUT "/projects/seeded_project/news/preview" for 127.0.0.1 at 2013-12-18 16:36:53 +0100
RailsDevTweaks: Skipping ActionDispatch::Reloader hooks for this request.
ActionController::RoutingError (No route matches [PUT] "/projects/seeded_project/news/preview"):
- PreviewsController\#create expects the method to be POST but the Preview link generates PUT requests. This change to PUT was made here: https://github.com/opf/openproject/commit/bba42a46516e101d73afa30cea876c54a5d5274b\#diff-a9c3bd311eab80c9ebe6a69830f9ad02L1402