- This topic has 3 replies, 2 voices, and was last updated 5 years, 8 months ago by
erikkubica.
-
AuthorPosts
-
-
June 7, 2016 at 11:33 am #6622
erikkubicaMemberHi,
I want to find solution and also report a possible bug.
I have some fields on a CPT, all of them are always in all cases working. except of one most basic text input field. When i create new post it saves its value, when i update post it works also but after few updates its value turns to null (empty value), cannot update its value anymore, it stays at null. All other fields above this text input and below text input is updating and working just fine, there is no javascirpt console error or wordpress error. I repeating myself, just only this single field.
Here is my post meta code
.... lots of code above with select + conditioned repeated field that works even if "podnadpis" is not working... piklist("field", array( "type" => "text", "field" => "podnadpis", "label" => "Podnadpis", "columns" => 12 )); ... lots of code below some other simple fields that works even if "podnadpis" is not working...I have created a few websites on piklist with more difficult fields like nested conditions and repeated fields… but this is weird. really.
I am using wordpress 4.5.2, with piklist 0.9.9.7
More debug info https://gist.github.com/anonymous/c03d2011862598878e56154337d614fa
Thank you
-
June 7, 2016 at 12:38 pm #6624
erikkubicaMemberadditional info
This also not helpsadd_action('init', 'fix_post_page_meta'); function fix_post_page_meta() { remove_post_type_support("page", "custom-fields"); // helped in some prev projects, dont remember what was the problem remove_post_type_support("post", "custom-fields"); // same as above remove_post_type_support("sekcia", "custom-fields"); // cpt where the buggy text field is }also no duplicate input found in view page source
-
June 9, 2016 at 1:03 pm #6644
SteveKeymasterThis is really odd. First time we ever heard this. Can you check your page source and see if there is another field with this name:
podnadpis? -
June 9, 2016 at 1:10 pm #6647
erikkubicaMemberno its the only field with this name. i have checked source code (html) and everything to see if there is anything overwriting or any duplicate, but with no luck. everything seems to be just fine. but there must be a bug somewhere since i can reproduce it. maybe its something in wordpress, maybe piklist, maybe something else.
do you have any idea how i can debug it more deeply or…
if its more confortable to communicate, then “podnadpis” means “subtitle”.
Here is full code if it helps
<?php /* Title: Údaje Post Type: sekcia */ piklist("field", array( 'type' => 'select', 'field' => "sablona", 'label' => 'Šablóna', 'attributes' => array( 'class' => 'large-text' ), "choices" => array( "studia" => "Štúdiá Slider (case studies)", "referencie" => "Referencie", "sluzby" => "Služby", "dvojity-cta" => "Dvojitý CTA", "produkty" => "Produkty (balíčky)", "postup" => "Postup", "objednavka" => "Objednávka", "blog" => "Blog", "dalsie-sluzby" => "Ďalšie služby", "kontakt" => "Kontakt", "obrazok" => "Obrázok (podporuje aj infografiky)" ) )); /*********** postup ******/ piklist("field", array( "type" => "group", "add_more" => true, "columns" => 12, "field" => "postupy", "label" => "Postupy", "fields" => array( array( "type" => "text", "field" => "nadpis", "label" => "Nadpis", "columns" => 12 ), array( "type" => "textarea", "field" => "opis", "label" => "Opis", "columns" => 12 ) ), "conditions" => array( array( "field" => "sablona", "value" => "postup", ), ), )); /*********** kontakt ******/ piklist("field", array( "type" => "group", "add_more" => true, "columns" => 12, "field" => "kontakt-data", "label" => "Kontakt dáta", "fields" => array( array( "type" => "text", "field" => "nadpis", "label" => "Nadpis", "columns" => 12 ), array( "type" => "textarea", "field" => "opis", "label" => "Opis", "columns" => 12 ) ), "conditions" => array( array( "field" => "sablona", "value" => "kontakt", ), ), )); /********** Podnadpis general **********/ piklist("field", array( "type" => "text", "field" => "podnadpis", "label" => "Podnadpis", "columns" => 12 )); /********** Studia **********/ piklist("field", array( "type" => "select", "field" => "studia-show", "label" => "Zobraziť štúdie?", "choices" => array( "no" => "Nie", "yes" => "Áno" ) )); $studie_query = get_posts("post_type=studium&posts_per_page=-1"); $studie = array(); if ($studie_query): foreach ($studie_query as $studium): $studie[$studium->ID] = $studium->post_title; endforeach; endif; piklist("field", array( "type" => "select", "field" => "studie", "label" => "Štúdie (výber viacerých pomocou 'ctrl')", "columns" => 12, "attributes" => array( "multiple" => true ), "conditions" => array( array( "field" => "studia-show", "value" => "yes", ), ), "choices" => $studie )); /********** Referencie **********/ piklist("field", array( "type" => "select", "field" => "referencie-show", "label" => "Zobraziť referencie?", "choices" => array( "no" => "Nie", "yes" => "Áno" ) )); $referencie_query = get_posts("post_type=referencia&posts_per_page=-1"); $referencie = array(); if ($referencie_query): foreach ($referencie_query as $referencia): $referencie[$referencia->ID] = $referencia->post_title; endforeach; endif; piklist("field", array( "type" => "select", "field" => "referencie", "label" => "Referencie (výber viacerých pomocou 'ctrl')", "attributes" => array( "multiple" => true ), "conditions" => array( array( "field" => "referencie-show", "value" => "yes", ), ), "choices" => $referencie )); /********** Sluzby/infografiky **********/ piklist("field", array( "type" => "select", "field" => "infografiky-show", "label" => "Zobraziť Infografiky?", "choices" => array( "no" => "Nie", "yes" => "Áno" ) )); $infografiky_query = get_posts("post_type=infografika&posts_per_page=-1"); $infografiky = array(); if ($infografiky_query): foreach ($infografiky_query as $infografika): $infografiky[$infografika->ID] = $infografika->post_title; endforeach; endif; piklist("field", array( "type" => "select", "field" => "infografiky", "label" => "Infografiky (výber viacerých pomocou 'ctrl')", "attributes" => array( "multiple" => true ), "conditions" => array( array( "field" => "infografiky-show", "value" => "yes", ), ), "choices" => $infografiky )); include get_template_directory() . "/piklist/parts/general/cta.php"; include get_template_directory() . "/piklist/parts/general/cta2.php";
-
-
AuthorPosts
- You must be logged in to reply to this topic.