Forum Replies Created
-
AuthorPosts
-
December 12, 2022 at 10:05 AM in reply to: ✅Advanced location rules dropdown causes all the fields to disappear #39702
Solace
ParticipantJust opened up the console to see if these errors might help. Here's a link to the screen recording.
December 12, 2022 at 9:13 AM in reply to: ✅Advanced location rules dropdown causes all the fields to disappear #39700Solace
ParticipantJust reached out to the hosting company and they shared this error. Hope this helps:
WARNING: [pool site-url.io] child 43 said into stderr: "NOTICE: PHP message: PHP Fatal error: Uncaught Error: Call to protected method RWMB_Post_Field::query() from scope MBB\RestApi\Base in /www/wp-content/plugins/meta-box-aio/vendor/meta-box/meta-box-builder/src/RestApi/Base.php:61"
December 12, 2022 at 8:06 AM in reply to: ✅Advanced location rules dropdown causes all the fields to disappear #39699Solace
ParticipantActually ignore that, I just downgraded to 5.6.12 and the issue still exists.
December 12, 2022 at 7:25 AM in reply to: ✅Advanced location rules dropdown causes all the fields to disappear #39697Solace
ParticipantI can confirm that this issue doesn't exist in version 5.6.12.
Solace
ParticipantI see, but you did fix the issue? Apart from the post_title what else did you do?
Solace
ParticipantOk yeah that makes sense, but did you use the same code as you posted in this thread initially?
add_action( 'rwmb_resources-fg_after_save_post', 'swb_update_post_title' );
function swb_update_post_title( $post_id ) {
$my_title = rwmb_meta( 'resource_title', '', $post_id);
if ( post_exists( $my_title, '', 'resource', '' ) ) {
$my_title = substr(md5(rand()), 0, 9);
}
$my_slug = rawurlencode( $my_title );
$my_post = array(
'ID' => $post_id,
'post_title' => $my_title,
'post_name' => $my_slug
);
wp_update_post( $my_post );
}Solace
ParticipantInteresting, so did you add a text field and then set it to {post.title} or something? I'm not using a Meta Box group so I'm not exactly sure of how you solved the issue. Appreciate your help 🙂
Solace
ParticipantHi Scott! How did you fix this issue?
Solace
ParticipantIf I wanted to combine two field_id's to create a custom title how would I go about merging them? For instance, I have first_name and then last_name. I want both of these to show in post_title together.
Also can that be applied to rewrite the slug of the post? Right now it displays as auto-draft.
Solace
ParticipantUnderstood, thanks!
Solace
ParticipantGot it thanks! I set the sanitization to 'none' and it allows for the <br> tag to be entered and saved.
Solace
ParticipantI did try that but when I click on update the changes are not saved in Meta Box. It resets to no html. Is there a setting in Meta Box I need to click to enable html rendering or should it allow html by default?
Solace
ParticipantThanks for clarifying that, Long! However I'm assuming by your response that somehow the cloneable field, by default, should be displayed in a single line per field and not run together in a single line?
Solace
ParticipantLong, wanted to quickly follow up on this. Everything has been working great. I just noticed in the URL that it shows up as /auto-draft-2-2/ for new or duplicated items. How can I make sure it matches the title of the post?
Solace
ParticipantThanks Long! Will look into it and let you know if there are any other questions 🙂
-
AuthorPosts