Project

General

Profile

Actions

Feature #3816

closed

Allow pasting screenshots from clipboard

Added by Alex Last over 15 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Attachments
Target version:
Start date:
2009-09-03
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

Jira has one terrific feature, which is VERY convenient.
when I edit a bug report, I can click "paste" button and the screenshot currently in system copy/paste buffer will be copied to the Jira web-form.
could you guys please implement the same for redmine? I really appreciate this. this would save time when editing bug reports.


Files

redmine_screenshot_paste.zip (32.8 KB) redmine_screenshot_paste.zip Jean-Philippe Lang, 2009-11-28 17:55
simageuploadapplet.jar (52.6 KB) simageuploadapplet.jar Andrew Chaika, 2009-11-29 12:12
redmine_screenshot_paste-2.zip (34.9 KB) redmine_screenshot_paste-2.zip Jean-Philippe Lang, 2009-11-29 22:20
_screenshot.rhtml (1.82 KB) _screenshot.rhtml redmine_screenshot_paste on demand Jack Kurzecki, 2010-01-11 11:49
_screenshot.rhtml (1.83 KB) _screenshot.rhtml redmine_screenshot_paste on demand for version 1.1.0 Jack Kurzecki, 2010-03-05 10:48
redmine_attach_screenshot_v.0.0.3.zip (17 KB) redmine_attach_screenshot_v.0.0.3.zip Victor Dulepov, 2010-05-07 12:16
redmine_attach_screenshot-0.1.0.zip (17.6 KB) redmine_attach_screenshot-0.1.0.zip Victor Dulepov, 2011-02-18 12:59
cs.yml (365 Bytes) cs.yml Czech translation for redmine_attach_screenshot plugin Jaromir Dvoracek, 2011-03-27 01:53
CP.JPG (22.4 KB) CP.JPG How the Skype realize paste an image into textarea Il'ya Shakitko, 2011-04-01 16:39
zh.yml (352 Bytes) zh.yml 功磊 马, 2011-04-08 05:07
nl.yml (350 Bytes) nl.yml Ruben Kruiswijk, 2011-04-08 13:10
ko.yml (521 Bytes) ko.yml Korean language file Ki Won Kim, 2011-05-25 04:06
fr.yml (367 Bytes) fr.yml French translation (UTF8 No bom) Manu Dragon, 2011-06-09 11:29
未命名.PNG (43.9 KB) 未命名.PNG IE Problem:can not see the button? Steven Wong, 2011-07-13 11:40
redmine_attach_screenshot.zip (18.5 KB) redmine_attach_screenshot.zip Complete plugin with overflow bug fix Renzo Meister, 2012-01-23 10:24
_form.rhtml (4.98 KB) _form.rhtml William Roush, 2012-02-09 16:47
interferes.png (34.3 KB) interferes.png Redmine 1.3.3 and redmine_attach_screenshot interfere Marco Descher, 2012-04-27 08:57
noInterferes.png (30.6 KB) noInterferes.png Redmine 1.3.3 without redmine_attach_screenshot works Marco Descher, 2012-04-27 08:57
error.PNG (7.37 KB) error.PNG Angeline Lee, 2012-06-13 08:39
attach_clipboard_image.patch (1.06 KB) attach_clipboard_image.patch Takenori TAKAKI, 2019-02-14 12:22
pasted-image@2x.png (30.5 KB) pasted-image@2x.png Go MAEDA, 2019-02-14 14:22
attach_clipboard_image_short_file_name.patch (1.29 KB) attach_clipboard_image_short_file_name.patch Takenori TAKAKI, 2019-02-16 02:05
pasted-image-shor-file-name@2x.png (95.7 KB) pasted-image-shor-file-name@2x.png Takenori TAKAKI, 2019-02-16 02:05
attach_clipboard_images_v2.patch (1.39 KB) attach_clipboard_images_v2.patch Marius BĂLTEANU, 2019-02-17 15:20

Related issues

Related to Redmine - Feature #23579: Screenshot ButtonClosed

Actions
Related to Redmine - Patch #31169: Wiki syntax help for document image pasting and drag/drop embeddingClosedGo MAEDA

Actions
Related to Redmine - Defect #32469: Text copied from some applications such as MS Office and LibreOffice is pasted as an image in addition to plain textClosedGo MAEDA

Actions
Related to Redmine - Patch #32596: fix image pasting for EdgeClosedGo MAEDA

Actions
Has duplicate Redmine - Feature #331: Allow to insert a screen shot easilyClosed

Actions
Actions #1

Updated by Stuart Mathews about 15 years ago

I think that you are absolutly right Alexey, I run a team where we get bugs each day and we are always coming short when it comes to having good descriptions of the bugs - especially if they are on a specific screen or page - we need a way to copy/past screenshots!

Anyone else with me on this?

Actions #2

Updated by Kamil . about 15 years ago

+1

Actions #3

Updated by James Bernard about 15 years ago

+1

This would be awesome.
I run a team where we like using screenshots for better understanding between us and the current way for doing that in Redmine is too heavy.

Actions #4

Updated by Jean-Philippe Lang about 15 years ago

Here is a quickly written plugin that let users paste one screenshot on the issue form.
The screenshot is saved as a png file (screenshot.png) attached to the issue.

It uses an applet from http://www.redmountainsw.com/wordpress/archives/applet-for-submitting-screenshot.

Tested with Firefox 3 (OK), Safari 3 (OK), IE6 (doesn't seem to work).

Requires latest trunk (tested with r3106). Just unzip in vendor/plugins and restart.
Feedback is welcome.

Actions #6

Updated by Andrew Chaika about 15 years ago

Jean-Philippe Lang wrote:

Here is a quickly written plugin that let users paste one screenshot on the issue form.
...
Feedback is welcome.

I have tested this plugin on IE8 and Chrome 3, it works well. But one remark - attachment name is always 'screenshot.png', when I add a second screenshot (in comment) I get 2 attachments with same names. It will be better to use unique names, for example 'screenshot_<num>.png'. And maybe plugin could automatically add to issue description/comment body.
A drag and drop functionality when uploading existing images or documents will be useful too and this can be done with java applet too.

Actions #7

Updated by Andrew Chaika about 15 years ago

I have modified (s)imageuploadapplet, now it support drag and drop, paste on click, and can paste clipboard content by javascript command (you can call "imageuploadapplet.getImageFromClipboad();" when showing div with applet and if screenshot already exist in clipboard it will be pasted - one click saved :)).

Actions #8

Updated by Jean-Philippe Lang about 15 years ago

Nice work!

Here is a new version of the plugin that includes your modified applet.
Clipboard is pasted when showing the applet, and name+description can now be entered.

Actions #9

Updated by Alex Last almost 15 years ago

is it possible to integrate this feature into standard Redmine build?

Actions #10

Updated by Jack Kurzecki almost 15 years ago

If you are serving Redmine in SubURI, this plugin won't load.

The fix is to change line 3 of "path/to/redmine/vendor/plugins/redmine_screenshot_paste/app/views/issues/_screenshot.rhtml" to:

<applet archive="<%= Redmine::Utils.relative_url_root %>/plugin_assets/redmine_screenshot_paste/simageuploadapplet.jar" 

(This assumes you added prefix to "path/to/redmine/config/environment.rb" as per HowTo_Install_Redmine_in_a_sub-URI)

This is a great plugin. Thanks Jean-Philippe and Andrew for making this available.

Actions #11

Updated by Jack Kurzecki almost 15 years ago

The attached file is a modification to load the Java applet on demand rather than every time a new issue page is opened, which was giving a warning about unverified digital signature.

It also checks for Redmine::Utils.relative_url_root and availability of Java.

Actions #12

Updated by Amil Waduwawara almost 15 years ago

I'm running Redmine v0.9.0 RC and installed the plug-in (just unzipped redmine_screenshot_paste-2.zip)

Restarting Redmine gives "Drag or paste from clipboard" link upon pressing update button and applet gets the clipboard content pasted. But nothing special happens when pressing Submit button after entering "Name" and "Description".

I suspect ... "uploaded_screenshot"=>{"name"=>"screenshot", "content"=>"", "description"=>"error page"}, ... from below log extract. Do you see any clue?

Rest of the Redmine stuff works fine.

Log extract:

Processing IssuesController#edit (for www.xxx.yyy.zzz at 2010-01-28 17:09:47) [POST]
  Parameters: {"time_entry"=>{"comments"=>"", 
                              "activity_id"=>"", 
                              "hours"=>""}, 
               "commit"=>"Submit", 
               "notes"=>"", 
               "action"=>"edit", 
               "authenticity_token"=>"lSC6zELEOP8qIg5fw/y+oAjlmsM2BhJNkmB6JquyEks=", 
               "id"=>"1478", 
               "issue"=>{"start_date"=>"", 
                         "estimated_hours"=>"", 
                         "priority_id"=>"4", 
                         "lock_version"=>"2", 
                         "fixed_version_id"=>"33", 
                         "done_ratio"=>"0", 
                         "assigned_to_id"=>"3", 
                         "subject"=>"Redmine improvements", 
                         "tracker_id"=>"4", 
                         "due_date"=>"", 
                         "status_id"=>"1", 
                         "description"=>"This tracks improvements to Redmine"}, 
               "controller"=>"issues", 
               "uploaded_screenshot"=>{"name"=>"screenshot", 
                                       "content"=>"", 
                                       "description"=>"error page"}, 
               "attachments"=>{"1"=>{"description"=>""}}}
Redirected to http://mysite/issues/1478
Completed in 157ms (DB: 85) | 302 Found [http://mysite/issues/1478/edit]

Actions #13

Updated by Evgeny Mukhin almost 15 years ago

I'm using BitNami virtual machine image. I unzipped the plugin to redmine/vendor/plugins/ folder, changed "_screenshot.rhtml" as described above and added line 'Redmine::Utils::relative_url_root = "/redmine"' to the bottom of "redmine/config/environment.rb"

I get next error:

load: class imageuploadapplet.Main not found.
java.lang.ClassNotFoundException: imageuploadapplet.Main
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://192.168.111.129/redmine/projects/thepacker/issues/imageuploadapplet/Main.class
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: imageuploadapplet.Main
load: class imageuploadapplet.Main not found.
java.lang.ClassNotFoundException: imageuploadapplet.Main
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://192.168.111.129/redmine/projects/thepacker/issues/imageuploadapplet/Main.class
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: imageuploadapplet.Main
load: class imageuploadapplet.Main not found.
java.lang.ClassNotFoundException: imageuploadapplet.Main
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://192.168.111.129/redmine/projects/thepacker/issues/imageuploadapplet/Main.class
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: imageuploadapplet.Main
load: class imageuploadapplet.Main not found.
java.lang.ClassNotFoundException: imageuploadapplet.Main
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://192.168.111.129/redmine/projects/thepacker/issues/imageuploadapplet/Main.class
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: imageuploadapplet.Main
load: class imageuploadapplet.Main not found.
java.lang.ClassNotFoundException: imageuploadapplet.Main
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://192.168.111.129/redmine/projects/thepacker/issues/imageuploadapplet/Main.class
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: imageuploadapplet.Main

Actions #14

Updated by Jack Kurzecki almost 15 years ago

Evgeny Mukhin wrote:

I'm using BitNami virtual machine image. I unzipped the plugin to redmine/vendor/plugins/ folder, changed "_screenshot.rhtml" as described above and added line 'Redmine::Utils::relative_url_root = "/redmine"' to the bottom of "redmine/config/environment.rb"

I get next error:

load: class imageuploadapplet.Main not found.
java.lang.ClassNotFoundException: imageuploadapplet.Main
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://192.168.111.129/redmine/projects/thepacker/issues/imageuploadapplet/Main.class
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more

This is the error I was getting when the .jar file was not found before I updated _screenshot.rhtml

I'm not sure about the BitNami stack, but you do not need to modify redmine/config/environment.rb if you are serving Redmine in something like http://redmine.yourhost.com
This is only required if you are serving Redmine in something like http://yourhost.com/redmine (as I am) and it must match your path.

Actions #15

Updated by Evgeny Mukhin almost 15 years ago

Jack Kurzecki wrote:

This is the error I was getting when the .jar file was not found before I updated _screenshot.rhtml

I'm not sure about the BitNami stack, but you do not need to modify redmine/config/environment.rb if you are serving Redmine in something like http://redmine.yourhost.com
This is only required if you are serving Redmine in something like http://yourhost.com/redmine (as I am) and it must match your path.

As like you I access Redmine by http://192.168.111.129/redmine/ so i guess i have to modify named file.
Interesting part of this file looks like
<applet archive="<%= Redmine::Utils.relative_url_root %>/plugin_assets/redmine_screenshot_paste/simageuploadapplet.jar"'

I found simageuploadapplet.jar file there: redmine/public/plugin_assets/redmine_screenshot_paste/simageuploadapplet.jar

I dont have a foggest idea why it is trying to find Main.class in the path http://192.168.111.129/redmine/projects/thepacker/issues/imageuploadapplet/
there's no such path in the project.

Actions #16

Updated by Jack Kurzecki almost 15 years ago

  • Assignee set to Jean-Philippe Lang

After a recent update to "Redmine 0.9.3.devel.3525" this pluggin stopped working. I'm getting the same "nothing is happening" issue as note-12 above.


This is log after creating a new issue with screenshot added using this plugin:


Processing IssuesController#new (for 192.168.1.100 at 2010-03-04 17:46:07) [POST]
    Parameters: {
        "commit"=>"Create", 
        "project_id"=>"pr1", 
        "action"=>"new", 
        "authenticity_token"=>"gvY0GfE...CROPPED...=", 
        "issue"=>{
            "start_date"=>"2010-03-04", 
            "estimated_hours"=>"", 
            "priority_id"=>"4", 
            "done_ratio"=>"0", 
            "assigned_to_id"=>"3", 
            "subject"=>"test screenshot copy", 
            "category_id"=>"6", 
            "tracker_id"=>"3", 
            "due_date"=>"", 
            "status_id"=>"2", 
            "description"=>"test screenshot copy" 
        }, 
        "controller"=>"issues", 
        "attachments"=>{
            "1"=>{
                "description"=>"" 
            }
        }, 
        "uploaded_screenshot"=>{
            "name"=>"screenshot", 
            "content"=>"iVBORw0KG...CROPPED...", 
            "description"=>"" 
        }
    }
Sending email notification to: me@myhost
Redirected to http://myhost/redmine/issues/123
Completed in 109ms (DB: 61) | 302 Found [http://myhost/projects/pr1/issues/new]

Processing IssuesController#show (for 192.168.1.100 at 2010-03-04 17:46:08) [GET]
    Parameters: {
        "action"=>"show", 
        "id"=>"123", 
        "controller"=>"issues" 
    }
Rendering template within layouts/base
Rendering issues/show.rhtml
Completed in 172ms (View: 141, 
DB: 0) | 200 OK [http://myhost/issues/123]


This is after I try to update the issue with another screenshot (again the picture is showing on the form, but doesn't get stored):


Processing IssuesController#update (for 192.168.1.100 at 2010-03-04 17:46:28) [PUT]
    Parameters: {
        "time_entry"=>{
            "comments"=>"", 
            "activity_id"=>"10", 
            "hours"=>"" 
        }, 
        "commit"=>"Submit", 
        "notes"=>"", 
        "action"=>"update", 
        "_method"=>"put", 
        "authenticity_token"=>"gvY0GfE...CROPPED...", 
        "id"=>"123", 
        "issue"=>{
            "start_date"=>"2010-03-04", 
            "estimated_hours"=>"", 
            "priority_id"=>"4", 
            "lock_version"=>"0", 
            "done_ratio"=>"0", 
            "assigned_to_id"=>"3", 
            "subject"=>"test screenshot copy", 
            "category_id"=>"6", 
            "tracker_id"=>"3", 
            "due_date"=>"", 
            "status_id"=>"2", 
            "description"=>"test screenshot copy" 
        }, 
        "controller"=>"issues", 
        "uploaded_screenshot"=>{
            "name"=>"screenshot", 
            "content"=>"iVBORw0KGgoAAAANSUhEUgAABa...CROPPED...=", 
            "description"=>"test" 
        }, 
        "attachments"=>{
            "1"=>{
                "description"=>"" 
            }
        }
    }
Redirected to http://myhost/redmine/issues/123
Completed in 218ms (DB: 31) | 302 Found [http://myhost/issues/123/edit]

Processing IssuesController#show (for 192.168.1.100 at 2010-03-04 17:46:28) [GET]
    Parameters: {
        "action"=>"show", 
        "id"=>"123", 
        "controller"=>"issues" 
    }
Rendering template within layouts/base
Rendering issues/show.rhtml
Completed in 313ms (View: 281, 
DB: 0) | 200 OK [http://myhost/issues/123]


I looked at the production logs from when the screenshot attaching worked (Jan, Feb) and nothing has changed in the request.

Jean-Philippe,
is there any chance you could take a look at an update to this plugin?
It is extremely useful in my organization. It would be great if it made it into core.
I'm running Redmine as a mongrel cluster proxied by Apache on Windows 2003.

Actions #17

Updated by Andrew Chaika almost 15 years ago

This plugin will no longer work after r3523 changes.

Actions #18

Updated by Jean-Philippe Lang almost 15 years ago

You can get the new version here: PluginScreenshotPaste.

Actions #19

Updated by Jack Kurzecki almost 15 years ago

Thank you Jean-Philippe!

I was just in the middle of reverting back to r3522 when you posted the updated version and the original plugin worked as Andrew suggested.

Now I again went back to r3525 and using your updated plugin I was getting the error about .jar file not being found. I'm hosting Redmine in http://myhost/redmine and adding <%= Redmine::Utils.relative_url_root %> in front of the path fixed the issue. (I know that this is not the appropriate way of doing this, but its a quick fix).

If anyone is interested, I modified _screenshot.rhtml to load the applet on demand and to work when Redmine is not at the root of the webserver.

Thanks again Jean-Philippe and Andrew!

Actions #20

Updated by Evgeny Mukhin almost 15 years ago

alexey skor wrote:

is it possible to integrate this feature into standard Redmine build?

I'd be brilliant. I cant make it work and I'm not sure it costs my time. Is there any chance the plugin will be incuded in say demo ?

Actions #21

Updated by pa riera almost 15 years ago

For production reasons I cannot migrate to the new version of redmine, so the plugin do not work (I^m using redmine 0.8.x)
Possible to make it work for this old version ???

Actions #22

Updated by Rafi Greenberg over 14 years ago

I am unable to get this plugin working properly with 0.9.3. I have tried every combination. It is accepting the paste from the clipboard, but then nothing is actually attached to the ticket.

Any help?

Actions #23

Updated by Alexander Zhovnuvaty over 14 years ago

Rafi Greenberg wrote:

I am unable to get this plugin working properly with 0.9.3. I have tried every combination. It is accepting the paste from the clipboard, but then nothing is actually attached to the ticket.

Any help?

Neither am I. I tried 1.0.2 plugin version with Redmine 0.9.3.stable (PostgreSQL). Was not able to paste screenshot from clipboard via IE7, IE8 and FireFox 3.6.3.

Actions #24

Updated by Max Meier over 14 years ago

I tried this plugin with Redmine 0.9.3.stable.3625. When I restart Redmine, I get an error and redmine doesn't start:

** Starting Mongrel listening at 0.0.0.0:3010
** Starting Rails with production environment...
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/module/aliasing.rb:33:in `alias_method': undefined method `attach_files' for class `Class' (NameError)
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/module/aliasing.rb:33:in `alias_method_chain'
        from /var/lib/redmine.stable/vendor/plugins/redmine_screenshot_paste/init.rb:42:in `included'
        from /var/lib/redmine.stable/vendor/plugins/redmine_screenshot_paste/init.rb:40:in `class_eval'
        from /var/lib/redmine.stable/vendor/plugins/redmine_screenshot_paste/init.rb:40:in `included'
        from /var/lib/redmine.stable/vendor/plugins/redmine_screenshot_paste/init.rb:66:in `include'
        from /var/lib/redmine.stable/vendor/plugins/redmine_screenshot_paste/init.rb:66:in `send'
        from /var/lib/redmine.stable/vendor/plugins/redmine_screenshot_paste/init.rb:66
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:182:in `call'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:182:in `evaluate_method'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:166:in `call'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in `run'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in `each'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in `send'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in `run'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:276:in `run_callbacks'
        from /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:51:in `send'
        from /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:51:in `run_prepare_callbacks'
        from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:631:in `prepare_dispatcher'
        from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:185:in `process'
        from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `send'
        from /usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `run'
        from /var/lib/redmine/config/environment.rb:20
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:147:in `rails'
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:113:in `cloaker_'
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:149:in `call'
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:149:in `listener'
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:99:in `cloaker_'
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:50:in `call'
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:50:in `initialize'
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:84:in `new'
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:84:in `run'
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in `run'
        from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
        from /usr/bin/mongrel_rails:19:in `load'
        from /usr/bin/mongrel_rails:19
Actions #25

Updated by Eraldo Girardi over 14 years ago

Hello,
I'm running the 0.9.trunk and have the same log as http://www.redmine.org/issues/3816#note-16
I'm trying to debug in NetBeans and I found this on line 49 in the init.rb plugin file:

screenshot = attachments['screenshot']

The result of that statement is nil, so the screenshot save always fail.
I hope anyone can understand this as I'm really new to ruby.

Actions #26

Updated by Victor Dulepov over 14 years ago

Some time ago we did a similar job internally for our tracker, but allowing more than one screenshot at a time and showing thumbnails (it's a bit technically different from the original solution by Jean-Philippe).
Now it is cleared for public domain, so feel free to try (attached). Should work on the 0.9.x family (verified up to 0.9.4). Requires RMagick to show screenshot thumbnails when adding/editing an issue. Known to conflict with Local Avatars .

Credits:
Authors: Konstantin Zaitcev (also at Redmine), Sergei Vasilyev, Alexandr Poplavsky
Work sponsored by Axmor Software

Actions #27

Updated by Eraldo Girardi over 14 years ago

Victor Doulepov wrote:

Some time ago we did a similar job internally for our tracker, but allowing more than one screenshot at a time and showing thumbnails (it's a bit technically different from the original solution by Jean-Philippe).
Now it is cleared for public domain, so feel free to try (attached). Should work on the 0.9.x family (verified up to 0.9.4). Requires RMagick to show screenshot thumbnails when adding/editing an issue. Known to conflict with Local Avatars .

Credits:
Authors: Konstantin Zaitcev (also at Redmine), Sergei Vasilyev, Alexandr Poplavsky
Work sponsored by Axmor Software

I tried it but I get this in my log:

7-mag-2010 12.35.34 org.apache.catalina.core.ApplicationContext log
GRAVE: unable to create shared application instance
org.jruby.rack.RackInitializationException: undefined method `attach_files' for class `ApplicationController'
    from C:/Programmi/Apache Software Foundation/Tomcat 5.5/webapps/redmine/WEB-INF/vendor/plugins/redmine_attach_screenshot/lib/application_patch.rb:9:in `included'
    from C:/Programmi/Apache Software Foundation/Tomcat 5.5/webapps/redmine/WEB-INF/vendor/plugins/redmine_attach_screenshot/lib/application_patch.rb:8:in `class_eval'
......

Maybe this can be useful: http://www.redmine.org/boards/3/topics/11643?r=12986#message-12986
I hope you can fix. This is very useful for me (my users..).
Thank you

Actions #28

Updated by Eraldo Girardi over 14 years ago

Victor Doulepov wrote:

Some time ago we did a similar job internally for our tracker, but allowing more than one screenshot at a time and showing thumbnails (it's a bit technically different from the original solution by Jean-Philippe).
Now it is cleared for public domain, so feel free to try (attached). Should work on the 0.9.x family (verified up to 0.9.4). Requires RMagick to show screenshot thumbnails when adding/editing an issue. Known to conflict with Local Avatars .

Credits:
Authors: Konstantin Zaitcev (also at Redmine), Sergei Vasilyev, Alexandr Poplavsky
Work sponsored by Axmor Software

I tried it but I get this in my log:

7-mag-2010 12.35.34 org.apache.catalina.core.ApplicationContext log
GRAVE: unable to create shared application instance
org.jruby.rack.RackInitializationException: undefined method `attach_files' for class `ApplicationController'
    from C:/Programmi/Apache Software Foundation/Tomcat 5.5/webapps/redmine/WEB-INF/vendor/plugins/redmine_attach_screenshot/lib/application_patch.rb:9:in `included'
    from C:/Programmi/Apache Software Foundation/Tomcat 5.5/webapps/redmine/WEB-INF/vendor/plugins/redmine_attach_screenshot/lib/application_patch.rb:8:in `class_eval'
......

Maybe this can help: http://www.redmine.org/boards/3/topics/11643?r=12986#message-12986
I hope you can fix. This is very useful for me (my users..).
Thank you

Actions #29

Updated by Victor Dulepov over 14 years ago

Eraldo Girardi wrote:

I tried it but I get this in my log:
[...]

Maybe this can help: http://www.redmine.org/boards/3/topics/11643?r=12986#message-12986
I hope you can fix. This is very useful for me (my users..).
Thank you

You're using 0.9.trunk, right? Looks like the attachment methods there are different from what's in 0.9.4. I think we'll be able to provide an update with the next stable release (we do live on them, not on trunk).

Actions #30

Updated by Eraldo Girardi over 14 years ago

Victor Doulepov wrote:

You're using 0.9.trunk, right? Looks like the attachment methods there are different from what's in 0.9.4. I think we'll be able to provide an update with the next stable release (we do live on them, not on trunk).

Hi Victor,
I'm sorry for double post and for to miss my redmine version..
You are right, I'm using the latest 3735 trunk.
So I'll wait for the next stable release.

Thank you!

Actions #31

Updated by Max Meier over 14 years ago

Hi,

I tried attaching a screenshot via Alt+Print and the button "Copy from clipboard". The image is visible in the applrt window, but when I attach it to the issue, I get the following in my log:

Processing AttachScreenshotController#index (for 10.10.10.41 at 2010-05-12 10:18:47) [POST]
  Parameters: {"action"=>"index", "controller"=>"attach_screenshot", "key"=>"f8757dd4a026656989181eaea2626f5e5ed3e3bc", "attachments"=>#<File:/tmp/RackMultipart20100512-25166-1uylxzl-0>}

Magick::ImageMagickError (no decode delegate for this image format `/var/lib/redmine.stable/tmp/4_101847screenshot.png' @ constitute.c/ReadImage/531):
  vendor/plugins/redmine_attach_screenshot/app/controllers/attach_screenshot_controller.rb:18:in `read'
  vendor/plugins/redmine_attach_screenshot/app/controllers/attach_screenshot_controller.rb:18:in `index'

Rendering /var/lib/redmine.stable/public/500.html (500 Internal Server Error)

I am using redmine 0.9.3.stable-3625 and imagemagick-6.5.8.8

Any help would be appreciated.

Actions #32

Updated by Victor Dulepov over 14 years ago

Max Meier wrote:

Hi,

I tried attaching a screenshot via Alt+Print and the button "Copy from clipboard". The image is visible in the applrt window, but when I attach it to the issue, I get the following in my log:
[...]

I am using redmine 0.9.3.stable-3625 and imagemagick-6.5.8.8

Any help would be appreciated.

Hi Max,
try following the instructions here ...
PNG support is essential for the plugin - I'm sorry that was missed in the original posting.

Actions #33

Updated by Premysl Vohnout over 14 years ago

When I try to attach screenshot I get 500 internal server error and in production log is

/!\ FAILSAFE /!\  Fri May 14 17:28:30 +0200 2010
  Status: 500 Internal Server Error
  bad content body
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/request.rb:698:in `read_multipart'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/request.rb:667:in `loop'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/request.rb:667:in `read_multipart'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/request.rb:590:in `parse_multipart_form_parameters'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/request.rb:520:in `parse_formatted_request_parameters'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/request.rb:450:in `request_parameters'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/request.rb:401:in `parameters'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/request.rb:30:in `_unmemoized_request_method'
    /usr/share/redmine/vendor/rails/activesupport/lib/active_support/memoizable.rb:57:in `request_method'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/request.rb:40:in `method'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/routing/route_set.rb:437:in `extract_request_environment'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/routing/route_set.rb:390:in `recognize'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:183:in `handle_request'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:112:in `dispatch_unlocked'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:125:in `dispatch'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:124:in `synchronize'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:124:in `dispatch'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:134:in `dispatch_cgi'
    /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:41:in `dispatch'
    /usr/lib/ruby/1.8/phusion_passenger/railz/request_handler.rb:50:in `process_request'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
    /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:418:in `start_request_handler'
    /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:358:in `handle_spawn_application'
    /usr/lib/ruby/1.8/phusion_passenger/utils.rb:184:in `safe_fork'
    /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:354:in `handle_spawn_application'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:163:in `start'
    /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:213:in `start'
    /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
    /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
    /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
    /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
    /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
    /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
    /usr/lib/phusion_passenger/passenger-spawn-server:61

Using redmine-0.9.3-3~bpo50+1

Actions #34

Updated by Markus Peter over 14 years ago

Hello,

I had the same error

load: class imageuploadapplet.Main not found

with plugin version 1.1.0 on FireFox, with redmine as default site (not in subdirectory).

Adding a codebase attribute to the applet tag like this:

codebase="/plugin_assets/redmine_screenshot_paste/" 

fixed the problem, and the applet loaded correctly.

Actions #35

Updated by Sheng Wang over 14 years ago

I test this plugin in Windows XP, IE6 and Firefox both work well.
But in Linux, Firefox can't display the applet.
Who can tell me why?
Thanks.

Actions #36

Updated by Arne De Herdt over 14 years ago

I've installed the plugin on our redmine installation, and the new entry appears in the issue's view, but the applet itself is causing problems.

The applet is installed in the vendor folder as instructed, but it's producing errors. When looking in the production log, I'm getting the following:

Processing ApplicationController#index (for 192.168.112.108 at 2010-06-11 17:08:46) [GET]

ActionController::RoutingError (No route matches "/projects/misc/issues/imageuploadapplet/Main.class" with {:method=>:get}):
  passenger (2.2.11) lib/phusion_passenger/rack/request_handler.rb:92:in `process_request'
  passenger (2.2.11) lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
  passenger (2.2.11) lib/phusion_passenger/railz/application_spawner.rb:418:in `start_request_handler'
  passenger (2.2.11) lib/phusion_passenger/railz/application_spawner.rb:358:in `handle_spawn_application'
  passenger (2.2.11) lib/phusion_passenger/utils.rb:184:in `safe_fork'
  passenger (2.2.11) lib/phusion_passenger/railz/application_spawner.rb:354:in `handle_spawn_application'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:163:in `start'
  passenger (2.2.11) lib/phusion_passenger/railz/application_spawner.rb:213:in `start'
  passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
  passenger (2.2.11) lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
  passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
  passenger (2.2.11) lib/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
  passenger (2.2.11) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
  passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
  passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'

Rendering /opt/redmine/public/404.html (404 Not Found)

Would it be solved if i just add the following to routes.rb:

map.connect '/projects/misc/issues/imageuploadapplet/Main.class', :controller => 'index', :action => 'index'

Actions #37

Updated by Ezequiel Naftali over 14 years ago

Hi, Where is the codebase located?

codebase="/plugin_assets/redmine_screenshot_paste/"

Thanks

Markus Peter wrote:

Hello,

I had the same error
[...]
with plugin version 1.1.0 on FireFox, with redmine as default site (not in subdirectory).

Adding a codebase attribute to the applet tag like this:
[...]

fixed the problem, and the applet loaded correctly.

Actions #38

Updated by Markus Peter over 14 years ago

Ezequiel Naftali wrote:

Hi, Where is the codebase located?

codebase="/plugin_assets/redmine_screenshot_paste/"

in /app/views/issues/_screenshot.rhtml you can add it as a attribute to the applet tag.

Actions #39

Updated by Carlo Hamalainen over 14 years ago

I have Redmine 0.9.3 running under the BitNami stack on a legacy Windows Server 2003 system.

I tried redmine_attach_screenshot_v.0.0.3.zip. I couldn't save the image and got a 500 internal server error. In the production log I saw this:

Processing AttachScreenshotController#index (for 192.168.100.1 at 2010-06-18 09:03:58) [POST]
  Parameters: {"action"=>"index", "controller"=>"attach_screenshot", "key"=>"0bf909de2d6c9c88f49883f202df6f45976d6455", "attachments"=>#<File:C:/WINDOWS/Temp/RackMultipart20100618-8172-1coq76s-0>}

ArgumentError (invalid value for Integer: "090358"):
  vendor/plugins/redmine_attach_screenshot_v.0.0.3/redmine_attach_screenshot/app/controllers/attach_screenshot_controller.rb:36:in `sprintf'
  vendor/plugins/redmine_attach_screenshot_v.0.0.3/redmine_attach_screenshot/app/controllers/attach_screenshot_controller.rb:36:in `make_tmpname'
  vendor/plugins/redmine_attach_screenshot_v.0.0.3/redmine_attach_screenshot/app/controllers/attach_screenshot_controller.rb:13:in `index'

Rendering C:/Program Files/BitNami Redmine Stack/apps/redmine/public/500.html (500 Internal Server Error)

So the fix isn't too hard. Change line 36 of attach_screenshot_controller.rb from

    sprintf('%d_%d%s', User.current.id, date, name)

to this:

    sprintf('%d_%s%s', User.current.id, date, name)

Great plugin! Thanks for making it public.

Actions #40

Updated by Steven Meiracker over 14 years ago

Hi All,
I am using the Turnkey Redmine which I have updated to 0.9.4
I have tried to install the screenshot plugin but get same error as above:
load: class imageuploadapplet.Main not found.
java.lang.ClassNotFoundException: imageuploadapplet.Main
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://10.1.1.22/projects/surpass/issues/imageuploadapplet/Main.class
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: imageuploadapplet.Main

I am running the website as / so it shouldn't be a path issue but I have had no luck getting it working.
I am new linux so I apologise if I have missed something simple.
Thanks :)

Actions #41

Updated by Aniruddha Shankar over 14 years ago

Problem still persists in version 0.9.6. I think the one common thread between me and the poster just above me is that both our redmine installs are hosted at http://base.domain/&lt;somename>

Java Plug-in 1.6.0_15
Using JRE version 1.6.0_15-b03 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\Sirji.SATORI
----------------------------------------------------
c:   clear console window
f:   finalize objects on finalization queue
g:   garbage collect
h:   display this help message
l:   dump classloader list
m:   print memory usage
o:   trigger logging
q:   hide console
r:   reload policy configuration
s:   dump system and deployment properties
t:   dump thread list
v:   dump thread stack
x:   clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------

load: class imageuploadapplet.Main not found.
java.lang.ClassNotFoundException: imageuploadapplet.Main
    at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://dev.XXXXXX.com/pm/projects/launch/issues/imageuploadapplet/Main.class
    at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
    at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
    at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    ... 7 more
Exception: java.lang.ClassNotFoundException: imageuploadapplet.Main
Actions #42

Updated by Jack Kurzecki over 14 years ago

I just tested a version of redmine_attach_screenshot_v.0.0.3.zip from Victor Doulepov updated by Jens Alfke:
http://www.redmine.org/boards/3/topics/16088

It works great with Redmine 1.0.0.devel.3919

Actions #43

Updated by Sepp _ over 14 years ago

Confirmed.
Verion 1.1.0 from the original Plugin also works! See
http://www.redmine.org/wiki/redmine/PluginScreenshotPaste

Actions #44

Updated by Amil Waduwawara over 14 years ago

Sheng Wang wrote:

I test this plugin in Windows XP, IE6 and Firefox both work well.
But in Linux, Firefox can't display the applet.
Who can tell me why?
Thanks.

You need to install/configure Java plugins.

I'm using Ubuntu Lucid Lynx with Firefox 3.6.8 (latest updates) and I too had the same issue. Then I fixed it as follows:
  1. Install Java plugin (sudo apt-get install sun-java6-plugin)
  2. restart browser (worked for Firefox 3.6.8, Google Chrome v5.0.375.125 beta)

Ref: kiddingthecity

Actions #45

Updated by Mark Linn over 14 years ago

1.1.0 in Redmine 1.0 seems to work for me (with small codebase change to account for sub-URI config) if I'm using IE, however, on Ubuntu 10.04 (in Firefox or Chromium) I'm seeing the applet and able to see it attach a screenshot to the applet, but, on the server-side it isn't getting the content included when I click submit. The content = "" if I use Firefox or Chromium in Linux instead of the long base64 data I see in the logs if I submit from a Windows box with IE. Any thoughts on why it's only IE friendly?

Actions #46

Updated by Anthony Meugui over 14 years ago

The screenshot-past plugin in version 1.1.0 works almost well with Redmine 1.0.1 (stable) (Internet Explorer/Google Chrome on windows Seven/Vista and XP). I have an annoying side effect.
The plugin works except for one thing, when the plugin is installed, I can't update the "Status" issue WITH the pop-up menu (But ALL other update (from pop-up or not) still working) . When I remove the plugin I can update the status from the pop-up menu again.

Redmine is installed on 2 computers and I've got exactly the same thing on both of them.
Thanks for this usefull plugin, it saves a lot of time.

Actions #47

Updated by Amil Waduwawara over 14 years ago

Ab MCGUI wrote:

The screenshot-past plugin in version 1.1.0 works almost well with Redmine 1.0.1 (stable) (Internet Explorer/Google Chrome on windows Seven/Vista and XP). I have an annoying side effect.
The plugin works except for one thing, when the plugin is installed, I can't update the "Status" issue WITH the pop-up menu (But ALL other update (from pop-up or not) still working) . When I remove the plugin I can update the status from the pop-up menu again.

The said issue is not there with Redmine v1.0.0RC. But it's there with Redmine v1.0.1.

Actions #48

Updated by Slava Karg over 14 years ago

Confirm that 1.1.0 screenshot-past plugin and redmine 1.0.1(stable) have issue with changing status of issue through context_menu.

Actions #49

Updated by Valerio Bonfatti about 14 years ago

There is a syntax error that can be fixed: getImageFromClipboad() shoudl be getImageFromClipboard().
Then the applet should remove all the System.out.println().

Actions #50

Updated by Slava Karg about 14 years ago

Could you possibly describe this fix in more details? It is not obvious where to make these changes.. o_O
Thanks!

Actions #51

Updated by Slava Karg about 14 years ago

  • Assignee deleted (Jean-Philippe Lang)

I guess You mean to modify this file in plugin directory: app/views/issues/_screenshot.rhtml

Correct?

Actions #52

Updated by Slava Karg about 14 years ago

Nevertheless this fix doesn't resolve issue with changing status via context menu ;\

Actions #53

Updated by Andrew Chaika about 14 years ago

Valerio Bonfatti wrote:

There is a syntax error that can be fixed: getImageFromClipboad() shoudl be getImageFromClipboard().
Then the applet should remove all the System.out.println().

It's just my grammatical error in java code.

    public void getImageFromClipboad()
    {
      image = (BufferedImage) AccessController.doPrivileged(
        new PrivilegedAction<BufferedImage>() {
          public BufferedImage run() {
            BufferedImage image = null;
            try {
              image = (BufferedImage) getToolkit().getSystemClipboard().getData(DataFlavor.imageFlavor);
            } catch (UnsupportedFlavorException ex) {
              Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
            } catch (IOException ex) {
              Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
            }
            return image;
          }
        },
        context);

Actions #54

Updated by Barry McCall about 14 years ago

I encounter issues even after correcting the grammatical error. I've removed and reinstalled the plugin (also re corrected getImageFromClipboad)
I've tried adding

<applet archive="<%= Redmine::Utils.relative_url_root %>/plugin_assets/redmine_screenshot_paste/simageuploadapplet.jar" 

Still the same problem (I am not running in a SubURI.. but tried anyhow)

This is the code that firefox sees.

<p><label>Screenshot</label>
    <small><a href="#" onclick="Element.show('imageuploadapplet'); Element.show('uploaded_screenshot_fields'); document.imageuploadapplet.getImageFromClipboard(); return false;">

    Drag or paste from clipboard</a></small><br />
        <applet archive="/plugin_assets/redmine_screenshot_paste/simageuploadapplet.jar" 
                      code="imageuploadapplet.Main" 
                      name="imageuploadapplet" 
                      id="imageuploadapplet" 
                      hspace="0" vspace="0" width="400" height="200" align="middle" 
                      style="display:none;">
        </applet>
        <br />
        <span id="uploaded_screenshot_fields" style="display:none;">
        <small>Name / Description:</small><br />
        <input type="text" name="uploaded_screenshot[name]" value="screenshot" />
        <input type="text" name="uploaded_screenshot[description]" size="60" />

        </span>
</p>
<input type="hidden" name="uploaded_screenshot[content]" id="image" />

document.imageuploadapplet.getImageFromClipboard is not a function

Processing ApplicationController#index (for 10.9.2.12 at 2010-10-11 14:40:57) [GET]

ActionController::RoutingError (No route matches "/issues/imageuploadapplet.Main" with {:method=>:get}):
  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'

Redmine 0.9.4
Rails 2.3.5
Ruby 1.8.7
Rack 1.0.1
Passenger 2.2.15
Apache22
FreeBSD 8.0-Release

Actions #55

Updated by Alex Last about 14 years ago

I see there's some other "paste screenshot" plugin available: http://www.redmine.org/wiki/redmine/PluginScreenshotPaste

Actions #56

Updated by Terence Mill about 14 years ago

and here another thread about this plugin http://www.redmine.org/boards/3/topics/14026

An here another similar plugin https://github.com/blondak/redmine_attach_screenshot

Actions #58

Updated by Jack Kurzecki about 14 years ago

It would be great if those two plugins could be merged together.
redmine_attach_screenshot
(forked from https://github.com/snej/redmine_attach_screenshot which was forked from https://github.com/merpati09/redmine_attach_screenshot)

and JPL's PluginScreenshotPaste

I like the redmine_attach_screenshot because of the way it loads the java applet and the thumbnails, but it has a few bugs:
- one is fixed here: http://www.redmine.org/boards/3/topics/16088?r=16407#message-16407
- the plugin breaks "Add another file" link
- it doesn't have an option to rename screenshots from default "screenshot.png"

Actions #59

Updated by Terence Mill about 14 years ago

+1

Actions #60

Updated by Sepp _ about 14 years ago

Same here, that's why I'm also using PluginScreenshotPaste.
One minor Featurerequest: Please also let me directly include the Filename as

!FILENAME!

into the comments.

+1

Actions #61

Updated by Brad Rushworth almost 14 years ago

I'm running Screenshot Paste 1.1.0 on Redmine 1.1.0.stable.4702 and it works nicely. I did have to change the Windows line endings over to Unix in the code to get it working properly though.

Sepp _ wrote:

Same here, that's why I'm also using PluginScreenshotPaste.
One minor Featurerequest: Please also let me directly include the Filename as [...]
into the comments.

It does do that, I just tried it then. If you enter the name of the screenshot as say TestFileName, then you just enter !TestFileName.png! into the comments.

Actions #62

Updated by Sepp _ almost 14 years ago

Brad Rushworth wrote:

It does do that, I just tried it then. If you enter the name of the screenshot as say TestFileName, then you just enter !TestFileName.png! into the comments.

I know this feature, but I'd like that the string !TestFileName.png! automatically appears in the textbox... just a minor wish ;-)

Actions #63

Updated by Terence Mill almost 14 years ago

There is a bug raising errors from JPL screenshotpaste plugin when creating new task from eclipse via redmine_mylyn_connector.

Very sadly on screenshotpaste plugin isn't any bug fix release for over one year!

SF.NEt Ticket 3177244

 
When creating new task from Eclipse (on clicking submit) i get an error in eclipse "Submit failed: Server error" and find following entry in my logs.
We are using (as many others) Screenshot Paste Plugin 1.1.0 von Jean-Philippe Lang and it seems that there could be a conflict (maybe is something else)

The Plugin can bew donwloaded here: http://www.redmine.org/issues/3816

Here the log error message:

NoMethodError (undefined method `[]' for nil:NilClass):
vendor/plugins/redmine_screenshot_paste/init.rb:49:in `attach_files'
app/controllers/issues_controller.rb:130:in `create'
passenger (2.2.14) lib/phusion_passenger/rack/request_handler.rb:92:in `process_request'
passenger (2.2.14) lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
passenger (2.2.14) lib/phusion_passenger/railz/application_spawner.rb:441:in `start_request_handler'
passenger (2.2.14) lib/phusion_passenger/railz/application_spawner.rb:381:in `handle_spawn_application'
passenger (2.2.14) lib/phusion_passenger/utils.rb:252:in `safe_fork'
passenger (2.2.14) lib/phusion_passenger/railz/application_spawner.rb:377:in `handle_spawn_application'
passenger (2.2.14) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
passenger (2.2.14) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
passenger (2.2.14) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
passenger (2.2.14) lib/phusion_passenger/abstract_server.rb:163:in `start'
passenger (2.2.14) lib/phusion_passenger/railz/application_spawner.rb:222:in `start'
passenger (2.2.14) lib/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
passenger (2.2.14) lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
passenger (2.2.14) lib/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
passenger (2.2.14) lib/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
passenger (2.2.14) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
passenger (2.2.14) lib/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
passenger (2.2.14) lib/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
passenger (2.2.14) lib/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
passenger (2.2.14) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
passenger (2.2.14) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
passenger (2.2.14) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'

Actions #64

Updated by Terence Mill almost 14 years ago

Terence Mill wrote:

There is a bug raising errors from JPL screenshotpaste plugin when creating new task from eclipse via redmine_mylyn_connector.

Very sadly on screenshotpaste plugin isn't any bug fix release for over one year!

SF.NEt Ticket 3177244
[...]

It's a bug of screenshot_paste. The plugin is reading a nonexistent variable.

Actions #65

Updated by Victor Dulepov almost 14 years ago

Hello,
we finally managed to make an update of redmine_attach_screenshot.
Changes:
Actions #66

Updated by Sepp _ almost 14 years ago

Nice work, thanks! Works!!

Actions #67

Updated by Dmitriy Belokurov almost 14 years ago

Hello. Does it works in wiki edition page? If not, how can I modify plugin for it? Thanks.

Actions #68

Updated by Terence Mill almost 14 years ago

I get an error message for the execution of the applet after clicking on "Attach"

Loading: Class com.axmor.redmine.uploader.Uploader.class not found
java.lang.ClassNotFoundException: com.axmor.redmine.uploader.Uploader.class
    at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:https://repo.gruppe.de/httpauth-loginplugin_assets/redmine_attach_screenshot/javascripts/com/axmor/redmine/uploader/Uploader/class.class
    at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
    at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
    at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    ... 9 more
Ausnahme: java.lang.ClassNotFoundException: com.axmor.redmine.uploader.Uploader.class
Actions #69

Updated by James Moore almost 14 years ago

In development mode I'm getting the following exception when loading redmine if I'm not already logged in via a cookie:

A copy of ApplicationController has been removed from the module tree but is still active!

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:414:in `load_missing_constant'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:96:in `const_missing'
/Library/WebServer/Documents/hive-stable/app/controllers/application_controller.rb:55:in `user_setup'

Actions #70

Updated by Jaromir Dvoracek over 13 years ago

Hello,

can you please attach Czech translation to redmine_attach_screenshot plugin?

Thanks a lot.

J. Dvoracek

Actions #71

Updated by Marco Descher over 13 years ago

Hey,

great tool, I created a german translation, if you want to include it:

de:
  label_screenshots: Screenshots
  label_add_another_screenshot: Screenshot hinzufügen
  label_button_paste: Bild von der Zwischenablage einfügen
  label_image: Screenshot
  button_attach: Hinzufügen
  error_close_msg: Kann applet, {0} nicht schliessen
  error_close_title: Fehler
  error_attach_msg: Fehler, {0}
  error_attach_title: Fehler beim Hinzufügen

I have 2 remarks:

  • It would be great, if the view presented when including a screenshot from clipboard, adapts to the size of the screen. Currently on my MB 13" I dont' see the buttons at the end, without switching to fullscreen mode :)
  • Please put the label field for the just added image near the image itself, and add a label on what this label field is all about :)

Big it up for you! :)
Marco

Actions #72

Updated by Toshi MARUYAMA over 13 years ago

  • Category set to UI
Actions #73

Updated by Il'ya Shakitko over 13 years ago

Hi Alex!

Can you migrate this feature to Skype-similar style? In skype i can press Ctrl + V and image from clipboard past into message.

Could be better if you can realize it and include in config to enable this feature. Ctrl+V when focused on textarea, and image from CP inserted like a small thumb. (screenshot included)

How the Skype realize paste an image into textarea

Actions #74

Updated by Alex Last over 13 years ago

I think this is a great idea: intercepting "paste from clipboard" event in the text area and automatically start the image import process if the clipboard contains an image.

I'm not the one who implemented this feature. I hope the feature developers can add this.

Actions #75

Updated by 功磊 马 over 13 years ago

It works well for me in Chrome10,but not other browsers like IE9 64bit,Firfox 3.6 32bit and other Chinese special browser like Sougou.
My OS Win7 64bit.

And I add a Simplified Chinese translation:

zh:
label_screenshots: 从剪贴板里添加截图
label_add_another_screenshot: 添加另一张截图
label_button_paste: 从剪贴板里添加截图
label_image: 截图
button_attach: 添加
error_close_msg: 无法关闭 applet, {0}
error_close_title: 错误
error_attach_msg: 错误, {0}
error_attach_title: 添加错误

Any thanks very much for your work.

Actions #76

Updated by Ruben Kruiswijk over 13 years ago

Added dutch translation

Actions #77

Updated by Jason M over 13 years ago

While trying to run redmine_attach_screenshot-0.1.0.zip on redmine 1.1.2 I get the following error after clicking the Add button:

load: class com.axmor.redmine.uploader.Uploader.class not found.
java.lang.ClassNotFoundException: com.axmor.redmine.uploader.Uploader.class
    at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Exception: java.lang.ClassNotFoundException: com.axmor.redmine.uploader.Uploader.class

Any idea how to get around this?

Actions #78

Updated by Eduardo Ramos over 13 years ago

Jason M wrote:

While trying to run redmine_attach_screenshot-0.1.0.zip on redmine 1.1.2 I get the following error after clicking the Add button:

[...]

Any idea how to get around this?

I have the same problem, any idea ?
Regards,

Actions #79

Updated by vincent cache over 13 years ago

Hello,

When i try to use redmine_attach_screenshot-0.1.0.zip with Redmine 1.0.4 on IE6, it doesn't work.
I've no problem on mozilla or IE8, but my users are on IE6.

Someone can help me please?

Regards

Actions #80

Updated by Sepp _ over 13 years ago

I get an error between 8am and 10am, every day. after 10am the applet works perfect!

Actions #81

Updated by Terence Mill over 13 years ago

There must be a redmine_attach_screenshot\assets\javascripts\uploader_applet.jar file which keeps the hava class Uploader.class in a subfolder "com/axmor/redmine/uploader" of the jar file.
You can check that if you open it e.g with winrar or winzip, which will work if renaming the file to zip before. The jar file itself shall be unpacked in "{redmine assets folder}\redmine_attach_screenshot\assets\javascripts\com\axmor\redmine\uploader \Uploader.class" after the plugin is installed and the redmine server is restarted. Check also the plugins folder in in the redmine/assets folder has read and execute rights.

Cleaning up this assets folder from the plugin folder after updates on the plugins is a good idea also.

Jason M wrote:

While trying to run redmine_attach_screenshot-0.1.0.zip on redmine 1.1.2 I get the following error after clicking the Add button:

[...]

Any idea how to get around this?

Actions #82

Updated by Jack Kurzecki over 13 years ago

Sepp _ wrote:

I get an error between 8am and 10am, every day. after 10am the applet works perfect!

try changing line 36 of vendor\plugins\redmine_attach_screenshot\app\controllers\attach_screenshot_controller.rb from:

    sprintf('%d_%d%s', User.current.id, date, name)


to:
    sprintf('%d_%s%s', User.current.id, date, name)

Actions #83

Updated by Ki Won Kim over 13 years ago

Thank you!! then I was working well in 1.1.3
and attach korean language file.

Actions #84

Updated by Sepp _ over 13 years ago

Jack Kurzecki wrote:

try changing line 36 of vendor\plugins\redmine_attach_screenshot\app\controllers\attach_screenshot_controller.rb from:

Thanks, yes, that works!!

Actions #85

Updated by Manu Dragon over 13 years ago

thanks for that work too !
here is the french translation

Actions #86

Updated by Terence Mill over 13 years ago

Can someone add some screenshots? Tx!

Actions #87

Updated by Steven Wong over 13 years ago

As you say ,it's a problem to how to use it in Internet Explorer and FrieFox.
Could anyone modify it for IE and Firefox? Very Thanks.

attachmen is the problem about IE.

功磊 马 wrote:

It works well for me in Chrome10,but not other browsers like IE9 64bit,Firfox 3.6 32bit and other Chinese special browser like Sougou.
My OS Win7 64bit.

And I add a Simplified Chinese translation:

zh:
label_screenshots: 从剪贴板里添加截图
label_add_another_screenshot: 添加另一张截图
label_button_paste: 从剪贴板里添加截图
label_image: 截图
button_attach: 添加
error_close_msg: 无法关闭 applet, {0}
error_close_title: 错误
error_attach_msg: 错误, {0}
error_attach_title: 添加错误

Any thanks very much for your work.

Actions #88

Updated by Jamie Gruener over 13 years ago

Without the plugin installed, hitting Enter while on the edit/update page will click the Submit button (unless in a text control that allows returns, of course). With the plugin installed, hitting Enter causes the plugin's Add button to be clicked.

Could we change the action for the button from "submit" to "button"? My quick tests in Firefox via Firebug suggest that this change had no ill effects and also allows Enter to Submit the issue form without triggering the Add.

I tried creating an issue for this (#8852), but that was closed because "this tracker is for Redmine core issues only, you should contact the Mylyn plugin author." Funny!

Actions #89

Updated by Manu Dragon over 13 years ago

when I want to add a screenshot with this plugin, my new issue is directly created with no screenshot
I was ok with the older redmine version but no more working with Redmine 1.2.0.stable

any idea ? ^^

Actions #90

Updated by Jamie Gruener over 13 years ago

I answered my own question.

If you add :type => 'button', to line 27 of redmine_attach_screenshot/app/views/attachments/_form.rhtml, viola!

Old

<%= submit_tag l(:button_add), :onclick => 'showAttachScreen(); return false;'%>

New

<%= submit_tag l(:button_add), type => 'button', :onclick => 'showAttachScreen(); return false;'%>

Now the Add button isn't triggered when you hit Enter.

Redmine 1.2.0 stable, Ubuntu 10.04.2 LTS running on Rackspace.

Actions #91

Updated by Tom Ka about 13 years ago

Thanks for the plugin. I get it to load, but a click on "attach" or "close" gets me an error message: "unknown protocol: javascript". Any idea on this? I'm running an nginx server, maybe there needs to be some configuration for this to work?

Actions #92

Updated by Tom Ka about 13 years ago

I've soled my problem and it seems it was only problem with OpenJDK. The change had to be made in the Uploader class in the uploader_applet.jar file. If it is okay with axmor (I'll write them an email) I release the change on my github repo. If not, than you need to follow this thread on stackoverflow for all the URL constructors except the one in the sendContentToServer() method. And be aware that you need to (self-)sign the resulting jar file if you want access to the claiboard :-).

Actions #93

Updated by Rich Sagendorf about 13 years ago

Max Meier wrote:

Hi,

I tried attaching a screenshot via Alt+Print and the button "Copy from clipboard". The image is visible in the applrt window, but when I attach it to the issue, I get the following in my log:
[...]

I am using redmine 0.9.3.stable-3625 and imagemagick-6.5.8.8

Any help would be appreciated.

I'm having the same issue, but I'm using the BitNami Stack on Windows, and it looks like ImageMagick already has the correct delegate configuration. Hopefully someone has an idea, because I'm fairly stumped! Thanks!

Actions #94

Updated by Akiko Takano about 13 years ago

Nice plugin!
It would be nice for me to be able to trim the image on the applet :)

Actions #95

Updated by Thibaut Tropardy about 13 years ago

Same thing, it'll great if Redmine use thumbmail.
Screenshot overflow on the right.

Auto-incremente name "screenshow-<INCREMENT>" and automatically insert image in the text box

Actions #96

Updated by John Pataki about 13 years ago

First I'd like to say I really like this plugin and use it often.
I've recently updated to latest release of JAVA on my Macbook Pro and now when I use this plugin, it doesn't seem to be capturing the clipboard correctly or at all.
The preview during image capture doesn't show the clipboard contents and while images appear to be saved, they are blank / transparent nothingness.

Has anyone else noticed this?
Will there be an update to accommodate the most recent JAVA for OSX (Snow Leopard) update?

java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-10M3527)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)

Actions #97

Updated by Matthias Neubert almost 13 years ago

Plugin seems not to work with Redmine 1.3.0

Problem: While the preview of the inserted screenshot is shown good, the resulting image file produced is empty (but has about 1.5 KBytes)

Rmagick is installed

Someone knows something about that?

regards
matthias

Actions #98

Updated by Renzo Meister almost 13 years ago

I've made a small patch for this plugin because of number overflow in Redmine 1.3.0.

Actions #99

Updated by Stephen Curran almost 13 years ago

Renzo, what was the symptom you were addressing because of the "number overflow in Redmine 1.3.0", and what did you change in the plugin?

We are seeing a problem in our Redmine 1.3 installation that had been a problem with a previous version of the plugin - we can't add multiple file attachments to an Issue with this plugin installed. We have been running 1.2.2 and recently updated this plugin to the latest version and finally had multiple file attachments working. Upgraded to Redmine 1.3 and that feature is again gone. Has anyone else encountered that and any idea what the issue is?

Note - we haven't tried Redmine 1.3 without this plugin, so perhaps something else is the problem.

Actions #100

Updated by William Roush almost 13 years ago

Having the same issue as Stephen, I removed the plugin and multiple uploads works again. Get contacted the next day because I removed the plugin, "I need screenshots more than I need multiple uploads" (your plugin is great!).

Actions #101

Updated by William Roush almost 13 years ago

Stephen Pearce: I've attached a fix to this post, drop this in {redmine}/vendors/plugins/redmine_attach_screenshot/app/views/attachments/

Back up the original in case you find any bugs, but from what I've tested, both multiple-upload and screenshots still work.

This is because Redmine changed the form, but this plugin doesn't use the new one. I may fork this if the creator has lost all interest in upkeeping this and drop it on Bitbucket or something.

Actions #102

Updated by Yuri Krichevsky almost 13 years ago

I'm having the same issue as John - confirmed on 2 different Mac's with latest Java 1.6.0_29 update 1.
The preview during image capture doesn't show the clipboard contents and while images appear to be saved, they are blank / transparent nothingness.
Tested in Chrome / Firefox / Safari.

From Window PC everything works fine.

Is there any solution to the issue ?

John Pataki wrote:

java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-10M3527)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)

Actions #103

Updated by William Roush almost 13 years ago

Sadly the Java is packed and not open source, someone would have to rewrite that from the ground up, but I'm tempted to do it if no one else speaks up (I already have a fork with my fixes [Redmine 1.3.0 support + Ruby 1.9 support] and Renzo Meister's bug fix).

Edit:

And while I'm not a flash developer, I'm tempted to go with flash, because Java applets cause whining on various browsers due to security purposes, and I'd like to eliminate that. I'll debate a bit on this.

Actions #104

Updated by William Roush almost 13 years ago

Scratch the applet replacement, looks like fixing the Java app will be fairly trivial...

Can anyone confirm if the Mac bug happens on Linux? I don't have an OSX machine to debug the applet with. From what I see some debug information should end up in the Java console if you have access to that. Without additional information debugging this becomes nearly impossible and we get to twiddle our thumbs until someone that has access to an OSX machine wants to figure this one out.

Current repo here, includes java code under src/ on develop branch:

https://bitbucket.org/StrangeWill/redmine-inline-attach-screenshot/

Bug reported here if you happen to get a stack trace dump or something:

https://bitbucket.org/StrangeWill/redmine-inline-attach-screenshot/issue/1/cannot-attach-screenshots-in-osx

Actions #105

Updated by Joe Cullin almost 13 years ago

Same thing on my mac: pasted image shows correctly in the browser, but after saving the issue it's just a blank png. The java console showed nothing by default. When I increased the log level to 5, I still barely got any console output:

Java Plug-in 1.6.0_29
Using JRE version 1.6.0_29-b11-402-11D50b Java HotSpot(TM) 64-Bit Server VM
User home directory = /Users/joecullinTrace level set to 5: all… completed.
network: Connecting http://...com/attach_screenshot with proxy=DIRECT
network: Connecting http://....com:80/ with proxy=DIRECT
basic: Starting applet teardown
basic: Finished applet teardown

Here's what the file looks like on the server. I'm guessing that most of this is a PNG header generated by RMagick, and little to none of it is actual image data.

$ od -c 120224071433_6_71420.000000screenshot.png
0000000 211   P   N   G  \r  \n 032  \n  \0  \0  \0  \r   I   H   D   R
0000020  \0  \0 004 250  \0  \0 002 276  \b 006  \0  \0  \0 206 202   &
0000040 231  \0  \0  \f 303   I   D   A   T   x 332 355 301 201  \0  \0
0000060  \0  \0 303 240 371   S 337 340 004   U 001  \0  \0  \0  \0  \0
0000100  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
*
0006340  \0  \0  \0  \0  \0  \0   < 003 030   {  \0 001 370 360 254   F
0006360  \0  \0  \0  \0   I   E   N   D 256   B   ` 202
0006374

I noticed that the image sizes in the files directory seem to vary correctly -- that is, if I attach a bigger screenshot, I get a bigger white image. I don't have much time to play with this right now, and I'm no java person, but I'll poke around some more later at home where I also have a PC to compare against. I wonder if it's something such as a mac-style line ending breaking the stream of data read by the server.

Actions #106

Updated by Joe Cullin almost 13 years ago

My last update doesn't seem to have taken. Maybe the forums thought I was posting malicious code. (I had posted in the entire post request to /attach_screenshot from my mac.

Anyway, it appears that the body of that request doesn't have very much data. The content length was only 1726 for a full-screen sized image. The headers & mime markers were bigger than the actual png data.

Googling for ImageIO on mac, I see some vague complaints about how mac java is not kept up to date. I have the latest available from Apple. Maybe there's a way to upgrade unofficially, but I'm not sure I want to risk breaking other things.

If you want me to try any other debugging on mac, let me know. I think this could be a popular plugin for our redmine users, but many of them use macs.

Actions #107

Updated by William Roush almost 13 years ago

As you either guessed or looked, ImageIO is being used:

https://bitbucket.org/StrangeWill/redmine-inline-attach-screenshot/src/58dac40e7002/src/java_applet/com/axmor/redmine/uploader/Uploader.java#cl-134

I'll dig around for what I can do to work around that, I'd like to get this working for Mac users too.

Thanks for the dumps, but they're pretty useless if it's ImageIO (which looking at the code and the output from you, it seems to definitely be that.

I may be able to get some kind of beta build going this week, and I'll verify if this has problems on Linux too.

Actions #108

Updated by Norbert Penel almost 13 years ago

  • Assignee set to Azamat Hackimov

i get an error 500 on upload script
i spent 1 day for install rmagick + imagemagick and it does not works !!!
could you help me ?

/!\ FAILSAFE /!\ Mon Mar 12 17:07:26 +0100 2012
Status: 500 Internal Server Error
bad content body
/usr/lib/ruby/vendor_ruby/rack/multipart/parser.rb:108:in `get_current_head_and_filename_and_content_type_and_name_and_body'
/usr/lib/ruby/vendor_ruby/rack/multipart/parser.rb:19:in `parse'
/usr/lib/ruby/vendor_ruby/rack/multipart/parser.rb:17:in `loop'
/usr/lib/ruby/vendor_ruby/rack/multipart/parser.rb:17:in `parse'
/usr/lib/ruby/vendor_ruby/rack/multipart.rb:25:in `parse_multipart'
/usr/lib/ruby/vendor_ruby/rack/request.rb:306:in `parse_multipart'
/usr/lib/ruby/vendor_ruby/rack/request.rb:182:in `POST'
/usr/lib/ruby/vendor_ruby/rack/methodoverride.rb:15:in `call'
/usr/lib/ruby/vendor_ruby/action_controller/params_parser.rb:15:in `call'
/usr/lib/ruby/vendor_ruby/action_controller/session/cookie_store.rb:99:in `call'
/usr/lib/ruby/vendor_ruby/action_controller/failsafe.rb:26:in `call'
/usr/lib/ruby/vendor_ruby/rack/lock.rb:15:in `call'
/usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:106:in `call'
/usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:95:in `process_request'
/usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:374:in `start_request_handler'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:332:in `handle_spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/utils.rb:184:in `safe_fork'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:330:in `handle_spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:163:in `start'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:209:in `start'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
/usr/lib/phusion_passenger/passenger-spawn-server:61

Actions #109

Updated by marcin t over 12 years ago

Still seeing same issue with attach plugin:

Java Plug-in 1.6.0_31
Using JRE version 1.6.0_31-b05 Java HotSpot(TM) Client VM
User home directory = C:\Users\marcin.tauter
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------

load: class com.axmor.redmine.uploader.Uploader.class not found.
java.lang.ClassNotFoundException: com.axmor.redmine.uploader.Uploader.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.lang.ClassNotFoundException: com.axmor.redmine.uploader.Uploader.class

Actions #110

Updated by Nabil Faouzi over 12 years ago

  • Assignee deleted (Azamat Hackimov)

Hi
Renzo Alhan Rabiço Meister : I've tried to install your plugins but, it seem's don't work fine with my redmine 1.3.X

When i wan't to paste screenshot from a new issue, i' ve got this error (similar to marcinT error):

ActionController::RoutingError (No route matches "/plugin_assets/redmine_attach_screenshot/javascripts/com.axmor.redmine.uploader.Uploader.class" with {:method=>:get}):
  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'

There is my /plugins_assets/redmine_attach_screenshot/ directory:
plugin_assets/redmine_attach_screenshot/javascripts:
total 16
-rw-r--r-- 1 apache apache  480 24 avril 10:20 attach_screenshot.js
-rw-r--r-- 1 apache apache 9321 24 avril 10:20 uploader_applet.jar

plugin_assets/redmine_attach_screenshot/stylesheets:
total 4
-rw-r--r-- 1 apache apache 624 24 avril 10:20 attach_screenshot.css

My Seconds question, are they similar plugins this allows paste screenshot in other format than png (Jpeg) ?

Thanks for help,

Actions #111

Updated by Marco Descher over 12 years ago

In Redmine-1.3.3 I face a new error, when using the redmine_attach_screenshot plugin:

It is not possible any more to use "Add another file". If the plugin is installed it does not work, if I remove it, however, it perfectly works again! Please see the enclosed screenshots Redmine 1.3.3 and redmine_attach_screenshot interfere and Redmine 1.3.3 without redmine_attach_screenshot works for examples.

Actions #112

Updated by William Roush over 12 years ago

Can everyone that is having issues please pull the latest master branch from here:

https://bitbucket.org/StrangeWill/redmine-inline-attach-screenshot/overview

And make sure the plugin folder is named: "redmine-inline-attach-screenshot", it should resolve all of the above issues (outside of OSX compatibility fix, though the Java source is included now for anyone that wants to tweak that!).

Actions #113

Updated by Paul Ohm over 12 years ago

Plugin is working for me on 1.4.1.stable.9526 although I did need to update my Java client for Windows.

Actions #114

Updated by Marco Descher over 12 years ago

Attachment problem solved with the newest redmine-inline-attach! Works for 1.3.3 :) Thanks!

Actions #115

Updated by William Roush over 12 years ago

In Redmine 2.0 they enforce folder names to match the plugin name, so the new folder name is "redmine_inline_attach_screenshot", you'll just have to pull into that folder and not just clone from Bitbucket.

Other than that, works in 2.0. :) We also maintain backwards compatibility with Redmine 1.x.

Actions #116

Updated by Angeline Lee over 12 years ago

I get the following error after clicking the Attach button on Redmine 1.4.3

Actions #117

Updated by William Roush over 12 years ago

Angeline Lee wrote:

I get the following error after clicking the Attach button on Redmine 1.4.3

Can you check logs/production.log and get me the relevant error?

Actions #118

Updated by Albert Yates over 12 years ago

Many of our users are getting the error that Angeline posted about. They are not getting it all the time, just some of the time.

Here is error from our Production.log:


Processing AttachScreenshotController#index (for 10.179.205.32 at 2012-06-18 09:56:45) [POST]
  Parameters: {"action"=>"index", "controller"=>"attach_screenshot", "key"=>"64d20a7957aba4d886ff47bdac32953ead08d127", "attachments"=>#<File:C:/Windows/Temp/RackMultipart20120618-5364-1itrzz6-0>}

ArgumentError (invalid value for Integer: "095645"):
  vendor/plugins/redmine_attach_screenshot/app/controllers/attach_screenshot_controller.rb:36:in `sprintf'
  vendor/plugins/redmine_attach_screenshot/app/controllers/attach_screenshot_controller.rb:36:in `make_tmpname'
  vendor/plugins/redmine_attach_screenshot/app/controllers/attach_screenshot_controller.rb:13:in `index'
  config/initializers/mongrel.rb:62:in `dispatch_cgi'

Rendering C:/redmine/public/500.html (500 Internal Server Error)
Actions #119

Updated by Jack Kurzecki over 12 years ago

Re: Albert and Angeline:
This is an old bug with an easy fix.
Take a look at note 82 above

Actions #120

Updated by Alex Last over 12 years ago

I submitted this request 3 years ago and it's still not resolved. I totally lost interest in it now.
how can I unsubscribe from this?..

Actions #121

Updated by Jean-Philippe Lang over 12 years ago

  • Subject changed from allow pasting screenshots like it's done in Jira to Allow pasting screenshots like it's done in Jira

Please, open a topic about this plugin and continue the discussion in the Plugins forum.
We track issues about Redmine core in this issue tracker, thanks.

Actions #122

Updated by Angeline Lee over 12 years ago

Jack Kurzecki wrote:

Re: Albert and Angeline:
This is an old bug with an easy fix.
Take a look at note 82 above

Thanks.It works now.

Actions #123

Updated by William Roush over 12 years ago

Jean-Philippe Lang wrote:

Please, open a topic about this plugin and continue the discussion in the Plugins forum.
We track issues about Redmine core in this issue tracker, thanks.

Actually let me back that up with post in the relevant plugin tracker (and please submit any fixes or improvements you have!):

http://www.redmine.org/plugins/redmine_attach_screenshot_2

https://bitbucket.org/StrangeWill/redmine-inline-attach-screenshot/issues?status=new&status=open

Actions #124

Updated by William Roush over 12 years ago

Update on this for possible Redmine patch:

Does anyone know how JIRA does it? HTML5? Java?

Actions #125

Updated by Sandro Camarao over 11 years ago

+1

Actions #126

Updated by Daniel Felix over 11 years ago

One idea could be to check (via JS) if the pasted data, or data that will be pasted, contains binary data. Only if the pasted data is plaintext, the text will be pasted inside the textfield. In all other cases, the text will be pasted to a hidden field in the background, which will be converted later on to a png (on the server).

Another idea is to convert the binary data to a .png on the client side, upload it with the ajax uploader and display it as usual.

Actions #127

Updated by dj jones about 11 years ago

This plugin we announced today - may do what is wanted - it will be released before end of December.

http://www.redmine.org/plugins/not-known-yet

It allows - without (java) in one issue to :

enter text
paste a screenshot direct from clipboard
enter more text
paste a screenshot
etc

and the images are visible in the issue and stay in that layout order (specifically -do NOT become attachments like any other file uploaded would).

I've mentioned it in the forum here:
http://www.redmine.org/boards/3/topics/40491

Actions #128

Updated by Arturo Bruno about 10 years ago

I forked an extension and build this functionality, among other small fixes that my company (Enova.mx) needed. Hope you guys find it usefull.

Fork: https://github.com/sayar/send-to-redmine
My extension: https://github.com/lordn-n/enova-fs-send-to-redmine

Actions #129

Updated by Takenori TAKAKI almost 6 years ago

I made a patch to attach image data from the clipboard, by adding a js code on attachment.js.
By applying this patch, user will be able to attach clipboard image on Issue, Wiki, Forum etc.

Actions #130

Updated by Go MAEDA almost 6 years ago

  • File pasted-image@2x.png pasted-image@2x.png added
  • Subject changed from Allow pasting screenshots like it's done in Jira to Allow pasting screenshots from clipboard
  • Category changed from UI to Attachments
  • Target version set to 4.1.0

I have tried out the patch and it works really fine. This 15 lines of patch add a long-awaited feature and I am sure that it should greatly improve user experiences.

I am setting the target version to 4.1.0.

Actions #131

Updated by Andreas Schnöppl almost 6 years ago

Why not take the clipboard image paste plugin?
https://www.redmine.org/plugins/clipboard_image_paste

  • Has short filenames
  • Has crop functionality
Actions #132

Updated by Go MAEDA almost 6 years ago

Andreas Schnöppl wrote:

Why not take the clipboard image paste plugin?

clipboard_image_paste is an excellent plugin but it will take a long time to merge to the Redmine core. The reasons are as follows:

  • No one has made a patch for Redmine core
  • Since the plugin introduces big changes to the UI, it is not easy to achieve a consensus on integrating it with the core. On the other hand, merging the tiny patch written by Takenori Takaki is much easier because it does not change any appearance and has no influence on the existing features

Although the patch does not have some features that clipboard_image_paste have, I think adding the simple image pasting feature would be a great improvement. Since the patch is ready, we can improve Redmine right now.

Actions #133

Updated by Kohei Nakamura almost 6 years ago

+1

"clipboard image paste" plugin is very nice and
I installed it all my Redmine.

But I can not use it in environments
where plugins can not be installed freely,
such as using redmine elsewhere.

Redmine which can not use this function is very disappointing.

So this patch is very wonderful !

Actions #134

Updated by Marius BĂLTEANU almost 6 years ago

Andreas Schnöppl wrote:

Why not take the clipboard image paste plugin?
https://www.redmine.org/plugins/clipboard_image_paste

  • Has short filenames

We can support this on the proposed patch.

  • Has crop functionality

Indeed, but I don't think that it is enough or it worth it to support this feature considering that are o lot of tools for screenshots available which do a better job. For example, I'm very happy with the default screenshots tool from OSx and as well, Windows has one (Snipping Tool). Besides crop, you will need most probably support for shapes, text, color and so on.

Go MAEDA wrote:

I have tried out the patch and it works really fine. This 15 lines of patch add a long-awaited feature and I am sure that it should greatly improve user experiences.

I think we should improve a little bit the patch before committing it. For example:
- we should check if clipboardData is available
- "wiki-edit" class doesn't mean automatically that a "files" input is available.

In conclusion, I'm in favour of adding a basic copy paste feature.

Actions #135

Updated by Go MAEDA almost 6 years ago

Marius BALTEANU wrote:

- "wiki-edit" class doesn't mean automatically that a "files" input is available.

You are right. For example, "textarea.wiki-edit" on /settings page don't accept attachments. Do you think that we can resolve that by replacing $(".wiki-edit") with $(".filedroplistner .wiki-edit")?

Actions #136

Updated by Takenori TAKAKI almost 6 years ago

Go MAEDA wrote:

Marius BALTEANU wrote:

- "wiki-edit" class doesn't mean automatically that a "files" input is available.

You are right. For example, "textarea.wiki-edit" on /settings page don't accept attachments. Do you think that we can resolve that by replacing $(".wiki-edit") with $(".filedroplistner .wiki-edit")?

Thank you for pointing out problems and suggesting solutions.
I changed the patch and attach it.

The changes are as follows.
  • replaced $ (". wiki-edit") --> $ (". filedroplistner. wiki-edit")
  • shortened file name (clipboard-yyyymmddhhmmss-randam7.png).

Actions #137

Updated by Marius BĂLTEANU almost 6 years ago

  • File attach_clipboard_images_v2.patch added

I've made some small changes to the patch, the most important is the check for e.clipboardData || e.originalEvent.clipboardData in order to not throw errors in the console when the clipboardData doesn't exist (for example: IE11).

Another changes:
- simplified the filename generation
- attach event using the existing logic.

The patch will not work in IE or Edge.

Takenori, Go, please let me know if you need more details about my changes.

Actions #138

Updated by Marius BĂLTEANU almost 6 years ago

  • File deleted (attach_clipboard_images_v2.patch)
Actions #140

Updated by Go MAEDA almost 6 years ago

Marius, thank you for reviewing and improving the patch.

- simplified the filename generation

The previous patch generates a filename like 'clipboard-201902181323-a1b2c3d.png'. I prefer to include a date like '20190217' in the filename because we can use issues filter to find issues that have screenshots attached on a specific date or in a specific period.

If the filename with date and time is too long, how about 'clipboard-20190218-a1b2c.png'? It is only 1 character longer than the patch you improved.

Actions #141

Updated by Marius BĂLTEANU almost 6 years ago

Go MAEDA wrote:

Marius, thank you for reviewing and improving the patch.

- simplified the filename generation

The previous patch generates a filename like 'clipboard-201902181323-a1b2c3d.png'. I prefer to include a date like '20190217' in the filename because we can use issues filter to find issues that have screenshots attached on a specific date or in a specific period.

If the filename with date and time is too long, how about 'clipboard-20190218-a1b2c.png'? It is only 1 character longer than the patch you improved.

I don't have any preference for the filename, I chose to change it only because I found it simpler to have 1 line of code instead of 4 lines. You can revert my change.

Actions #142

Updated by Go MAEDA almost 6 years ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch. Now you can paste images from clipboard if you use modern browsers except for Edge and IE11.

I modified the patch to generate a filename like 'clipboard-yyyymmddHHMM-a1b2c.png' that is a bit shorter than Takenori TAKAKI's patch.

Thank you for improving Redmine. I am closing this 9 years old issue.

Actions #143

Updated by Go MAEDA almost 6 years ago

  • Has duplicate Feature #331: Allow to insert a screen shot easily added
Actions #144

Updated by Go MAEDA almost 6 years ago

Actions #145

Updated by Kohei Nakamura almost 6 years ago

Thank you MAEDA-san .

I tested Redmine 4.0, but unfortunately the "clipboard image paste plugin" did not work.
It will be a great feature to many Redmine 4.x users!

I am also very grateful to the author of "clipboard image paste plugin".
https://github.com/peclik/clipboard_image_paste

Thank you for a wonderful idea.

Actions #146

Updated by Go MAEDA over 5 years ago

  • Related to Patch #31169: Wiki syntax help for document image pasting and drag/drop embedding added
Actions #147

Updated by Go MAEDA about 5 years ago

  • Related to Defect #32469: Text copied from some applications such as MS Office and LibreOffice is pasted as an image in addition to plain text added
Actions #148

Updated by Go MAEDA about 5 years ago

  • Status changed from Closed to Reopened

An issue when the clipboard has both text and image has been reported as #32469.

Actions #149

Updated by Jean-Philippe Lang about 5 years ago

  • Status changed from Reopened to Closed

#32469 assigned to 4.1.0, let's keep this one closed.

Actions #150

Updated by Marius BĂLTEANU about 5 years ago

Actions #151

Updated by Charlie CQ almost 5 years ago

Jean-Philippe Lang wrote:

#32469 assigned to 4.1.0, let's keep this one closed.

Just want to clear, is this function is only for default Markdown Redmine editor not Ckeditor?

Actions #152

Updated by Marius BĂLTEANU almost 5 years ago

Charlie CQ wrote:

Jean-Philippe Lang wrote:

#32469 assigned to 4.1.0, let's keep this one closed.

Just want to clear, is this function is only for default Markdown Redmine editor not Ckeditor?

I don't think that you will find a response here because Ckeditor is not part of Redmine core. You should ask plugin maintainers.

Actions #153

Updated by dj jones over 3 years ago

This solution is fine - and it attaches as a file, with a file name.

If you wanted it NOT as an attachment, but to be visible in the body of the ticket -this plugin provides it:

https://www.redmine.org/plugins/redmine_image_clipboard_paste

Actions #154

Updated by Igor M over 3 years ago

Takenori TAKAKI wrote:

Go MAEDA wrote:

Marius BALTEANU wrote:

- "wiki-edit" class doesn't mean automatically that a "files" input is available.

You are right. For example, "textarea.wiki-edit" on /settings page don't accept attachments. Do you think that we can resolve that by replacing $(".wiki-edit") with $(".filedroplistner .wiki-edit")?

Thank you for pointing out problems and suggesting solutions.
I changed the patch and attach it.

The changes are as follows.
  • replaced $ (". wiki-edit") --> $ (". filedroplistner. wiki-edit")
  • shortened file name (clipboard-yyyymmddhhmmss-randam7.png).

Tell me, where can I change it so that when ctrl+v is used, the image is inserted as

{{thumbnail(image.png)}} 

and not
!image. png!

?

Actions #155

Updated by Mischa The Evil over 3 years ago

Igor M wrote:

[...]
Tell me, where can I change it so that when ctrl+v is used, the image is inserted as [...]?

There doesn't exist such a setting. Please add a new feature request if you want to request such a feature as this issue has been implemented and closed already.

Actions

Also available in: Atom PDF