Issue 794 in reviewboard: Can not add screenshot

2009-01-05 Thread codesite-noreply


Comment #1 on issue 794 by david.bl...@free.fr: Can not add screenshot
http://code.google.com/p/reviewboard/issues/detail?id=794

I forgot information : Repeated clicks on Upload button pile up This  
field is
required. messages after Path: fields.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
reviewboard-issues group.
To post to this group, send email to reviewboard-issues@googlegroups.com
To unsubscribe from this group, send email to 
reviewboard-issues+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard-issues?hl=en
-~--~~~~--~~--~--~---



Issue 796 in reviewboard: post-review tool doesn't create a review if reviewboard was installed on a url that is not root at '/', e.g. '/reviews'

2009-01-05 Thread codesite-noreply

Status: New
Owner: 
Labels: Type-Defect Priority-Medium

New issue 796 by butchland: post-review tool doesn't create a review if  
reviewboard was installed on a url that is not root at '/', e.g. '/reviews'
http://code.google.com/p/reviewboard/issues/detail?id=796

The post-review tool assumes that the reviewboard url is always at '/' e.g.
'http://reviews.example.com/'. If reviewboard was installed with a url like
'http://www.example.com/reviews/', the post-review tool cannot submit a new
  review.

What steps will reproduce the problem?

1. Install reviewboard on a url that is not at the root of the site:
In my case I installed it using the following modpython configuration:

 # Error handlers
 ErrorDocument 500 /errordocs/500.html

 # Serve django pages
 Location /reviewboard
 PythonPath ['/srv/reviewboard/conf'] + sys.path
 SetEnv DJANGO_SETTINGS_MODULE reviewboard.settings
 SetHandler mod_python
 PythonHandler django.core.handlers.modpython
 PythonAutoReload Off
 PythonDebug Off
 # Used to run multiple mod_python sites in the same apache
 PythonInterpreter reviewboard_reviewboard
 /Location

 # Serve static media without running it through mod_python
 # (overrides the above)
 Location /media
 SetHandler None
 /Location
 Location /errordocs
 SetHandler None
 /Location

 # Alias static media requests to filesystem
 Alias /media /srv/reviewboard/htdocs/media
 Alias /errordocs /srv/reviewboard/htdocs/errordocs

2. Complete the reviewboard installation and configuration (including
simplejson on the client)

3. Try to submit a review using post-review with option

 '--server=http://www.example.com/reviewboard'

where http://www.example.com/reviewboard is the url of your reviewboard  
site.

What is the expected output? What do you see instead?

It should have created a new draft review request. Instead it returns a 404
error message like the following:

'Unable to access http://www.example.com/api/json/repositories/ (404). The
host path may be invalid'


What operating system are you using? What browser?

This is on both Linux and windows. Browser is not relevant as I am using a
commandline tool.

Please provide any additional information below.

The error is due to the fact that its trying to look up
'http://www.example.com/api/json/repositories' when it
should be looking up
'http://www.example.com/reviewboard/api/json/repositories'

I created a fix for it and have submitted for review.


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
reviewboard-issues group.
To post to this group, send email to reviewboard-issues@googlegroups.com
To unsubscribe from this group, send email to 
reviewboard-issues+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard-issues?hl=en
-~--~~~~--~~--~--~---



Issue 794 in reviewboard: Can not add screenshot

2009-01-05 Thread codesite-noreply

Updates:
Status: NeedInfo

Comment #2 on issue 794 by chipx86: Can not add screenshot
http://code.google.com/p/reviewboard/issues/detail?id=794

On your installation, does the web server have write permissions to your  
site's
htdocs/media/uploaded tree? (recursively)

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
reviewboard-issues group.
To post to this group, send email to reviewboard-issues@googlegroups.com
To unsubscribe from this group, send email to 
reviewboard-issues+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard-issues?hl=en
-~--~~~~--~~--~--~---



Issue 794 in reviewboard: Can not add screenshot

2009-01-05 Thread codesite-noreply

Status: New
Owner: 
Labels: Type-Defect Priority-Medium

New issue 794 by david.bl...@free.fr: Can not add screenshot
http://code.google.com/p/reviewboard/issues/detail?id=794


What's the URL of the page containing the problem?

http://server/reviewboard/r/6/

What steps will reproduce the problem?

1. Click Add screenshot.
2. Click on the Caption: field to set focus and type test.
3. Click Path: field, a file browser opens.
4. Choose a picture file (png, jpg...). The filed contains the path to the
file.
5. Click Upload.

What is the expected output? What do you see instead?

Expected : well, file upload starts.
Obtained : Two error messages
1. Above the two fields: One or more fields had errors.
2. After Path: field : This field is required..

What operating system are you using? What browser?

Windows XP, FF 3.0.5 and Linux Kubuntu, FF 3.0.X. Same problem on both.


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
reviewboard-issues group.
To post to this group, send email to reviewboard-issues@googlegroups.com
To unsubscribe from this group, send email to 
reviewboard-issues+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard-issues?hl=en
-~--~~~~--~~--~--~---



Issue 794 in reviewboard: Can not add screenshot

2009-01-05 Thread codesite-noreply


Comment #5 on issue 794 by timw.at.work: Can not add screenshot
http://code.google.com/p/reviewboard/issues/detail?id=794

Note, this problem also prevents me from accessing Update Diff  
functionality, so it
seems to be consistent for all uses of formDlg (currently, only Update Diff  
and
Attach Screenshot).

The following very crude patch seems to work for me: if the  
previously-ignored
'upload' flag is set, this turns the AJAX call into a standard form post.  
The real
fix is probably to use a jQuery/YUI upload widget and/or implement iframe  
fun.

Note that form.submit was never being activated before my change (the  
existing code
trapped the submit button to do AJAX and returned false, blocking real form
submission), so I removed the 'submit' trap to allow my hack to work.

Index: htdocs/media/rb/js/common.js
===
--- htdocs/media/rb/js/common.js(revision 1666)
+++ htdocs/media/rb/js/common.js(working copy)
@@ -170,10 +170,8 @@

  var form = $(form/)
  .attr(action, options.action)
-.submit(function(e) {
-send();
-return false;
-})
+.attr(method, POST) // ignored for non-uploads
+.attr(enctype, multipart/form-data) // ignored for  
non-uploads
  .append($(table/)
  .append($(colgroup/)
  .append('col/')
@@ -235,8 +233,8 @@
  $('input type=button/')
  .val(options.confirmLabel)
  .click(function() {
-send();
-return false;
+if(console) console.log(submitting from box, this, this, self,  
self, form,
form);
+return send(form);
  })
  ]
  });
@@ -248,15 +246,26 @@
  /*
   * Sends the form data to the server.
   */
-function send() {
+function send(f) {
+if(console) console.log(in send, options);
+
+if( options.upload  f ) {
+var a = options.url || (SITE_ROOT + api/json +  
options.path);
+$(f).attr(action, a);
+if(console) console.log(submitting..., f);
+f.submit(); // ugly: this will redirect the user to a JSON  
reply
+return true;
+}
  rbApiCall({
  path: options.path,
  buttons: $(input, self.modalBox(buttons)),
  errorPrefix: Saving the form failed due to a server  
error:,
  success: function(rsp) {
+if(console) console.log(in send success, rsp);
  checkForErrors(rsp);
  }
  });
+return false;
  }

I'll also note that I was blocked from uploading some valid JPEG files, but  
that is
probably a separate issue (to be filed once images can be uploaded).

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
reviewboard-issues group.
To post to this group, send email to reviewboard-issues@googlegroups.com
To unsubscribe from this group, send email to 
reviewboard-issues+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard-issues?hl=en
-~--~~~~--~~--~--~---