Forum Replies Created
-
AuthorPosts
-
June 15, 2016 at 10:55 am in reply to: Notice: Undefined offset: 1 in post.php when Debug mode on #6680
vayuMemberHere is the stack trace that is printed to the page.
( ! ) Notice: Undefined offset: 1 in /Users/vayu/Sites/example.dev/wp-includes/post.php on line 1336 Call Stack # Time Memory Function Location 1 0.0093 509688 {main}( ) ../index.php:0 2 0.0094 512472 require( '/Users/vayu/Sites/example.dev/wp-blog-header.php' ) ../index.php:17 3 0.0099 529376 require_once( '/Users/vayu/Sites/example.dev/wp-load.php' ) ../wp-blog-header.php:13 4 0.0101 546832 require_once( '/Users/vayu/Sites/example.dev/wp-config.php' ) ../wp-load.php:37 5 0.0114 648528 require_once( '/Users/vayu/Sites/example.dev/wp-settings.php' ) ../wp-config.php:112 6 1.5505 45825904 do_action( ) ../wp-settings.php:393 7 2.7630 48002344 call_user_func_array:{/Users/vayu/Sites/example.dev/wp-includes/plugin.php:525} ( ) ../plugin.php:525 8 2.7630 48002424 Piklist_CPT::init( ) ../plugin.php:525 9 2.7702 48041304 Piklist_CPT::register_post_types( ) ../class-piklist-cpt.php:107 10 2.7738 48082680 register_post_type( ) ../class-piklist-cpt.php:167 11 2.7738 48090680 get_post_type_capabilities( ) ../post.php:1096
vayuMemberYes, that was my thought as well, but like you say, it would be nice with a more elegant way. 🙂
vayuMemberGreat, that nice! 🙂
vayuMemberThanks guys for the tips and feedback. I might change mig processing status to publish instead, so can overcome this issue. It seems that there are no ways of controlling what it says on the publish/save button, no hooks as far as I can see. Thats a shame.
vayuMemberOkay, I activated the demos. I then added a new piklist demo post. The same problem appears there. But I am confused. On this page, it says that there must be a draft status, that you can relabel. However, the demo does not use the draft status.
So when I want to save new piklist demo, then the status does not change and stays on the status “New”.The same issue also happens on the button. The text has changed to “Save” and it does not say “Publish” like it does normally.
vayuMemberHi Steve.
Okay, thanks for checking. I also am using version 0.9.9.7. So something else must be causing the problem. I am using wordpress multisite, but this should not cause the problem. I will have to go through my code and plugins.
vayuMemberThanks again for helping me out! I found the cause for my problem, and it’s because I had added this code:
https://piklist.com/support/topic/advice-for-sorting-by-date-with-date-picker/#post-4640, which by default does not let me use an empty value.
I do apologise for having wasted your time, but your help got me on the right track.
Thanks again!
vayuMemberOkay, thanks for checking. I have the same piklist version, but it’s not working for me.
vayuMemberThanks Steve, but I had already tried this.
This is my code:
piklist( 'field', array( 'type' => 'datepicker', 'scope' => 'post_meta', 'field' => 'invoice_approved_date', 'value' => null, 'label' => 'Dato godkendt', 'attributes' => array( 'class' => 'select invoice-approved-date', 'placeholder' => 'Dato godkendt', ), 'options' => array( 'dateFormat' => 'd-m-yy', 'firstDay' => 1, 'closeText' => 'Luk', 'prevText' => 'Forrige', 'nextText' => 'Næste', 'monthNames' => ['Januar','Februar','Marts','April','Maj','Juni','Juli','August','September','Oktober','November','December'], 'monthNamesShort' => ['Jan','Feb','Mar','Apr','Maj','Jun','Jul','Aug','Sep','Okt','Nov','Dec'], 'dayNames' => ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'], 'dayNamesShort' => ['Søn','Man','Tir','Ons','Tor','Fre','Lør'], 'dayNamesMin' => ['Sø','Ma','Ti','On','To','Fr','Lø'], 'weekHeader' => 'Uge', 'isRTL' => false, 'showMonthAfterYear' => false, 'yearSuffix' => '' ) ) );
vayuMemberThank you for explaining this for me. 🙂
vayuMemberOkay thanks. Maybe I just don’t really understand the options parameter. Is this only for jQuery options?
vayuMemberGreat thanks
vayuMemberThanks, I did google it as well and tried several things, but actually I meant for Piklist options, not specifically for datepicker. There is no information about being able to use these options in the Piklist docs.
vayuMemberThis is great, thanks! Do you have any advice on how to find information about all such extra options/attributes for the different fields, because I could not find this in the docs?
vayuMemberThanks! 🙂
-
AuthorPosts