Bug #1810
reklama in development env
50%
Description
I tried to test this plugin (as others like google ads, project sidebar, ... ) in redmine 1.2.0 development environemnt
I get this error:
ArgumentError in AdvertisementsController#new
A copy of ApplicationController has been removed from the module tree but is still active!
-- follow trace details, see attached file
I got a similar error also for other plugins, so I decided to not test them in production env
Suggestions are welcome
History
#1 Updated by Andriy Lesyuk over 13 years ago
- Status changed from New to Open
#2 Updated by Andriy Lesyuk over 13 years ago
Accordingly to Google this should only happen in dev env...
#3 Updated by Andriy Lesyuk over 13 years ago
#4 Updated by Andriy Lesyuk over 13 years ago
- Status changed from Open to In Progress
- Assignee set to Andriy Lesyuk
- % Done changed from 0 to 50
Tested the plugin under Redmine 1.2.x (current stable)... Works fine!
The bug in development environment is not the plugin’s bug but Rails’.
Going to close this issue unless you provide another info... Thanks!
#5 Updated by Pierluigi Soana over 13 years ago
I tried, but the development env give the usual error
What can be done with Ruby ?
#6 Updated by Andriy Lesyuk over 13 years ago
I guess you use Rails 2.3.3?.. I so you can update it.
You can also apply patch
You can also try adding unloadable
into app/models/advertisement.rb
:
class Advertisement < ActiveRecord::Base
unloadable # <--------------------
belongs_to :author, :class_name => 'User', :foreign_key => :author_id
belongs_to :project, :class_name => 'Project', :foreign_key => :not_for
has_many :keywords, :dependent => :delete_all
And into app/models/keyword.rb
:
class Keyword < ActiveRecord::Base
unloadable # <--------------------
belongs_to :advertisement, :class_name => 'Advertisement', :foreign_key => :advertisement_id
#7 Updated by Pierluigi Soana over 13 years ago
We use rails 2.3.5
#8 Updated by Andriy Lesyuk over 13 years ago
Could you please try adding unloadable
?
#9 Updated by Pierluigi Soana over 13 years ago
I tried just now, patch included, but nothing changed
#10 Updated by Pierluigi Soana over 13 years ago
I tried very quickly in production env, and it works (and it works well: you made a very good job).
My main observation is that the tool will be more helpful if a advertisement could be global or enabled on a per-project base: instead of non-enabling a single project, it’d better to mark all allowed projects
(or all projects)
This comes from the way we are using redmine, where different work groups work in different project spaces, with some people accessing only public spaces: not all could be interested into all advertisement.
#11 Updated by Andriy Lesyuk over 13 years ago
Thanks! I greatly appreciate your feedback!
I thought about the change in projects “visibility”... Perhaps will do this in next version!
#12 Updated by Andriy Lesyuk over 13 years ago
- Due date set to 09 Sep 2011
- Status changed from In Progress to Won't Fix
So I close this issue.
Created an issue for project configuration: #1843. Feel free to comment. Thanks.