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 13 replies - 16 through 28 (of 28 total)
  • Plugin Author Jeff Starr

    (@specialk)

    Hmm.. Does it work if you disable the Registered User setting?

    Thread Starter TiPi64

    (@tipi64)

    Hi 😉

    If I deactivate the option “Registered Username”, nothing changes. BTW, the option Require User Login is unchecked.

    I also try something. I don’t want any name. If the user is anonymous, it will be the name of the default user. If connected, his name.

    So first I try with the field name displayed and required and I saw it on the backoffice but, connected or not, the post belongs to the default user.

    If I choose not do display and require the user, in the back, it’s the same: all posts (connected or not) belongs to the default user.

    I thing there is a problem with 2 options: Require User Login & Registered Username. If the require login is disabled, we can’t have the user connected informations linked to the post. Also, if I disable Registered User Login and enable Registered Username, the user must be logged in to post. If the two options are checked, it’s impossible to post for an anonymous.

    That’s why I have modified your files at the beginning, to force if User Login checked to link the anonymous post to the defaul user and to be sure that, if the user is connected, the informations will be saved and the post belongs to him.

    What can I do? Is there any mistake?

    Plugin Author Jeff Starr

    (@specialk)

    Hello, I guess I am confused as to what you are trying to do.. can you simplify it for me in just a sentence or two so I can understand and try to help? Reduce it to the simplest case possible and I will see if there is anything I can do. Thank you.

    Thread Starter TiPi64

    (@tipi64)

    Hi again, ok for the explanations.

    User >

    • Connected : post of this user
    • Anonymous : post for the default user

    And I just want these required informations: mail, title, submission and captcha.

    Very simple in fact, isn’t it?

    • This reply was modified 5 years, 3 months ago by TiPi64.
    Plugin Author Jeff Starr

    (@specialk)

    Yes that should work, but only when the Post Author field is included.

    Thread Starter TiPi64

    (@tipi64)

    Argh… no way again…

    If “Registered Username” checked, an anonymous user can’t post because the field “Your name” is not displayed… And if I try, error login again…

    PS: I make a new install of the plugin to be sure it’s new and clean…

    • This reply was modified 5 years, 3 months ago by TiPi64.
    Plugin Author Jeff Starr

    (@specialk)

    I’ll have to investigate this further for the next update. As far as I know, when Registered Username is enabled, the “Your Name” field is displayed only when the user is not logged in, otherwise it is hidden. That is always the case, regardless of other settings.

    Then when the setting “Require Login” is enabled, the user must be logged in to view the form and submit a post. That also is always the case, regardless of other settings.

    There are four possible scenarios involving these two settings:

    1) So when you have both Registered Username and Require Login settings enabled, and the user is logged in, they will be able to view the form and submit a post, and the Your Name field will not be displayed because the plugin automatically uses their logged in name.

    2) Or, when you have both Registered Username and Require Login settings enabled, and the user is not logged in, they will not be able to view the form or submit a post.

    3) Or, if Registered Username is enabled, but Require Login is disabled, and the user is logged in, the Your Name field is not displayed and the plugin will use the user’s logged username. If the user is not logged in, the Your Name field is displayed so the user can provide their name.

    4) Lastly, if Registered Username is disabled, but Require Login is enabled, and the user is logged in, the Your Name field always is displayed. So if the user is logged in, they can view the form and submit a post. Otherwise, if the user is logged out, they can not view the form or submit a post.

    At least, that is how it is supposed to work. Are you saying there is something incorrect or not working according to this expected functionality?

    Thread Starter TiPi64

    (@tipi64)

    Yep, there is at least one issue for the #3.

    Require User Login is disabled, Registered Username is enabled. The field Your name isn’t displayed for both anonymous and logged in user and a non logged in user can’t post (error: login required). You can try on the demo page.

    To solve this issue (with some basic modifications), I make #1 (both username and login enabled) and modify the code (if error login required) to provide if non logged in user the ID and name of the default user.

    Plugin Author Jeff Starr

    (@specialk)

    That isn’t normal, the Your Name field should be displayed if the user is not logged in. If you want to send login infos, I would be glad to take a look. But I would need you to restore the plugin to its original state (i.e., remove any mods that you may have implemented). You can reach me via my contact form.

    Thread Starter TiPi64

    (@tipi64)

    Ok.

    I’ve just send you the mail. For the mods, I did it in another website, the actual website is free of modifications. I just put my needs/configs, let’s rock JS 😉

    Plugin Author Jeff Starr

    (@specialk)

    Yeah that’s weird.. is it okay if I do some troubleshooting, like reinstalling the plugin, changing the settings, etc.?

    Thread Starter TiPi64

    (@tipi64)

    Yep, you can do what you want and what you can also 😉

    Let me know by mail if you have any questions/needs.

    Plugin Author Jeff Starr

    (@specialk)

    Just to follow-up with this, the issue described in this thread is resolved in the forthcoming version of USP (v20161119). Thank you for your help and detailed feedback 🙂

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