Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Attachments

1457910

Comments

  • I'm having some trouble with this extension. The upload works fine but when I click on the uploaded files in the forum I just get a "Save as" box. When I click on a image I want it to display the image in the browser and if I click on let say an pdf I want the pdf-reader appear inside the browser as it usually does. Does anyone have an idea why it want to save the file instead of open it? Edit: Solved, my gd-lib wasn't properly installed.
  • Yeah, there's definitely a WarningCollector bug in this Addon from the "Start a New Discussion" page. You can test it out by trying to start a new discussion with a comment that's way too long. Instead of showing the usual "Your comment is too long" error, you just get a blank page. Oddly enough, the WarningCollector works fine on normal "Add a Comment" pages. So, I tried bschultz's fix (above), but it's giving me "Call to a member function Iif() on a non-object" error. Can anyone see what the problem is or suggest a better fix to reinstate the WarningCollector on the Start a New Discussion page?
  • I'm having some trouble with this extension. When I use language=English it works fine but when I choose Swedish the uploads dosen't work. Any know why?
  • [bump]

    Does anyone know how to fix this WarningCollector bug? I'm getting an error when I try to implement the proposed fix.

    (Or can the fix be implemented into the Add-On?? (Jazzman)?)
  • I can confirm dan39's and bschultz's problem, but the fix doesn't work for me either. I receive a "Not Found
    The requested URL /forum/discussion/test-for-no-category-chosen/ was not found on this server." error.
    When adding the proposed fix I get a blank page. (vanilla 1.1.3)
  • bump - has no-one has an idea for solving this fairly serious problem?

    Sticking an echo in the if statement shows that the condition is true (DiscussionID is empty) but it stalls with the initiation of the error reporting.
    if(empty($Discussion->DiscussionID) || $Discussion->DiscussionID == '') { return $Context->WarningCollector->Iif(); }
    (excerpted from #113 above)

    Is the WarningCollector call incomplete, or not in the right context? I've tried all manner of alternatives but without success...
  • *bump again* (and sorry to nag)

    I mailed jazzman, and he knows about it, but he doesn't have much time at the moment.
  • Hi everybody!
    Would appreciate any help, I have the same problem as vxw mentioned earlier link to his comment(but see also his 2 more posts below) , except that I have done a server change.

    Problem is that version 2 of Attachments doesn´t seem to install itself properly. Neither a upload bar nor a section under Settings appears.
    Version 1.4.1 does these things (bar and Attachment settings), but when I try to upload anything nothing will be uploaded though he doesn´t give an error message.

    I installed everything like I think it should be and was reading lots of relevant threads. Upload-directory exists with chmod777, as well as the Attachment settings (v1.4.1) displays the right path.
    I tried to reinstall it various times and used opera,IE and Firefox to test.
    Also I deactivated all other addons.

    Furthermore I installed already some other addons, such as a sidebar, the google-calendar application and a "latest discussions"-addon.
    One thing that didn´t work was the Avatar-addon (AccountPictures) by Jazzman.

    As I said, any help would be really appreciated, thanks in advance

    p.s.: why is my html-link not displayed properly? *confused*



    O.k., I finally found the solution by accident. The problem is my webhost, which doesn´t support PHP Upload. (I never heard you can permit PHP, but forbid Upload, that´s why I didn´t check that option).
    So there´s no work-around for me unfortunately :(
  • Hi!

    I've made some changes in the default.php of this extension to fix the problem that the mime wasn't set correctly at download.

    Here are my changes:

    154c154 < $this->MineType = ""; --- > $this->MimeType = ""; 170c170 < $this->MineType = @$DataSet['MineType']; --- > $this->MimeType = @$DataSet['MimeType']; 357c357 < $this->SaveAsDialogue($Path, $Attachment->Name); --- > $this->SaveAsDialogue($Path, $Attachment->Name, 0, $Attachment->MimeType); 363c363 < function SaveAsDialogue($FolderPath, $FileName, $DeleteFile = '0') { --- > function SaveAsDialogue($FolderPath, $FileName, $DeleteFile = '0', $MimeType) { 372,374c372 < header('Content-Type: application/force-download'); < header('Content-Type: application/octet-stream'); < header('Content-Type: application/download'); --- > header('Content-Type: '.$MimeType);

    Now the header contains the the right content type.
  • I just tried out bshultz solution and it didnt work for me either. I recieved the following: <code> Notice: Undefined variable: Context in /home/.pilar/xxx/xxxxxxx.com/forums/extensions/Attachments/default.php on line 707 Notice: Trying to get property of non-object in /home/.pilar/xxxx/xxxxx.com/forums/extensions/Attachments/default.php on line 707 Fatal error: Call to a member function Iif() on a non-object in /home/.pilar/xxxxx/xxxxxxx.com/forums/extensions/Attachments/default.php on line 707</code>
  • Someone tell me I'm not crazy!

    It took me forever to get this working, but I finally did it. I can attach files and view them, and even download them off the forum properly however, there is one problem. Where in the heck are my files being stored? When I log onto FTP and go to the directory that I specified, I see nothing. Yet, the images are... somewhere... they appear on my forum just fine. I just thought I would clear out all of my test images, but now I can't find where they uploaded to.



    Uhhh, nevermind. I have both public_html and www, and I was mucking around in www. In previous experience, www and public_html have always been exact copies, in fact I just thought www was a redirect to public_html. Guess not? Well, at any rate, I found them.
  • Don't worry mate, you're not the first to fall for that one!

    When I start work on a new server, I work out which is what and bookmark it in my FTP application then I never need worry about it again.
  • www should be a symbolic link (which is pretty much a redirect) to public_html. If not your host is messed up methinks.
  • Has anyone found a solution to the WarningCollector Bug?!?!? Could really use some help on figuring out what's wrong here.
  • hey, does this work with freindly URLs yet??? i heard they were kinda non-compatible....
  • Has anyone found a solution to the WarningCollector Bug?!?!?
    ditto *bump*
  • Howdy! I'm getting this error all over the place -- particularily on the login panel and when checking/unchecking add-ons:

    // Attachments Table Structure $DatabaseTables['Attachment'] = 'Attachment'; $DatabaseColumns['Attachment']['AttachmentID'] = 'AttachmentID'; $DatabaseColumns['Attachment']['UserID'] = 'UserID'; $DatabaseColumns['Attachment']['DiscussionID'] = 'DiscussionID'; $DatabaseColumns['Attachment']['CommentID'] = 'CommentID'; $DatabaseColumns['Attachment']['Title'] = 'Title'; $DatabaseColumns['Attachment']['Description'] = 'Description'; $DatabaseColumns['Attachment']['Name'] = 'Name'; $DatabaseColumns['Attachment']['Path'] = 'Path'; $DatabaseColumns['Attachment']['Size'] = 'Size'; $DatabaseColumns['Attachment']['MimeType'] = 'MimeType'; $DatabaseColumns['Attachment']['DateCreated'] = 'DateCreated'; $DatabaseColumns['Attachment']['DateModified'] = 'DateModified'; ?>

    Any idea where this is coming from?
  • How does the error appear?
  • I have a feeling this *might* have been reported somewhere, but browsing through the comments, I can't find any mention of it. If I start a NEW discussion, WITH an attachment, all is lost and I get dumped back to the front page. I'm using Attachment, with Inline Images and Multi Files. I'm also using Friendly Urls, which I'm wondering might be the issue. I'm trying to do some bug testing now.
  • Let me echo spode's concern, adding specifics to my particular case.

    When I attempt to initiate a discussion with an attachment, Vanilla goes to /comments.php and displays:
    Some problems were encountered
    The requested discussion could not be found.
    It's probably an extension conflict, so I'm trying to isolate the offending one — which is a bit tedious since my installation has so many of them!

    (A fresh installation with Attachments and Multi File Upload will not have this problem.)
Sign In or Register to comment.