Installed and enabled comment_upload for exchanging PPT files. With everything enabled and configured, I attempted a test comment and attached a .ppt file. When I preview the comment, I see no attachment. (FYI, the forum topic also has a .ppt attachment; this attachment uploaded to the Files directory and is visible below the forum topic text. However, the .ppt attached to a comment did not.) I tried a couple of different file types to see whether the fact that it was a .ppt file might be an issue for some reason; tried both a .pdf and a .doc file and they also failed to upload.
I'm fairly new to Drupal, so I'm hoping for some guidance to troubleshoot this issue. I marked this as "critical" in priority only because it seems to render the module unusable for its intended purpose.
Thanks in advance -- I realize this project doesn't have a maintainer right now. :{
jrd
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | screenshot3.JPG | 39.68 KB | jrdixey |
Comments
Comment #1
jrdixey commentedVersion is actually 5.x-0.1 (release).
Comment #2
heine commentedComment #3
heine commentedDowngrading to normal, as I cannot reproduce.
- Can you please check uploading with a small .txt file?
- Is uploading to nodes with the upload module still working?
- What happens when you select a file for attachment and then immediately post the comment?
- Did you override theme_comment_attachments() ?
- Do you use any modules that affect uploads?
Comment #4
jrdixey commentedHello Heine,
Here is a more complete description of the problem:
I click Add new comment below a Forum topic.
I see the Attachment field and a Browse ... button next to it.
Below that, I see a Preview comment button.
I can attach a file and then hit Preview comment.
It seems to be uploading the attachment, and then I see both a Preview comment and a Post comment button.
I hit Post comment. Now the comment appears, but there is nothing showing an attachment below the comment.
There is just a >>, and below that, "delete | edit | reply".
(Screenshot attached.)
After hitting Attach, I also don't see the whole File attachments box, the line "Changes made to the attachments are not permanent until you save this post", the List checkbox, the filesize for the attachment, or the location where it will be uploaded.
When I leave the forum area and look at the Files folder, I cannot see the attachment that I attempted to upload.
I hope that presents a fuller picture. I am sure I just missed something, because I've seen this module working well in other sites.
To answer your questions:
- Can you please check uploading with a small .txt file?
I have reproduced this with small .pdf and .doc files, and now with a small .txt file as well. The upload size limit for Upload and Comment Upload is 10MB and has been changed in PHP settings as well, so file size should not be an issue.
- Is uploading to nodes with the upload module still working?
Uploading to nodes works fine.
- What happens when you select a file for attachment and then immediately post the comment?
This option is not available -- only Preview comment.
- Did you override theme_comment_attachments() ?
No. Should I do so? And with what?
- Do you use any modules that affect uploads?
Possibly. The modules other than Core and Core-optional ones (including Upload) are:
CCK (Content, Content Copy, Fieldgroup, Node Reference, Number, Option Widgets, Text, and User Reference)
Location (GMap, GMap Location, GMap Macro Builder, GMap Views Integration)
Other (Comment Upload)
Views (Views, Views RSS, Views Theme Wizard, Views UI)
Not all of the above are enabled -- GMap Views Integration and GMap Location are both disabled.
Thanks
jrd
Comment #5
heine commentedOn the comment settings page (admin/content/comment/settings), you can set comment previews to "Optional", which would allow you to test a direct post of an attachment.
This even might show you some errors.
- What version of Drupal are you using?
- Can you try this with the Garland theme?
Comment #6
jrdixey commentedHi Heine,
Thanks for taking a look. I'm now playing with 6.9 (separate install) to see if I can do what I need to do there instead. Meanwhile, on the 5.x version ... to answer your questions:
- Drupal 5.15
- Theme was customized by a previous developer, don't know what it was based on
- I will try with Garland theme
I'll also try setting comment previews to Optional (thanks for that tip) and let you know what I find out!
jrd
Comment #7
jrdixey commentedHi again,
I changed the comment previews to Optional and tested a direct post of an attachment. No errors, but the behavior is the same as shown in the screen shot I previously uploaded.
Trying Garland theme next.
jrd
Comment #8
avpadernoIsn't this module used on http://drupal.org too?
-- Kiam
Kiam la luno renkontas la sunon
Comment #9
jrdixey commentedTried the Garland theme, also Bluemarine just to see what it would do. Other than changing the appearance of the page slightly, in both cases, the behavior was the same as shown in the previously uploaded screen capture.
In addition to the file apparently not being uploaded, I'm confused by the absence on my site of the "File Attachments" box that I see on drupal.org's comment attachment area. I'm referring to the box that says "File attachments" at the upper left and has a line around it, with the phrase "Changes made to the attachments are not permanent until you save this post". I don't see it on my site at all. Is it controlled by some other module? All I see on my site is the word "Attachment:" followed by a field and a Browse ... button (and the preview/post buttons). This is the same under all themes that I've tried so far (Garland, Bluemarine, and the custom theme).
Thanks much,
jrd
Comment #10
jrdixey commentedKiam,
I believe it is used on drupal.org -- as well as on other drupal sites I've run across -- unless something else is allowing comments to have attachments on those sites (the only other option I know of involves using FileField, which requires PHP5.2, and I can't do that at this point due to potential conflicts with a live site with unknown customizations, which is running on PHP4).
If you look at the usage statistics for Comment_upload, it seems to be a very popular module for D5.x sites, and even quite a few for D6.x even though it's still in -dev for D6.x. So I'm sure there's a configuration change that I need to make or something else simple that will make it work.
jrd
Comment #11
avpadernoIf the module is also used on Drupal.org, then the issue you are describing should be visible on this web site as well, if it would be a bug.
Maybe the problem is related with the theme being used, or maybe the used theme has an issue that doesn't allow it to be used with this module.
Comment #12
jrdixey commentedHi Kiam,
Yes, I'm sure it's something to do with my specific setup. Probably not the theme, though, since it does the same thing under all 3 themes tested.
jrd
Comment #13
heine commentedCan you go to admin/settings/uploads and set Attachments on comments to Multiple?
Comment #14
avpadernoIf the issue is caused by the specific setup of your web site, then it's not a bug. If it would be a bug, the issue would be present in all web sites using the module (including Drupal.org).
Comment #15
jrdixey commentedHi Kiam,
Heine helped me figure this out -- apparently it might be a bug only in the single-attachments mode (since multiple attachments mode works as expected).
Thanks for looking into it.
jrd
Comment #16
jrdixey commentedHi Heine,
That worked. Notes below.
- Changed "Attachments on comments" setting in Admin/site config/file uploads to multiple
- Tested, worked as expected, upload dialog appears functional, file uploads to /files folder as expected
- Changed "Attachments on comments" setting in Admin/site config/file uploads back to single
- Behavior as described earlier - no attachment file visible on comment after uploading, nothing uploaded to Files folder
- Changed "Attachments on comments" setting back to mutiple
- Tested, worked as expected
Come to think of it, every site where I've seen comment_upload working, has been set to allow multiple attachments. Perhaps there really is a bug, but it's only somewhere in the single attachment code? At any rate, the multiple-attachments mode will work fine for my purposes.
Thank you very much for helping me work this out! I look forward to learning more about Drupal and contributing back somehow.
jrd
Comment #17
heine commentedjrdixey, thank you for your persistance. Yes, this is a bug.
Comment #18
dwwThe 5.x versions of this module are no longer supported.