Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • in reply to: Single field stops saving after few post updates #6647
    erikkubica
    Member

    no 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";
    in reply to: Single field stops saving after few post updates #6624
    erikkubica
    Member

    additional info
    This also not helps

    add_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

    in reply to: [v0.9.9.X] Post/Page meta fiels not updating, CPT works fine #5303
    erikkubica
    Member

    You are right, i have tried before the “remove_meta_box” that does not worked, but remove postype support works as expected. I hope piklist team will add an condition to detect this and do it automatically. And thank you for this great tool.

    in reply to: [v0.9.9.X] Post/Page meta fiels not updating, CPT works fine #5301
    erikkubica
    Member

    Thank you for reply.

    Piklist demos are CPT (post_type=piklist_demo) so yes, as i mentioned, CPT-s works, only post_type=post && post_type=page are bugged.

    in reply to: Setting page on 0.9.9.6 with new flow #4946
    erikkubica
    Member

    Yes, now it´s clear how these flows connects with tabs and pages,

    Thank you

    in reply to: Hide metabox/field if post has parent #4471
    erikkubica
    Member

    @mcmaster you are right, thank you. Sometimes i can think of the most unequivocal solutions.

    in reply to: How to rename url slug of post type without data loss? #4439
    erikkubica
    Member

    Thank you, i have used the “rewrite” => “foo” too keep url compatibility with old site.

Viewing 7 posts - 1 through 7 (of 7 total)