Tagged: post_content
- This topic has 5 replies, 3 voices, and was last updated 4 years, 10 months ago by
Stephen.
-
AuthorPosts
-
-
April 4, 2017 at 1:34 am #7898
StephenParticipantThe latest version of Piklist (.11, and possibly .10) broke the display of my post_content field in my cpt. I am not displaying it in the normal place, but rather grouped with a bunch of other fields. This was working fine until the latest piklist updates, not the field shows but is empty and won’t display data in the db. Help.
Here is the (previously working fine) code:
piklist('field', array( 'type' => 'editor' ,'field' => 'post_content' ,'scope' => 'post' ,'required' => false ,'label' => __('Full Description', 'my-domain') ,'help' => __('Type your long description here. It will show up on the detail page.', 'my-domain') // ,'value' => '' ,'options' => array( 'wpautop' => true ,'media_buttons' => false ,'shortcode_buttons' => false ,'teeny' => true ,'dfw' => false ,'tinymce' => array( 'resize' => false ,'wp_autoresize_on' => true ) ,'quicktags' => false ,'drag_drop_upload' => false ) ,'on_post_status' => array( 'value' => 'lock' ) )); -
April 4, 2017 at 1:52 am #7899
StephenParticipantI just verified that although this field is showing blank in the admin, it will save whatever value is typed into it. But then of course no one can edit the content because it won’t display after saving.
-
April 4, 2017 at 1:56 am #7900
StephenParticipantI just traced it to this line in class-piklist-form.php:
if (!is_wp_error($object) && is_object($object) && $allowed && is_array($object->$field))Changing it back to the previous:
if (!is_wp_error($object) && is_object($object) && $allowed)Fixes it. Any ideas why this is happening?
-
April 5, 2017 at 12:16 am #7901
hrmervinMemberThanks @Stephen — I did notice that the content was broken, but I do like to keep an eye on my database so I also observed the save, but not the display in the editor window.
The fix works, good find. -
April 5, 2017 at 5:10 pm #7909
-
April 6, 2017 at 1:04 am #7914
StephenParticipant@sbruner – You are very welcome. Any chance you could give me a little advice on this issue? It is killing me.
Thanks!
-
-
AuthorPosts
- You must be logged in to reply to this topic.