front end submission dashboard with custom post type

Support MB Frontend Submission front end submission dashboard with custom post typeResolved

Viewing 13 posts - 31 through 43 (of 43 total)
  • Author
    Posts
  • #27875
    Long NguyenLong Nguyen
    Moderator

    Hi Patrick,

    The post type attribute should be added in the shortcode frontend submit to make the dashboard works.

    [mb_frontend_form post_fields="title,content" post_type="speaker-profile"]
    

    Get more details here https://docs.metabox.io/extensions/mb-frontend-submission/#creating-post-forms

    #27886
    Patrick NelsonPatrick Nelson
    Participant

    Hi Long,

    This is exactly what I did (please read my previous posts in this thread) and it doesn't work.

    I have tried single quotes, double quotes, disabled all other plugins and changed theme to Twenty Twenty One. It simply doesn't work. Even if I change the post_type to page, it still shows the default post type.

    #27897
    Long NguyenLong Nguyen
    Moderator

    Hi Patrick,

    Can you please share the screenshots of two pages?

    • The page ID 1819 has the shortcode frontend submit [mb_frontend_form post_fields="title,content" post_type="speaker-profile"]
    • The page has the shortcode frontend dashboard [mb_frontend_dashboard edit_page="1819"]
    #27898
    Patrick NelsonPatrick Nelson
    Participant

    Sure.

    This is 1819 which has the submit form - https://prnt.sc/12h3hm5
    Content is shortcode [mb_frontend_form id="speaker-profile"]

    This is 1863 which has the dashboard - https://prnt.sc/12h3k1g
    Content is shortcode [mb_frontend_dashboard edit_page="1819" post_type="speaker-profile"]

    I'm happy to supply login details if I can do so securely.

    #27917
    Long NguyenLong Nguyen
    Moderator

    Hi Patrick,

    Frontend Submit shortcode attributes:
    id: is the meta box ID, if you do not assign a meta box ID to this post type, please remove it.
    post_type: is the slug of your post type speaker-profile or you can change to page. You have to add this setting if you want to make the shortcode Frontend Dashboard edit this post type.

    [mb_frontend_form post_fields="title,content" post_type="speaker-profile"]

    Please read more on the documentation https://docs.metabox.io/extensions/mb-frontend-submission/

    #27929
    Patrick NelsonPatrick Nelson
    Participant

    Page ID 1819 works fine - it always has. What doesn't work - and still doesn't work - is Page ID 1863 from above that should show a User Posts Dashboard for a CPT called speaker-profile. No matter what I change the attribute 'post_type' to, the dashboard only ever shows the default 'post'.

    Long, I provided the information you asked for and your response:

    ("post_type: is the slug of your post type speaker-profile or you can change to page. You have to add this setting if you want to make the shortcode Frontend Dashboard edit this post type.")

    suggests that you are not even reading what I am writing. Once again, I have added the setting 'post_type' and I have set the slug to speaker-profile. All of this is clear from my most recent comment. It doesn't work! Can you not see what I have written in my previous comment?

    #27930
    Patrick NelsonPatrick Nelson
    Participant

    Look, I have just applied a number of other attributes to the shortcode as you can see here: https://prnt.sc/12ijlnh

    And, as you can see here, those attributes all work: https://prnt.sc/12ijmcd

    The dashboard has changed - only the title column, renamed to "Speaker", the welcome message has gone and the add new button now reads 'Add new speaker'.

    All of these attributes work. Every one EXCEPT the post_type attribute which I have entered correctly as you can see from this screenshot of the MetaBox Edit Post Type screen: https://prnt.sc/12ijrnm

    I don't know what else I can do to demonstrate that the attribute 'post_type' does not work correctly.

    I subscribe to the Developer Bundle of MetaBox and I am considering cancelling this. Not because of the technical problem but because of the support problem.

    #27935
    Long NguyenLong Nguyen
    Moderator

    Hi Patrick,

    I'm sorry about this situation. But can you please make sure that the post_type attribute is added to the shortcode frontend submit?

    [mb_frontend_form post_fields="title,content" post_type="speaker-profile"]

    I see that in your reply, the value speaker-profile is assigned to the attribute id, not the attribute post_type

    [mb_frontend_form id="speaker-profile"]

    If it still does not work, please share your site credentials via this contact form https://metabox.io/contact/, I will help you to check it.

    #27938
    Patrick NelsonPatrick Nelson
    Participant

    How are you "seeing" that in my reply?

    My screenshot at https://prnt.sc/12ijlnh clearly shows the shortcode is mb_frontend_dashboard not mb_frontend_form.

    The screenshot also shows that the value speaker-profile is assigned to the attribute post-type not the attribute id.

    #27939
    Long NguyenLong Nguyen
    Moderator

    Hi,

    Please check my two replies: #27897 and #27917.

    You have to add the attribute post_type to the shortcode Frontend Form mb_frontend_form if you want to make the shortcode Frontend Dashboard edit the post type speaker-profile.

    On the page 1819:
    [mb_frontend_form post_fields="title,content" post_type="speaker-profile"]

    On the page 1863:
    [mb_frontend_dashboard edit_page="1819"]

    #27942
    Patrick NelsonPatrick Nelson
    Participant

    OK, thank you Long. That now works and I now understand.

    However, I notice that these forms do not respect editing or posting capabilities. I have a user who should not be able to add, publish or delete this CPT but the Add New button and the delete Action are freely available which means the user can carry out actions that they should be denied.

    I appreciate the help getting this working but this does render the functionality useless for us.

    #27950
    Long NguyenLong Nguyen
    Moderator

    Hi Patrick,

    Thank you for your feedback.

    The frontend dashboard allows the users to edit their posts on the frontend. If you do not want to allow editing posts for some specific users, please don't give them access to this page. This plugin might help you to do that https://wordpress.org/plugins/restrict-user-access/.

    #27964
    Patrick NelsonPatrick Nelson
    Participant

    That's not the issue, Long.

    We're using PublishPress permissions to set custom capabilities for CPTs for custom user roles. So we have a role called Speaker who can edit a Speaker post that is assigned to them (they are the author) but they don't have permission to create a new Speaker post or to delete any post.

    These permissions are recognised and obeyed by WordPress. So in the backend admin screen, for example, they don't see the Add New option for Speaker posts and they don't have an option to delete their assigned post.

    However, your frontend dashboard has an 'Add new' button and a 'delete' action. Both of these allow the user to bypass these permissions and create new posts or delete their assigned posts.

Viewing 13 posts - 31 through 43 (of 43 total)
  • You must be logged in to reply to this topic.