Support » Plugin: User Submitted Posts » File upload error if user not connected

  • Resolved TiPi64

    (@tipi64)


    Hello πŸ™‚

    I am using your plugin (free version) and it’s really amazing. I just have some problem with the images.

    * Settings

    First, you have to know that I made some modifications to force anonymous users posts to belong to one user (subscriber).

    Now, my issue is that I can’t upload any image while I am not connected to an account.

    Require User Login : unchecked
    Featured Image : checked
    Min images: 0
    Max images: 1

    * What I have try/done

    With an admin account or a subscriber account, I can upload images. I have check my .htaccess on /uploads and, with a plugin (Members), my subscribers can update images.

    With my custom form or the default form, there is the same error when the user is anonymous: usp-error=file-upload “Error: The file(s) could not be uploaded”.

    If I don’t put any image, all is OK and the post is submited with success…

    Do you have any clue for me? That’s gonna make me crazy!

    Thanks for the help.

    Kind regards,

    Thibaut

    URL: http://pgdemerde.fr/proposer/

Viewing 15 replies - 1 through 15 (of 28 total)
  • Plugin Author Jeff Starr

    (@specialk)

    Hi Thibaut,

    Glad to help. A common reason for that error is insufficient permissions on the /uploads/ directory, but if you can upload as other roles, then that suggests the issue is with the modifications that you’ve made. Normally visitors can upload images just fine, so if that is not happening you may want to troubleshoot your customizations. A good way to do this is set up a new WP install using all default settings, etc. Then try again with the default USP plugin to see how it works.

    Also, if the customizations you made were to assign submitted posts to some user, the plugin already provides a setting for it, “Assigned Author”.

    • This reply was modified 5 years, 10 months ago by Jeff Starr.
    Thread Starter TiPi64

    (@tipi64)

    Hi again, thanks for the answer.

    Yep, I should test my plugins BEFORE come here and ask for help, sorry bro.

    BTW, I found the problem: my cache plugin W3TC. I might have done a mistake with the configuration. Do you know if there is a problem between bot plugins?

    Plugin Author Jeff Starr

    (@specialk)

    Glad you got it sorted. Not sure about bot plugins in general, but all of my plugins are compatible with each other. I should note that some caching plugins provide a way to whitelist URLs, so you could add the USP form to the list to avoid any future issues. Thanks for the follow-up message.

    Thread Starter TiPi64

    (@tipi64)

    No, it’s not W3TC in fact. I reactivated all the plugins and an anonymous user can upload an image…

    Maybe a problem in the order or activation, I don’t understand. I have a second website with the same structure (anonymous post), I will see if the problem comes again (I usually work with the same plugins).

    Thanks for the great support dude πŸ˜‰

    Thread Starter TiPi64

    (@tipi64)

    BTW, any tips to provide in the mail the whole content of the post? I mean, I can have a lot of informations such as the title and the URL (and the IP on the main post) but is it possible to include in the mail the content of the post? To know quickly if it’s a big sp4m or not πŸ˜‰

    If I have to create a new topic, tell me πŸ˜‰

    Plugin Author Jeff Starr

    (@specialk)

    Glad to help. If I understand correctly, you can display the submitted email in the post content by enabling the setting, “Email Auto-Display”. Does that help?

    Thread Starter TiPi64

    (@tipi64)

    Hi.

    Not at all πŸ™‚

    Your plugin allows the admin to receive a mail (box “Email Alert Message”) with some custom informations in the box such as %%post_title%%, %%admin_url%%, %%blog_name%%, %%post_url%% or %%blog_url%%.

    Is there any tips or hook to display also the content of the post created by the user? We just have the title and a WordPress default URL (/?p=XXX). Can we have the content of the post also? I hope that my explanation is better than yesterday night πŸ˜‰

    Plugin Author Jeff Starr

    (@specialk)

    Are these new questions for the Pro version of USP? If so, can’t answer them here at WordPress.org — they have strict rules that these forums are for free hosted plugins only. For Pro questions, contact me using the contact form at Plugin Planet (located at the bottom of the page) and we can continue from there. Thank you.

    Updated to add: if this is referring to the free version, then no a post-content variable is not accessible for the email alerts. That is a Pro feature (which provides lots of other vars as well, including Custom Fields, et al).

    • This reply was modified 5 years, 10 months ago by Jeff Starr.
    Thread Starter TiPi64

    (@tipi64)

    Ok, thanks for the answer.

    I have another strange problem: if I post through an anonymous user, the post belongs to the default user. If I post through a registered user, the post belongs also to the default user… Normal?

    Plugin Author Jeff Starr

    (@specialk)

    Yes that’s the default behavior, to assign submitted posts to the selected author. To change this behavior for logged-in users, so that their username is used instead of the assigned author, you can enable the setting, “Registered Username”.

    Thread Starter TiPi64

    (@tipi64)

    Ok but strange… I can’t do what I want.

    Let me explain my goal.

    If (User non logged-in) > post for the default user

    If (User logged-in) > post assigned to himself.

    The free version allows me to do it?

    Plugin Author Jeff Starr

    (@specialk)

    Yes that is precisely what the setting, β€œRegistered Username” is for.

    Thread Starter TiPi64

    (@tipi64)

    I try 3 times to do this without modifying the code, I must take a break!

    Plugin Author Jeff Starr

    (@specialk)

    Yeah it can be tricky testing both logged in and logged out users, but I assure you the setting works fine. You can verify on a default WP install if you think something is interfering.

    Thread Starter TiPi64

    (@tipi64)

    I did a new fresh install and I configured the plugin but it’s the same case as usual: no anonymous users can post (I don’t try with an image upload).

    Can you check my config please JS?

    Config 1/3, Config 2/3, Config 3/3.

    So, if the user is anonymous > post of the user #2. It user connected to WP, post of himself. Where is my mistake?

    Here is the test page, I can provide you a private acces if needed πŸ˜‰

Viewing 15 replies - 1 through 15 (of 28 total)
  • The topic ‘File upload error if user not connected’ is closed to new replies.