Defect #6650
closedMissing "Add News" button
0%
Description
Hi,
I'm running Redmine trunk version r4250. I just wanted to add a news entry to one of my projects, but there is no "Add News" button in the news section anymore. Where has it gone?
Cheers,
Claus
Related issues
Updated by Felix Schäfer about 14 years ago
See if #6513 solves this for you, I think it's the same issue.
Updated by Claus Nagel about 14 years ago
Felix Schäfer wrote:
See if #6513 solves this for you, I think it's the same issue.
I followed the suggested solution in #6513. However, an error message is thrown whenever the modified 'link_to_if_authorized' method is invoked:
Processing NewsController#index (for 130.149.168.182 at 2010-10-13 09:29:33) [GET] Parameters: {"project_id"=>"citygml4j", "action"=>"index", "controller"=>"news"} Rendering template within layouts/base Rendering news/index ActionView::TemplateError (undefined method `[]' for nil:NilClass) on line #2 of app/views/news/index.rhtml: 1: <div class="contextual"> 2: <%= link_to_if_authorized(l(:label_news_new), 3: new_project_news_path(@project), 4: :class => 'icon icon-add', 5: :onclick => 'Element.show("add-news"); Form.Element.focus("news_title"); return false;') if @project %> app/helpers/application_helper.rb:44:in `link_to_if_authorized' app/views/news/index.rhtml:2:in `_run_rhtml_app47views47news47index46rhtml' passenger (2.2.15) lib/phusion_passenger/rack/request_handler.rb:92:in `process_request' passenger (2.2.15) lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop' passenger (2.2.15) lib/phusion_passenger/railz/application_spawner.rb:441:in `start_request_handler' passenger (2.2.15) lib/phusion_passenger/railz/application_spawner.rb:381:in `handle_spawn_application' passenger (2.2.15) lib/phusion_passenger/utils.rb:252:in `safe_fork' passenger (2.2.15) lib/phusion_passenger/railz/application_spawner.rb:377:in `handle_spawn_application' passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:352:in `__send__' passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:352:in `main_loop' passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously' passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:163:in `start' passenger (2.2.15) lib/phusion_passenger/railz/application_spawner.rb:222:in `start' passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:253:in `spawn_rails_application' passenger (2.2.15) lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add' passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:247:in `spawn_rails_application' passenger (2.2.15) lib/phusion_passenger/abstract_server_collection.rb:80:in `synchronize' passenger (2.2.15) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize' passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:246:in `spawn_rails_application' passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:145:in `spawn_application' passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:278:in `handle_spawn_application' passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:352:in `__send__' passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:352:in `main_loop' passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously' Rendering /usr/local/redmine-trunk/public/500.html (500 Internal Server Error)
Updated by Felix Schäfer about 14 years ago
Mmh, do you serve redmine on a sub-URI? If yes, have you set the configuration accordingly?
Updated by Felix Schäfer about 14 years ago
Oh, and what server, what rack/rails/ruby versions, and so on ;-)
Updated by Claus Nagel about 14 years ago
I am running redmine on a RedHat EL5 Server with the following packages being installed:
- Ruby 1.8.7
- Rails 2.3.5
- Rack 1.0.1
- Passenger 2.2.15
- Apache 2.2.3
- MySQL 5.0.77
Redmine is indeed being served on a sub-URI. I configured passenger accordingly (following the guide on http://www.modrails.com/documentation/Users%20guide.html#deploying_rails_to_sub_uri which is also referenced from the redmine wiki). In fact, there are two redmine installations being served on two different sub-URIs.
For testing purposes, I additionally added a 'Redmine::Utils::relative_url_root = "/xyz"' to my config/environment.rb. But I am still running into the above mentioned error message.
Adding news (in exactly this environment) was possible 6 months ago... Of course there have been notable changes in trunk since then.
Any ideas are welcome.
Cheers,
Claus
Updated by Felix Schäfer about 14 years ago
Claus Nagel wrote:
For testing purposes, I additionally added a 'Redmine::Utils::relative_url_root = "/xyz"' to my config/environment.rb. But I am still running into the above mentioned error message.
Just to make sure: you did restart your redmine each time after applying the patch and adding config and all?
Updated by Claus Nagel about 14 years ago
Felix, in the meantime I switched back to branches/stable-1.0. Without changing anything else, the "Add News" button is available again.
The same is true for the "Add new file" button (see issue #6627). "Move" and "Copy" buttons (see issue #6513) are only available after applying the patch for #6513. So this patch works fine for branches/stable-1.0 but not for trunk.
Do you know whether I will run into troubles because the database layout for trunk and branches/stable-1.0 is different? Can a 'RAILS_ENV=production rake db:migrate' be used to downgrade? I am not familiar with ruby and rails, so any feedback is appreciated.
Cheers,
Claus
Updated by Felix Schäfer about 14 years ago
Claus Nagel wrote:
Felix, in the meantime I switched back to branches/stable-1.0. Without changing anything else, the "Add News" button is available again.
The same is true for the "Add new file" button (see issue #6627). "Move" and "Copy" buttons (see issue #6513) are only available after applying the patch for #6513. So this patch works fine for branches/stable-1.0 but not for trunk.
Odd, as IIRC I supplied it for trunk…
Do you know whether I will run into troubles because the database layout for trunk and branches/stable-1.0 is different? Can a 'RAILS_ENV=production rake db:migrate' be used to downgrade? I am not familiar with ruby and rails, so any feedback is appreciated.
There's a "down" migration (look it up from rake -D
), though you'd need to apply it before downgrading the code (the down migrations are defined alongside the "up" migrations). The only migration I know that might cause trouble (it has no down) is the one changing stuff in the email notification options.
Updated by John Neumann about 14 years ago
I'm having this same issue and it occurs on files as well. How can I go about downgrading so that I can have these features?
Updated by John Neumann about 14 years ago
John Neumann wrote:
I'm having this same issue and it occurs on files as well. How can I go about downgrading so that I can have these features?
Nevermind. I just used svn switch http://redmine.rubyforge.org/svn/tags/1.0.2/ and it worked fine.
Updated by Jean-Philippe Lang about 14 years ago
- Status changed from New to Closed
- Resolution set to Fixed
Fixed in r4267.