• Resolved jamminjames

    (@jamminjames)


    The setting for “Post Status” (Post Status for submitted posts) isn’t working. I have it set to “Publish after 1 approved post”, but they are always set as Pending.

    I’ve tried changing the setting to something else and saving, then re-setting and saving changes again, no luck.

    Seems like it worked at first, but not any more. What can be done?

    Great plugin. Thanks for any help.

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

    (@specialk)

    Not sure, are you using any other plugins? Like maybe a cache plugin? Also, do the other Post Status options work?

    Thread Starter jamminjames

    (@jamminjames)

    I do have a cache plugin, but have flushed the cache many times. Publish immediately works.

    What does it use to determine if the person’s posts have been published, their email address?

    Plugin Author Jeff Starr

    (@specialk)

    “What does it use to determine if the person’s posts have been published, their email address?”

    No that’s the post status that indicates the status for each post. The user is determined by the submitted username. You can look at the relevant code located in user-submitted-posts.php the function name is usp_prepare_post().

    I just re-tested this on default WordPress and it’s working normally. Here is what I did (again, on default WP site):

    1. Set the Post Status setting to “Publish after 1 approved post”
    2. Visit the USP form and submit a post
    3. Confirm the post was submitted with “Pending” status
    4. Publish the post
    5. Return to the form and submit another post
    6. Confirm that the second post was published automatically

    One other thing that can throw people off is the number of published posts. It’s based on the user, so if the user has published posts that meet the minimum requirement, then all future posts will be published automatically. For testing, it helps to use a completely different/clean browser and submit test posts as a random (not logged in) visitor.

    Thread Starter jamminjames

    (@jamminjames)

    Does the user name submitted have to be a subscriber to the blog for it to work? Most people submitting are not in our case. They are using the same ‘user name’ each time they submit.

    Plugin Author Jeff Starr

    (@specialk)

    No it should not matter if the user is registered (as any role) for it to work. The number of posts is determined per user, based on submitted username.

    Thread Starter jamminjames

    (@jamminjames)

    How can I test how many posts a specific user name has?

    Plugin Author Jeff Starr

    (@specialk)

    It’s not a current feature of the plugin, would require some custom coding.

    Thread Starter jamminjames

    (@jamminjames)

    Must be in the database, right?

    Plugin Author Jeff Starr

    (@specialk)

    Yes all data is stored in the database. It’s not all in the same table though. The submitted usernames are stored in the post meta table. The posts (and thus number of posts) are stored in the posts table.

    • This reply was modified 3 years ago by Jeff Starr.
    Thread Starter jamminjames

    (@jamminjames)

    Okay, thanks. The user_submit_name keys are getting recorded. So, does the plugin check if a post_id associated with the name has been published?

    Since the info is getting recorded, it seems like it should be working.

    The blog settings are such that the admin has to publish a post, authors can’t do it. Could this be the reason?

    Plugin Author Jeff Starr

    (@specialk)

    “does the plugin check if a post_id associated with the name has been published?”

    Yeah basically. Probably would be useful to just check the code yourself, in the file/function mentioned above.

    “blog settings are such that the admin has to publish a post, authors can’t do it. Could this be the reason?”

    Not that I recall (I’m not looking at the code currently). It should just count the number of posts for the user. Again, recommend to examine the code, probably would explain it better than I can.

    Plugin Author Jeff Starr

    (@specialk)

    Another idea is to check how it works normally on default WP. Set up a new WP install for testing, leave everything at defaults (theme, plugin, etc.), and then install only USP. That will give you a baseline for further testing, etc.

    Thread Starter jamminjames

    (@jamminjames)

    Okay, I changed the default author’s role to editor, which can publish, and now it works!

    So, I’d suggest adding that to your documentation / FAQS – if you’re using a role editing plugin, the default author has to have post publishing capability.

    Thanks for your help and patience. Great plugin.

    Plugin Author Jeff Starr

    (@specialk)

    Interesting, thanks for reporting. I will take a closer look at the actual code and see if there is any way to improve existing functionality. And/or add a FAQ as you suggest, in case anyone else experiences the same issue. Cheers.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Post Status setting not working’ is closed to new replies.