bbPress Plugin Browser »

bbPress Attachments (0.2.9)

Download

Version: 0.2.9

Last Updated: 2011-11-28

Requires bbPress Version: 0.9 or higher

Compatible up to: 0.9

Author Homepage »

Plugin Homepage »

Donate to this plugin »

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(20)

Your Rating

Author: _ck_


  1. I'll definitely try 0.1.1 when it's up here, thanks.

    When a post is edited there are no attachments listed. It's as if the files themselves are uploaded but somehow not attached to the post. Although, the thread list does display the paperclip icon, denoting there are attachments, even though they seem to not be available.

    No failure messages display during the uploads. It's as if everything is A.O.K. but then isn't, you know?

    I'm running bbPress on a Joyent Accelerator, which is OpenSolaris.

    Posted: 4 years ago #
  2. Oh I see "Joyent Accelerators" is yet another marketing term for a VPS, lol, there are a bunch of alternate words for that. Your OS is unusual but I don't see how it could affect this.

    For the files to be moved to the accepted storage area, it should also write the results to the mysql db. For you not to get a list of attachments, it's probably not in the mysql db.

    Do you know enough and have something like phpmyadmin that you can inspect the bbpress table "bb_attachments" to see if any data is being written there at all?

    I'll have to add some code to the debug feature to dump what's in the table to make this easier.

    Posted: 4 years ago #
  3. Just tried 0.1.1 and had the same results. I can see the file got uploaded without an issue to the bb-attachments directory:

    -rwxrwxrwx 1 webservd webservd 41207 May 11 10:18 16.Photo_24.jpg

    However, as with 0.1.0, for whatever reason, the attachment does upload but never displays along with the post. :'(

    Posted: 4 years ago #
  4. I'll add some code to the debug mode to dump whatever's in the mysql table, which I suspect is empty for you. But not sure what that means or how to fix it, now that I think about it. However it's a start.

    Is your bbpress setup with any unusual db name or weird integration?

    Posted: 4 years ago #
  5. Many thanks. I'm more than happy to help in whatever capacity you need. :-)

    Nothing out of the ordinary. The bbPress install is integrated with a WP install but with nothing advanced. Essentially just straight out of the box, configuring the very few WP integration options available. Last thing...even with only this plug-in activated I get the same problem, so I don't think it's a plug-in conflict of any sort.

    Anyhow, just hit me up with whatever you need. Thanks!

    Posted: 4 years ago #
  6. jark, it's occured to me that since your file had a "16." on it, that the mysql auto-increment is working because my routine reads the number back from the db before assigning it to the file.

    I want you to upload files to an existing post while editing it, not a new post, and see if it gives you a list of files that were uploading in the post-status message?

    Do you use a custom theme that you've made yourself? Does your header.php template have a <?php bb_head(); ?> near the end? I've recently found several people who have left off bb_head and bb_foot from their templates which causes no end of unexpected behaviors.

    Posted: 4 years ago #
  7. ah ha...might be on to something. i edited an existing post, as you said, and tried to upload a file and got the following:

    bbPress database error: [Column 'user_ip' cannot be null]
    INSERT INTO bb_attachments(time,post_id,user_id,user_ip,status,size,ext,mime,filename) VALUES ('1210599919', '8' , '5' , inet_aton('') , 0, '67996', 'jpg', 'image/jpeg', 'Photo_5.jpg')

    Uploads
    
       1. Photo_5.jpg (66.4 KB) error: failed

    While I am using a custom theme, it is mainly a CSS-based modification to kakumei. Although I have replaced some files, header.php and footer.php are the default kakumei files, both of which do have those functions in the appropriate places.

    Any ideas based on the error above? Many thanks for the assistance!

    Posted: 4 years ago #
  8. Well it's a different kind of error (the fact you have 16. on a previous upload means it actually worked at one point) but it is interesting in that shouldn't fail like that. I don't see how IP could ever be null unless your server doesn't make $_SERVER vars available to PHP for some weird reason.

    Can you make a temporary phpinfo.php page? Do you know how to do that? put <?php phpinfo(); ?> into a phpinfo.php file and make it available over the web.

    Update, oh it might be related to the old style method I use to access server vars. Might be time to update that. Can't remember why I still use it though, there was a reason.

    Try replacing it with this modified 0.1.1 directly from here:
    http://plugins-svn.bbpress.org/bb-attachments/trunk/

    Posted: 4 years ago #
  9. That seems to have solved the problem. Twas the server variable line change you made.

    Many thanks for your assistance with this problem. If you need me to test anything else out it is my pleasure.

    Posted: 4 years ago #
  10. I unfortunately use that old method on a few of my other plugins which I will update over time. So keep that in mind if you discover problems with any of my other plugins and let me know. What version of PHP were you using btw?

    Posted: 4 years ago #
  11. I'll definitely keep that in mind with other plug-ins. If I run in to any similar problems I'll make the same modification. Many thanks for the help!

    [wibberdiggity:~] jark$ /opt/csw/php5/bin/php -v
    PHP 5.2.1 (cli) (built: Mar 15 2007 12:08:55)
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

    Looks like I'm running 5.2.1 at the moment.

    Posted: 4 years ago #
  12. Hey,

    Just upgraded to 0.1.1 and started noticing this whenever I try to add a new topic:

    Warning: Variable passed to each() is not an array or object in /var/www/bbpress/my-plugins/bb-attachments/bb-attachments.php on line 221

    Warning: Cannot modify header information - headers already sent by (output started at /var/www/bbpress/my-plugins/bb-attachments/bb-attachments.php:221) in /var/www/bbpress/bb-includes/pluggable.php on line 228

    The topic gets added fine but I'm not sure why I get the error. Thoughts?

    Posted: 4 years ago #
  13. tom.a thanks for the report - try this replacement:
    http://plugins-svn.bbpress.org/bb-attachments/trunk/bb-attachments.php
    (or download the full install again)

    Posted: 4 years ago #
  14. Awesome plugin. Anyway for uploads to be allowed when a New Topic is being created instead of just replying to a post?

    Posted: 4 years ago #
  15. w3designstudios, if you are using the newest version of bbpress you should be seeing "Upload Files from your Computer" below the new topic area?

    Posted: 4 years ago #
  16. I'm only seeing it on the reply and I just downloaded the newest version for sanity's sake. Do I need to add that snippet of code into another file besides 'edit-post.php' for it to work on the new post form. I've just started working with bbPress so I'm a little uncertain of the file structure right now. Thanks!

    Posted: 4 years ago #
  17. @_ck_

    Tried copying that new bb-attachments.php over but I still had the same issue when I reactivated the plugin.

    Posted: 4 years ago #
  18. @ w3designstudios, you no longer need to add any code to any template with the newest bbPress (0.9.0.2) - what theme are you using, is it something custom?

    @tom.a : The error is occuring because it thinks there are upload attachments when there actually aren't any. Should never happen and I thought my added code should deal with that, but apparently not.

    What can you tell me about your server/php setup, other plugins and what browser are you trying this with?

    Posted: 4 years ago #
  19. Nope, just a default install. I just reinstalled bbPress and verified it's 0.9.0.2. Also re-upped the plugin and I'm seeing the upload fields when editing a post or posting a reply, just not when actually adding a new topic by clicking on a forum with the "New Topic in this Forum" heading.

    Posted: 4 years ago #
  20. @_ck_

    I'm using Ubuntu 8.04, php5 (5.2.4-2ubuntu5), apache2.2, and the following plugins on the server with the latest version of bbpress:

    akismet (1.0)
    bbPress Signatures (0.1.9)
    Allow Images (0.7.1)
    Read-Only Forums (0.0.5)
    bbPress Avatars (0.2)

    This happens to me in Firefox 2 on Linux. I haven't tried any other browsers yet.

    Hope that helps. Let me know if there's anything else I can provide.

    Posted: 4 years ago #

RSS feed for this topic

Add a Comment »

You must log in to post.