Closed phindmarsh closed 12 years ago
To clarify, this has worked in the past, and repositories that have the mirrors already configured continue to mirror their contents on push as expected.
Thanks for your help! :)
Actually, turns out its a Debian regression not a plugin issue.
Should probably Google before filing a bug report :)
Actually, I'm not completely capable of understanding the ticket, but it seems like the function has been removed or something?
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=629067
Is this still something that needs to be looked into?
Well, the problem seems to be a Redmine/ruby-on-rails problem, I believe, not necessarily a plugin problem. The failure happens on a "csrf_meta_tag", which is a ruby-on-rails tag to prevent cross-scripting attacks. Very weird. I'm not sure why html_safe is not working (or alternatively, why csrf_meta_tag is defined but fails).
Ok sweet, no problems. I'll see if there are any patches for it. Cheers!
Well, before you go away, there are a couple of weird things... (1) seems like Redmine doesn't use csrf_meta_tag for version 1.1, not sure why. Perhaps I need some sort of patch to avoid this problem... (2) on the flip side, csrf_meta_tag is clearly defined, otherwise the error would be different. Since this is a ruby-on-rails function, there must be something inconsistent with the debian release you have, but (3) I know of at least 1 person who has this plugin working with Redmine 1.1.
Can you tell me what versions of Rails you are using? (Or, better, simply do:
./script/about RAILS_ENV=production
I'm curious what version of ActionPack you are using.
Heres the output of that command:
/usr/share/redmine/lib/redmine/scm/adapters/git_adapter.rb:25: warning: already initialized constant GIT_BIN
/usr/share/redmine/vendor/plugins/redmine_git_hosting/lib/git_hosting/patches/git_adapter_patch.rb:27: warning: already initialized constant GIT_BIN
About your application's environment
Ruby version 1.8.7 (i486-linux)
RubyGems version 1.3.7
Rack version 1.1
Rails version 2.3.5
Active Record version 2.3.5
Active Resource version 2.3.5
Action Mailer version 2.3.5
Active Support version 2.3.5
Edge Rails revision unknown
Application root /usr/share/redmine
Environment development
Database adapter mysql
Database schema version 20120226013750
About your Redmine plugins
Redmine Time Tracker plugin 0.4
Redmine Git Hosting Plugin 0.4.4x
Its likely there is a misconfiguration, I don't know if I have all the dependencies satisfied correctly, the debian package is pretty old but I don't want to have to manage it manually (apt-get
is just too easy :))
Hm... Not sure I can help here -- except that I could try to figure out how to remove the cross-scripting protection when html_safe is undefined. However, it seems like a weird inconsistency. Perhaps this is a debian problem...?
Haven't you been using this plugin successfully in other configurations prior to this? Is it possible that I broke something with the 0.4.4x release? (seems unlikely, since I have never touched the popup.erb file).
Thinking about it I don't think I have ever tried with the instance we have on Debian now (previously Ubuntu). I'm almost certain its not a fault of the plugin given the googling I have done in the last few hours. I just jumped the gun with the bug report :)
Well -- interestingly enough, Redmine 1.1 doesn't seem to use the csrf_meta_tag (used in later versions), so perhaps this problem doesn't manifest normally for Redmine.... If it turns out that this is the best Debian release available, I can fix this particular problem.
Ok. I am assuming that this is the latest versions of Rails (including security patches) for the particular version of Debian you are using? If so, you are likely not the only person who will run into this problem.
Why don't you try pulling my testing branch. What I did was put in code to allow the csrf_meta_tag to fail gracefully if you have an installation with version skew in the Rails implementation (which seems to be what you are getting with Debian at the moment). See if it fixes things. If so, I'll make the commit.
Ok, I've pulled that down and now I get a different missing function!
'javascript_heads' on line 11 of prompt.erb
I don't know if I have the latest versions of rails etc installed, it's just whatever a default install using debian spits out. Is there something I can use to check the versions I am using to confirm for you? Sorry I'm not very up to speed with rails :)
Um.... I don't see any "prompt.erb" either in the plugin or redmine. Is this from some other plugin?
What was the full error message (as in what you started this thread with)?
Argh sorry! I was on my phone when I replied to that. Supposed to be popup.erb, full trace below:
Processing RepositoryMirrorsController#create (for 121.73.152.215 at 2012-04-09 17:12:09) [GET]
Parameters: {"project_id"=>"cognise", "action"=>"create", "controller"=>"repository_mirrors"}
Rendering template within layouts/popup
Rendering repository_mirrors/create
ActionView::TemplateError (undefined local variable or method `javascript_heads' for #<ActionView::Base:0xb5513f3c>) on line #11 of vendor/plugins/redmine_git_hosting/app/views/layouts/popup.erb:
8: <%= favicon %>
9: <%= stylesheet_link_tag 'application', :media => 'all' %>
10: <%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
11: <%= javascript_heads %>
12: <%= heads_for_theme %>
13: <!--[if IE 6]>
14: <style type="text/css">
Edit: clicked the wrong button, didn't mean to close it again. :S
Hm.... Ok. You have uncovered a slight flaw in my Redmine 1.1 support. Guess my previous Redmine 1.1 user missed the mirror support (as did I).
I'll fix this when I get a chance (probably later today).
Not a problem, this isn't a show-stopper for us really but if you have the time it would be great :)
thanks!
Ok. Kill off your current testing branch and re-pull testing...
(Easiest thing is to do a:
git reset --hard HEAD^
and pull the testing branch again).
Thats fixed it, I created a new mirror and pushed to it successfully. Problem solved, thanks!
Ok. Going to close this issue and push fix to master.
When trying to configure a repository mirror on the Settings > Repository page I get the following error:
I have Redmine 1.1.2.stable installed via apt-get on Debian 6.0.4 with 0.4.4x of the Redmine Git Hosting plugin (which I did a pull of just the other day).