WordPress.org

Ready to get started?Download WordPress

Forums

User Submitted Posts
[resolved] Images Don't Display After Uploading (34 posts)

  1. boyce1
    Member
    Posted 1 year ago #

    I've installed the plugin, created a page with the form and that works fine.

    However, the images upload but I can't get them to display in the post.

    I've read that you need in insert <?php post_attachments(); ?> in "the loop" but I have no idea what that might be.

    I'm using the Weaver II theme and have tried inserting it in page.php but it didn't work and I really don't know WHERE it should be placed.

    Any help appreciated!

    http://wordpress.org/extend/plugins/user-submitted-posts/

  2. studio500
    Member
    Posted 1 year ago #

    I think a lot of peeps are asking the same question but it looks like this plugin has been abandoned.
    You could try the plugin WP User Frontend. It didn't work on my theme, possibly due to a plugin clash but it might be worth a go.

    It's the only other similar plugin I can find that is current.

  3. boyce1
    Member
    Posted 1 year ago #

    studio500,

    I think you're right about this plugin being abandoned - too bad, it seemed like it had good potential!

    Thanks so much for the tip, I'll give it a try. Much appreciated!

  4. TheGyrlWonder
    Member
    Posted 1 year ago #

    Nothing?

  5. li5433243
    Member
    Posted 1 year ago #

    Oh...
    this plugin has been abandoned.
    God

  6. Jeff Starr
    Member
    Plugin Author

    Posted 1 year ago #

    Nope, not abandoned, just been super-busy. User Submitted Posts is now updated with all sorts of new features, improvements, and bug-fixes.

    For images not loading or displaying, there are several things to check:

    • Check the permission settings on the upload folder(s) by ensuring that you can successfully upload image files thru the Media Uploader.
    • Double-check that all the image-upload settings make sense, and that the images being uploaded meet the specified requirements.

    Note: when changing permissions on files and folders, it is important to use the least-restrictive settings possible. If you have to use more permissive settings, it is important to secure the directory against malicious activity. For more information check out http://digwp.com/2012/09/secure-media-uploads/

  7. boyce1
    Member
    Posted 1 year ago #

    Hi Jeff,

    Glad to hear you're still working on this!

    Just updated to your new version and now when I attempt to use it I get this error:

    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/whyboys/www/www/w/wp-content/themes/weaver-ii/header.php:14) in /home/whyboys/www/www/w/wp-content/plugins/user-submitted-posts/views/submission-form.php on line 5

    If I submit a post it does show up as pending, however, as before the image is still not attached and again it DOES show up in the post's gallery but not in the body of the post itself.

    Running WordPress 3.4.2

    Thanks!

  8. Jeff Starr
    Member
    Plugin Author

    Posted 1 year ago #

    Try this:

    Open submission-form.php and locate this code (on line 5):

    session_start();

    Replace that line with this:

    if (!isset($_SESSION)) {
         session_start();
    }

    Let me know how it goes!

  9. boyce1
    Member
    Posted 1 year ago #

    Hi Jeff,

    I gave it a try but I get the same error message. Just the clarify the file I modified was in /plugins/user-submitted-posts/views/submission-form.php

    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/whyboys/www/www/w/wp-content/themes/weaver-ii/header.php:14) in /home/whyboys/www/www/w/wp-content/plugins/user-submitted-posts/views/submission-form-classic.php on line 5

    But now the image does not show up in the posts gallery.

  10. Jeff Starr
    Member
    Plugin Author

    Posted 1 year ago #

    Yes that is the correct file.. to investigate further it would help to have a copy of the "/themes/weaver-ii/header.php" file, if you can send it zipped to jeff at perishablepress dot com I'll be glad to take a look.

  11. Jeff Starr
    Member
    Plugin Author

    Posted 1 year ago #

    Just noticed something.. please try adding the same code:

    if (!isset($_SESSION)) {
         session_start();
    }

    to the file /user-submitted-posts/views/submission-form-classic.php, just as before, replacing session_start(); on line 5.

    There are two possible submission forms, new and classic (or whatever). If you look at the two errors you've posted, the first time you were using the new form submission-form.php and the second time you were using the classic form submission-form.php. So now we're covered either way, hopefully it works.

  12. boyce1
    Member
    Posted 1 year ago #

    Sent file as requested.

    Thanks for your help Jeff.

  13. boyce1
    Member
    Posted 1 year ago #

    Slightly new error.

    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/whyboys/www/www/w/wp-content/themes/weaver-ii/header.php:14) in /home/whyboys/www/www/w/wp-content/plugins/user-submitted-posts/views/submission-form-classic.php on line 6

    Line 6 reads:

    session_start();

  14. Jeff Starr
    Member
    Plugin Author

    Posted 1 year ago #

    Okay, restore the file to its original state and then try commenting out the session start like so:

    // session_start();

    The only thing that this will affect is the "remembering" of form field values. By default when a visitor submits a post and there is an error, the field values will be restored or remembered after the page reloads. Commenting out the session start will disable that functionality, but also prevent the error and get things working with your theme.

    In the meantime I'll find a better solution for the next plugin update.

  15. boyce1
    Member
    Posted 1 year ago #

    Sounds like a plan. Thanks again!

  16. legalmax
    Member
    Posted 1 year ago #

    My images upload OK but I still don't know how to display them. If I need to add code can you please tell me which code & where to add it?

    Cheers

  17. IvanAndrei09
    Member
    Posted 1 year ago #

    I lost my translation, you need to create fields for translation. I means only in User Submitted Posts

  18. legalmax
    Member
    Posted 1 year ago #

    Solved image display problem.

    Show images in User Submitted posts

    In loop.php add

    <?php echo do_shortcode('[gallery size= thumbnail]'); ?>

    After the 2nd occurance of

    <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?>

    In Single Post.php add

    <?php echo do_shortcode('[gallery size= thumbnail]'); ?>

    After

    get_header(); ?>

  19. legalmax
    Member
    Posted 1 year ago #

    Now I have another problem. If you set USP to say, upload 4 images, the Add another image link still remains once 4 images have been selected. How do I get it to vanish?

  20. Jeff Starr
    Member
    Plugin Author

    Posted 1 year ago #

    legalmax, unfortunately the plugin doesn't do that by default, but it would be possible to grab the HTML code for one of the inputs (from the web page), and then repeat it only as many times as needed in the 'submission-form.php' file (or the classic version, whichever you are using).

  21. legalmax
    Member
    Posted 1 year ago #

    Jeff ta 4 that. I can live with it but another prob.

    If I don't upload an image then I get an error message saying code is wrong.

  22. Jeff Starr
    Member
    Plugin Author

    Posted 1 year ago #

    Make sure that your settings are "0" for minimum number of images, and that other fields match up with their settings.

  23. jletizia
    Member
    Posted 1 year ago #

    Hey Jeff,

    Jumping on this train. My images don't even seem to be uploading. I'm getting a success back, but when I look in my public_html/doc_root/wp-content/uploads directory, nothing has been added.

    Any thoughts?

  24. jletizia
    Member
    Posted 1 year ago #

    Nevermind. My dimensions were set too low.

  25. legalmax
    Member
    Posted 1 year ago #

    Jeff,

    Tried all sorts of settings - still no luck. Keep getting

    Warning: getimagesize() [function.getimagesize]: Filename cannot be empty in /home/etc/wp-content/plugins/user-submitted-posts/user-submitted-posts.php on line 280

    Warning: Cannot modify header information - headers already sent by (output started at /home/etc/wp-content/plugins/user-submitted-posts/user-submitted-posts.php:280) in /home/etc/wp-includes/pluggable.php on line 881

  26. Jeff Starr
    Member
    Plugin Author

    Posted 1 year ago #

    Hi legalmax, it's difficult to diagnose without looking at it.. which I would be glad to do if you would like. Just send login infos to me via my contact form: http://perishablepress.com/contact/

  27. Jeff Starr
    Member
    Plugin Author

    Posted 1 year ago #

    You could also try commenting out the following code in either submission-form-classic.php or submission-form.php (whichever you are using):

    session_start();
    $title      = $_SESSION['title'];
    $content    = $_SESSION['content'];
    $authorName = $_SESSION['authorName'];
    $authorUrl  = $_SESSION['authorUrl'];
    $tags       = $_SESSION['tags'];
    $captcha    = $_SESSION['captcha'];
    $category   = $_SESSION['category'];
  28. Jeff Starr
    Member
    Plugin Author

    Posted 1 year ago #

    legalmax, I tried responding to your email but it got kicked back as undeliverable..

  29. legalmax
    Member
    Posted 1 year ago #

    Jeff, Tried commenting out but no luck.

  30. Jeff Starr
    Member
    Plugin Author

    Posted 1 year ago #

    Hmm not sure what to tell you, but I'm still glad to look at the setup and try to help. Just need access to the settings page and should be able to better diagnose the issue.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.