Forum Replies Created
-
AuthorPosts
-
mcmasterMemberYes, it happens in Piklist demos as well. Sending an email to support with credentials for the testbed.
mcmasterMemberFollow-up for anyone else interested in this feature: I got a private email back in November saying that this would be fixed in the next release, but didn’t update the thread.
mcmasterMemberSo none of these are fixed in 0.9.9.9 that just showed up as an update?
@kattagami, did you try the patch in https://piklist.com/support/topic/0-9-9-6-add-more-problem/#post-5985?
mcmasterMemberp.s. The instructions for the Page parameter in the Workflows header file were ambiguous in the case of settings, so I tried both “my_settings” (the settings name) and “my-settings” (the settings slug). The attachment to the previous reply was using “my_settings.” This attachment shows the difference when using “my-settings.” As you can see it’s different — the tab 2 fields have disappeared — but I still have no tabs.
Attachments:
You must be logged in to view attached files.
mcmasterMemberOkay, I tried to create a workflow following https://piklist.com/user-guide/docs/building-workflows-piklist-v0-9-9/ and studying the Piklist demo add-on. Didn’t get much further.
My test files create one workflow (Test Workflow) with 2 tabs (First & Second). The First tab has two fields; Second has one. See the uploaded result.
The Settings page definition is lifted from Piklist Demos with minor changes:
add_filter('piklist_admin_pages', 'my_test_admin_pages'); function my_test_admin_pages($pages) { $pages[] = array( 'page_title' => __('My Settings', 'piklist') ,'menu_title' => __('My Settings', 'piklist') ,'capability' => 'manage_options' ,'sub_menu' => 'edit.php?post_type=page' ,'menu_slug' => 'my-settings' ,'setting' => 'my_settings' ,'menu_icon' => plugins_url('piklist/parts/img/piklist-icon.png') ,'page_icon' => plugins_url('piklist/parts/img/piklist-page-icon-32.png') ,'default_tab' => 'First' ,'single_line' => true ,'save_text' => 'Save these settings' ); return $pages; }Workflow header file and two tab files in parts/workflows:
/* Flow: Test Workflow Page: my_settings Header: true Position: edit_form_after_title *//* Title: First Order: 10 Flow: Test Workflow *//* Title: Second Order: 20 Flow: Test Workflow */And then there are three files in parts/settings:
/* Title: First Tab, Field 1 Order: 10 Tab: First Setting: my_settings Flow: Test Workflow */ piklist('field', array( 'type' => 'text' ,'field' => 'text11' ,'label' => __('Tab 1, Field 1', 'piklist-demo') ,'attributes' => array( 'class' => 'regular-text' ) ));/* Title: First Tab, Field 2 Order: 20 Tab: First Setting: my_settings Flow: Test Workflow */ piklist('field', array( 'type' => 'text' ,'field' => 'text12' ,'label' => __('Tab 1, Field 2', 'piklist-demo') ,'attributes' => array( 'class' => 'regular-text' ) ));/* Title: Second Tab, Field 1 Order: 10 Tab: Second Setting: my_settings Flow: Test Workflow */ piklist('field', array( 'type' => 'text' ,'field' => 'text21' ,'label' => __('Tab 2, Field 1', 'piklist-demo') ,'attributes' => array( 'class' => 'regular-text' ) ));What am I missing here? Thanks for any help!
Donna
Attachments:
You must be logged in to view attached files.
mcmasterMemberIt almost seems backwards: that the changes in the high priority boxes would be saved first, then the custom fields box would overwrite them, then the low-priority box changes would be saved and overwrite custom fields. So I guess they’re processing the low priority boxes first?
Anyway, as I said, just glad that I know to disable custom-fields on the built-in types!
Donna
mcmasterMemberSteve, it sure feels like a WordPress bug to me!
mcmasterMemberNo hurry as my code has been working fine since I’ve disabled custom-fields support.
I just put my Piklist test plugin into a Git repository: https://github.com/donnamcmaster/mcw-piklist-test
It contains an add-on so you’ll need to activate that through Piklist after activating the plugin.It creates the simpleton post type. It also turns OFF custom-fields support for pages, but leaves it on for posts. The three meta-boxes are all active for all three post types. I just confirmed that I can set initial values for all fields in all tests, but can modify the field values in the lower=priority only on pages.
Thanks for the reminder about the 0.9.9.9 release. 😉
mcmasterMemberSteve, I read the article you referenced, and I don’t see anything related to priority. I find it odd that one could save changes to fields in high-priority meta-boxes but not in meta-boxes ones.
mcmasterMemberThanks, Jason. I’m using 0.9.9.8, and yes, I was having the problem for both post and page post types. I had added a “credits” field and it was working fine but I wanted to move it below the excerpt field, and that’s when it stopped working. I had done some other changes as well, so it took a little experimenting to figure out which change caused the problem.
Did you test with the “simpleton” type I created? And is there any chance that you have code somewhere that removes support for custom-fields from post/page types?
mcmasterMemberThanks for your help. But let me be clear. I’m not such a fool as to create a post type that supports custom-fields. The problem arose with type “post,” which includes custom-fields as default. It took a while to figure out that the problem was related to priority, but then I found that I didn’t have the same problem with my custom post types.
I created the “simpleton” post type so that I could isolate the problem. Once I saw that it was the interaction with custom-fields, I added the following to an init function:
remove_post_type_support( 'post', 'custom-fields' );I posted here as I thought it might be helpful to others.
mcmasterMemberp.s. I’m also curious about why the text input box is initially below the label and then jumps up beside it
June 3, 2016 at 11:08 pm in reply to: Possible to add meta-box in Media Library (post type "attachment")? #6586
mcmasterMemberAnother vote for this feature! 🙂
mcmasterMemberGreat, thanks!
mcmasterMember -
AuthorPosts