Can't delete attachments / Can't add multiple attachments and more - 2.0.3 + puma
Added by Måns Andersson about 12 years ago
Hi
I'm using Redmine 2.0.3 stable with the puma server (http://puma.io) on windows. It all seemed to work the first couple of days/weeks but I'm now experiencing some weird problems. Don't know if they are bugs or just bad configuration. Can you help me? :-)
I'm thinking it has something to do with puma.io, I used to run it under mongrel but since 2.0.3 that didn't work so I choosed puma based on what I could read about it on this page. I'm using the following approach to starting puma: http://www.redmine.org/projects/redmine/wiki/HowTo_run_Redmine_as_a_Windows_service_(win32-service_+_taskill_approach)
Can't delete attachments
When I click on the trash icon next to an attachment (let's give it id 530) I get linked to the image (i.e. the image is displayed in front of me). The link address is http://127.0.0.1/attachments/530.
Can't add multiple attachments
When I press the link "Add another file" nothing happens. Looking inside the javascript debug output is says "addFileField is not defined".
Some css images don't load
Some of the css images dont load. Instead I'm served with the prototype.js file. If I navigate to the directory all the files are there.
Replies (18)
RE: Can't delete attachments / Can't add multiple attachments and more - 2.0.3 + puma
-
Added by Etienne Massip about 12 years ago
Not sure it is related to Puma; did you upgrade from a previous version of RM and are you sure that your application.js file is the right one?
RE: Can't delete attachments / Can't add multiple attachments and more - 2.0.3 + puma
-
Added by Måns Andersson about 12 years ago
Yes, upgraded from 1.3.x. No the application.js is wrong apparently. I get served the prototype.js file there too although the appliacation.js in the javascripts directory is the correct one (or at least has a Redmine file header).
RE: Can't delete attachments / Can't add multiple attachments and more - 2.0.3 + puma
-
Added by Etienne Massip about 12 years ago
You might be serving static content with Apache via a Location directive pointing to the old asset path?
RE: Can't delete attachments / Can't add multiple attachments and more - 2.0.3 + puma
-
Added by Måns Andersson about 12 years ago
I'm not using Apache. Just running puma barebones as a service ( http://www.redmine.org/projects/redmine/wiki/HowTo_run_Redmine_as_a_Windows_service_(win32-service_+_taskill_approach)
RE: Can't delete attachments / Can't add multiple attachments and more - 2.0.3 + puma
-
Added by Etienne Massip about 12 years ago
So that could be an outdated local browser cache version of .js?
Try cleaning your browser cache or refresh the page using CTL+F5 / CTL+R?
RE: Can't delete attachments / Can't add multiple attachments and more - 2.0.3 + puma
-
Added by Etienne Massip about 12 years ago
Måns Andersson wrote:
(...) although the appliacation.js in the javascripts directory is the correct one (or at least has a Redmine file header).
It should contain a addFileField
function, does it?
RE: Can't delete attachments / Can't add multiple attachments and more - 2.0.3 + puma
-
Added by Måns Andersson about 12 years ago
Etienne Massip wrote:
Try cleaning your browser cache or refresh the page using CTL+F5 / CTL+R?
Already tried that, no luck. Even tried different browsers.
Etienne Massip wrote:
It should contain a addFileField function, does it?
Yes it does
RE: Can't delete attachments / Can't add multiple attachments and more - 2.0.3 + puma
-
Added by Etienne Massip about 12 years ago
Any plugin installed?
RE: Can't delete attachments / Can't add multiple attachments and more - 2.0.3 + puma
-
Added by Måns Andersson about 12 years ago
Yes, Redmine Wiki Extensions (https://bitbucket.org/haru_iida/redmine_wiki_extensions/downloads)
I am also using the Alternate theme if that helps.
RE: Can't delete attachments / Can't add multiple attachments and more - 2.0.3 + puma
-
Added by Etienne Massip about 12 years ago
You can try with no plugin if it helps.
Are you saying that your browser uses an application.js
file different than the one located in your public/javascripts
folder?
RE: Can't delete attachments / Can't add multiple attachments and more - 2.0.3 + puma
-
Added by Måns Andersson about 12 years ago
I'm disabling the plugin as we speak.
Yes, the web server is serving the prototype.js file instead of the application.js file located in public/javascripts
RE: Can't delete attachments / Can't add multiple attachments and more - 2.0.3 + puma
-
Added by Måns Andersson about 12 years ago
Same problems without plugins.
Even the application.css file is now served as the prototype.js file some times.
RE: Can't delete attachments / Can't add multiple attachments and more - 2.0.3 + puma
-
Added by Etienne Massip about 12 years ago
Måns Andersson wrote:
Yes, the web server is serving the prototype.js file instead of the application.js file located in public/javascripts
What do you mean, how do you check this?
Browser should download both files!
RE: Can't delete attachments / Can't add multiple attachments and more - 2.0.3 + puma
-
Added by Måns Andersson about 12 years ago
Etienne Massip wrote:
Måns Andersson wrote:
What do you mean, how do you check this?
I clear my browser cache and visit http://127.0.0.1/javascripts/application.js and I get the prototype.js file. Same thing for when I visit http://127.0.0.1/images/ticket.png I get prototype.js instead of image.
RE: Can't delete attachments / Can't add multiple attachments and more - 2.0.3 + puma
-
Added by Måns Andersson about 12 years ago
I did some additional tests and it seems there's a problem with the domain
If I visit http://127.0.0.1/javascripts/application.js?1343120737 I get the correct file
If I visit http://mydomain.org/javascripts/application.js?1343120737 I get prototype.js.
Should I specify my domain name somewhere after upgrading?
RE: Can't delete attachments / Can't add multiple attachments and more - 2.0.3 + puma
-
Added by Måns Andersson about 12 years ago
I've been doing some more research and it seems to me that rack has cached the wrong file and thereby is the server returning the wrong file.
I came to the conclusion by clearing my browser cache and surfed to the address in the post above
For the 127.0.0.1 address I got the following in the HTTP header
X-Rack-Cache: miss, store
versus the following when I visit mydomain.org
X-Rack-Cache: stale, valid, store
How do I clear my rack cache? Restarting puma and the server does not work.
RE: Can't delete attachments / Can't add multiple attachments and more - 2.0.3 + puma
-
Added by Måns Andersson about 12 years ago
I found the directory Redmine\tmp\cache
which I cleared. Then I cleared my browser cache and now it all works fine.
Thanks for all the help.
RE: Can't delete attachments / Can't add multiple attachments and more - 2.0.3 + puma
-
Added by Etienne Massip about 12 years ago
Nice catch, forgot about this cache!