BuddyDev

Search

BuddyBlog Pro – override Submit Post for Review

  • Participant
    Level: Master
    Posts: 279
    NikB on #48564

    Hi Brajesh

    I was actually rather hoping you might say something along those lines 😉

    Although I’ve spent quite a bit of time trying to handle this scenario myself, I’ve been aware that it’s not a perfect solution so if BuddyBlog Pro Groups will soon be able to it “out of the box”, that would be great.

    Good luck with the release and I’ll look out for it.

    Many thanks as always.
    Nik

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #48565

    Thank you Nik 🙂

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #48691

    Hi Nik,
    Thank you for your patience.

    Please remove any custom code you are using for the label change and upgrade to BuddyBlog Pro 1.3.5, BuddyBlog Groups RC5.

    I have updated the workflow to allow group admins directly publish in the following scenario:-
    1. If default status is pending but group admins can override status in their groups settings, then they can publish irrespective of the status.

    Hope that helps.

    Regards
    Brajesh

  • Participant
    Level: Master
    Posts: 279
    NikB on #48702

    Hi Brajesh

    Thank you so much.

    I will install and test the upgrades properly tomorrow and let you know if I run into any problems 😉

    Warm regards
    Nik

  • Participant
    Level: Master
    Posts: 279
    NikB on #48708

    Hi Brajesh

    I’ve been testing things this morning and unfortunately I seem to have run into several issues as follows –

    Note: I have switched to the parent theme and disabled all custom code however…

    1. It would appear that ALL posts by ALL group members are now published immediately, even though the default post status is set to pending.

    2. Despite the above, the notification emails that get sent out to both user and admin are those related to a post that requires approval.

    3. I note from your message above that the criteria required for a post to be published immediately is based on whether “group admins can override status in their group settings”. This is not an ideal scenario for my particular use case as I don’t want to offer that particular option to group admins, and ideally the criteria would simply be “is the user group admin of that group” (which on the face of it, seems to make much more logical sense to me since if someone can “approve” posts in a group, surely their own posts shouldn’t require approval 😉 )… however… I’m assuming you must have your own particular reasons for handling things this way so as long as 1 & 2 above can be resolved, I guess I can work with it for now.

    With many thanks in advance for any thoughts.
    Nik

    PS. Just tested a little more and it seems 1. above is only occurring for standard WordPress posts, whereas with my custom post type (events), it would appear to be working as expected ie. admin’s posts get published immediately, other users’ posts remain pending! I’ve checked and double-checked my settings and as far as I can tell, they’re the same for both post types but maybe I missing something?

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #48709

    Hi Nik,

    1. Please make sure you are using latest version of BuddyBlog Pro/BuddyBlog Groups.

    2. Please re-check the settings and verify that the settings does not allwo users to publish. I have verified it on BuddyPress group.

    3. I have added a hook to customize/override the behaviour if you do not want to allow group admins. I have added in the plugin what feels natuarl(allow admins to publish if they can control the publish state).

    The filter is ‘bblpro_default_post_status_for_user’

    PS:- You may want to remove any custom code to check it.

    Regards
    Brajesh

  • Participant
    Level: Master
    Posts: 279
    NikB on #48710

    Hi Brajesh

    Thank you so much for getting back to me so promptly.

    1. I am using BuddyBlog Pro 1.3.5 and BuddyBlog Groups 1.0.0-RC-5.

    2. The workflow for both group post and group event forms is set to “Submit Post for Review”. I have also checked the same is showing in the BuddyPress group.

    As mentioned above, there is no custom code running. Sadly the issues are still persisting. I’m not sure what to check next…

    3. I want admins to be allowed to publish *without* giving them the ability to control the publish state. From what you say, this isn’t the designed behaviour but possibly the filter you mention will help with this? I’ll investigate further once 1 & 2 are resolved.

    Regards
    Nik

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #48711

    Hi Nik,
    I will have a demo setup for you to test the 1,2. We have a holiday tomorrow, so I will either put it today or day after tomorrow and link you.

    3. yes, that filter will allow you to do that.

    I will also re-check with latest BuddyBoss platform to be sure.

    Thank you
    Brajesh

  • Participant
    Level: Master
    Posts: 279
    NikB on #48713

    Thank you again Brajesh.

    On a little more investigation, it seems as if the function set_default_post_status line 96 ie.

    'publish' === $default_status

    … always returns “true” for the posts post type.

    I’ll have to dig a little deeper to figure out whether that’s caused by something in the logic or some other setting on my side and will get back to you if I manage to find anything of interest.

    Regards
    Nik

  • Participant
    Level: Master
    Posts: 279
    NikB on #48715

    Hi again Brajesh

    After extensive testing, I can confirm (almost 100%) that this unfortunately appears to be a BuddyBoss issue, though I must admit, I have given up on trying to figure out why!

    To replicate the issue –

    New WordPress install
    Plugins installed – BuddyBoss Platform, BuddyBlog Pro, BuddyBlog Groups, Events Manager
    Running Twenty Twenty theme
    One group created with two members ie. Admin plus one basic subscriber
    Two Group Post Forms created one for posts and one for events with the workflow setting “On Submission Submit Post for Review” with override enabled
    Both post types enabled in Group settings with the relevant tabs etc.

    When the subscriber (not admin) goes to create a new event, button shows “Submit Post for Review”
    When the subscriber (not admin) goes to create a new post, button shows “Publish”

    Summary: when using BuddyBoss and making a group post, for some reason, the default post status for standard WordPress posts, always gets set to “publish” regardless of any other settings. This does not happen for custom post types which seem to respect the logic (at least as I understand it).

    I note you have a holiday coming up so understand a reply may take a little longer but will hope to hear from you as soon as you are able since I won’t be able to update the plugin(s) if/until we’ve somehow found a way to resolve this.

    With many thanks as always.
    Nik

You must be logged in to reply to this topic.

This topic is: not resolved