Tagged: 

Viewing 11 reply threads
  • Author
    Posts
    • #2042
      chrissoutham
      Member

      Hi guys,
      Great to see progress but I’ve found a couple of bugs in the latest release.

      WordPress Helpers doesn’t see to work with it at all, getting this error with it activated:
      Fatal error: Call to undefined method PikList::key_path() in /httpdocs/plugins/wp-helpers/wp-helpers.php on line 387

      Also previously created settings that have tabs now appear in reverse order of their tab order.

    • #2043
      kattagami
      Member

      Same bug for me concerning the reverse order of the tab in my setting page.

      Thx for your work on the 0.9.4 ๐Ÿ™‚

      • #2045
        Steve
        Keymaster

        Tab Order is not broke… it just never really worked. So we fixed it, but forgot to document it. ๐Ÿ˜‰

        You can set Tab Order in the files for each tab section. Piklist will only honor the first file that sets this for that tab. So if you have multiple sections (files) assigned to one tab, make sure the first one (or all of them), have the correct (same) tab order.

        The default settings tab that was registered using the piklist_admin_pages filter and default_tab parameter, will automatically be set to Tab Order: 10. This allows you place tabs before it if you like.
        example: Tab Order: 20

        Updated docs >

        Let me know if this makes sense or needs further clarification.

    • #2044
      zanedickens
      Member

      Another bug I’ve noticed is that Conditions (using a radio button) hide all fields and then ignore the user selection. I’ve tested on my live site which has 9.3.6, and it works as expected there.

      My code below if it helps:

      <?php
      /*
      Setting:mfm_advert_settings
      */
       piklist('field', array(
          'type' => 'radio'
          ,'field' => 'header_format'
          ,'value' => '1'
          ,'label' => 'Select a Header Ad Format'
          ,'attributes' => array(
            'class' => 'text'
          )
          ,'choices' => array(
            '1' => '3 Small banners'
            ,'2' => '1 Medium + 1 Small'
            ,'3' => '1 Large'
          )
      ));
      
      // SMALL ADVERTS
      
      piklist('field', array(
          'type' => 'text'
          ,'field' => 'small_ad_1'
          ,'description' => __('<strong>Small Advert 1 Image URL</strong><p>Link to the first image file on MFM, e.g. http://mfm.co.za/wp-content/uploads/2014/07/Logo.png</p>')
          ,'columns' => '8'
          ,'attributes' => array(
         'class' => 'text'
          )
          ,'conditions' => array(
            array(
              'field' => 'header_format'
              ,'value' => '1'
              ,'reset' => 'false'
            )
          )
        ));
      
      piklist('field', array(
           'type' => 'text'
           ,'field' => 'small_ad_1_url'
           ,'description' => __('<strong>Small Advert 1 Destination URL</strong><p>Link to the first advert destination, not on MFM, e.g. http://google.co.za</p>')
           ,'columns' => '8'
           ,'attributes' => array(
             'class' => 'text'
           )
           ,'conditions' => array(
            array(
              'field' => 'header_format'
              ,'value' => '1'
              ,'reset' => 'false'
            )
          )
       ));
      
      piklist('field', array(
          'type' => 'text'
          ,'field' => 'small_ad_2'
          ,'description' => __('<strong>Small Advert 2 Image URL</strong>')
          ,'columns' => '8'
          ,'attributes' => array(
              'class' => 'text'
          )
           ,'conditions' => array(
            array(
              'field' => 'header_format'
              ,'value' => '1'
              ,'reset' => 'false'
            )
          )
        ));
      
      piklist('field', array(
          'type' => 'text'
          ,'field' => 'small_ad_2_url'
          ,'description' => __('<strong>Small Advert 2 Destination URL</strong>')
          ,'columns' => '8'
          ,'attributes' => array(
              'class' => 'text'
          )
           ,'conditions' => array(
            array(
              'field' => 'header_format'
              ,'value' => '1'
              ,'reset' => 'false'
            )
          )
       ));
      
      piklist('field', array(
          'type' => 'text'
          ,'field' => 'small_ad_3'
          ,'description' => __('<strong>Small Advert 3 Image URL</strong>')
          ,'columns' => '8'
          ,'attributes' => array(
              'class' => 'text'
          )
           ,'conditions' => array(
            array(
              'field' => 'header_format'
              ,'value' => '1'
              ,'reset' => 'false'
            )
          )     
        ));
      
      piklist('field', array(
          'type' => 'text'
          ,'field' => 'small_ad_3_url'
          ,'description' => __('<strong>Small Advert 3 Destination URL</strong>')
          ,'columns' => '8'
          ,'attributes' => array(
              'class' => 'text'
          )
           ,'conditions' => array(
            array(
              'field' => 'header_format'
              ,'value' => '1'
              ,'reset' => 'false'
            )
          )     
        ));
      
      // MEDIUM ADVERTS
      
      piklist('field', array(
          'type' => 'text'
          ,'field' => 'medium_ad_1'
          ,'description' => __('<strong>Medium Advert 1 Image [435(w) x 60(h)px] URL</strong>')
          ,'columns' => '8'
          ,'attributes' => array(
              'class' => 'text'
          )
           ,'conditions' => array(
            array(
              'field' => 'header_format'
              ,'value' => '2'
              ,'reset' => 'false'
            )
          )     
        ));
      
      piklist('field', array(
          'type' => 'text'
          ,'field' => 'medium_ad_1_url'
          ,'description' => __('<strong>Medium Advert 1 Destination URL</strong>')
          ,'columns' => '8'  
          ,'attributes' => array(
              'class' => 'text'
          )
           ,'conditions' => array(
            array(
              'field' => 'header_format'
              ,'value' => '2'
              ,'reset' => 'false'
            )
          )     
        ));
      
      piklist('field', array(
          'type' => 'text'
          ,'field' => 'medium_ad_2'
          ,'description' => __('<strong>Medium Advert 2 Image [205(w) x 60(h)px] URL</strong>')
          ,'columns' => '8' 
          ,'attributes' => array(
              'class' => 'text'
          )
           ,'conditions' => array(
            array(
              'field' => 'header_format'
              ,'value' => '2'
              ,'reset' => 'false'
            )
          )     
        ));
      
      piklist('field', array(
          'type' => 'text'
          ,'field' => 'medium_ad_2_url'
          ,'description' => __('<strong>Medium Advert 2 Destination URL</strong>')
          ,'columns' => '8'
          ,'attributes' => array(
              'class' => 'text'
          )
           ,'conditions' => array(
            array(
              'field' => 'header_format'
              ,'value' => '2'
              ,'reset' => 'false'
            )
          )     
        ));
      
      // LARGE ADVERT
      
      piklist('field', array(
          'type' => 'text'
          ,'field' => 'large_ad'
          ,'description' => __('<strong>Large Advert Image [665(w) x 60(h)px] URL</strong>')
          ,'columns' => '8'
          ,'attributes' => array(
              'class' => 'text'
          )
           ,'conditions' => array(
            array(
              'field' => 'header_format'
              ,'value' => '3'
              ,'reset' => 'false'
            )
          )     
        ));
      
      piklist('field', array(
          'type' => 'text'
          ,'field' => 'large_ad_url'
          ,'description' => __('<strong>Large Advert Destination URL</strong>')
          ,'columns' => '8'
          ,'attributes' => array(
              'class' => 'text'
          )
           ,'conditions' => array(
            array(
              'field' => 'header_format'
              ,'value' => '3'
              ,'reset' => 'false'
            )
          )     
        ));
      ?>

      Thank you for all your hard work with the new version – loving what I see in the Docs.

    • #2048
      chrissoutham
      Member

      Thanks Steve, that’s a quick fix for the Tabs.

      Any thoughts on WordPress Helpers? I’ve had to disable it, and I miss it already ๐Ÿ™

    • #2049
      chrissoutham
      Member

      I’ve found a fix but it created a couple more errors. I’ll create a different thread related to just WP Helpers in that forum.

    • #2050
      Steve
      Keymaster

      @chrisoutham– We replaced the function. Will have a solution in a few hours.

    • #2051
      chrissoutham
      Member

      Nice one @Steve, I’ll hold off until then ๐Ÿ˜€
      Cracking work as always. Piklist really did change my view on WordPress development.

    • #2052
      Steve
      Keymaster

      @chrissoutham– Just released WP Helpers v1.5.5 which fixes the issue. So happy you’re loving Piklist and WP Helpers!

    • #2054
      Kevin
      Keymaster

      @zanedickens – I knew someone was using conditions that way ๐Ÿ™‚ In the newest version we added casting to the conditions value for better checking, so now ‘2’ which is a string should now be 2. This way we can use numbers or strings as values now against the keys of choices. Your updated code would look like below, let me know if you have any other questions and thanks again for reporting the issue quickly.

        piklist('field', array(
            'type' => 'radio'
            ,'field' => 'header_format'
            ,'value' => '1'
            ,'label' => 'Select a Header Ad Format'
            ,'attributes' => array(
              'class' => 'text'
            )
            ,'choices' => array(
              1 => '3 Small banners'
              ,2 => '1 Medium + 1 Small'
              ,3 => '1 Large'
            )
        ));
      
        // SMALL ADVERTS
      
        piklist('field', array(
            'type' => 'text'
            ,'field' => 'small_ad_1'
            ,'description' => __('<strong>Small Advert 1 Image URL</strong><p>Link to the first image file on MFM, e.g. http://mfm.co.za/wp-content/uploads/2014/07/Logo.png</p>')
            ,'columns' => '8'
            ,'attributes' => array(
           'class' => 'text'
            )
            ,'conditions' => array(
              array(
                'field' => 'header_format'
                ,'value' => 1
                ,'reset' => false
              )
            )
          ));
      
        piklist('field', array(
             'type' => 'text'
             ,'field' => 'small_ad_1_url'
             ,'description' => __('<strong>Small Advert 1 Destination URL</strong><p>Link to the first advert destination, not on MFM, e.g. http://google.co.za</p>')
             ,'columns' => '8'
             ,'attributes' => array(
               'class' => 'text'
             )
             ,'conditions' => array(
              array(
                'field' => 'header_format'
                ,'value' => 1
                ,'reset' => false
              )
            )
         ));
      
        piklist('field', array(
            'type' => 'text'
            ,'field' => 'small_ad_2'
            ,'description' => __('<strong>Small Advert 2 Image URL</strong>')
            ,'columns' => '8'
            ,'attributes' => array(
                'class' => 'text'
            )
             ,'conditions' => array(
              array(
                'field' => 'header_format'
                ,'value' => 1
                ,'reset' => false
              )
            )
          ));
      
        piklist('field', array(
            'type' => 'text'
            ,'field' => 'small_ad_2_url'
            ,'description' => __('<strong>Small Advert 2 Destination URL</strong>')
            ,'columns' => '8'
            ,'attributes' => array(
                'class' => 'text'
            )
             ,'conditions' => array(
              array(
                'field' => 'header_format'
                ,'value' => 1
                ,'reset' => false
              )
            )
         ));
      
        piklist('field', array(
            'type' => 'text'
            ,'field' => 'small_ad_3'
            ,'description' => __('<strong>Small Advert 3 Image URL</strong>')
            ,'columns' => '8'
            ,'attributes' => array(
                'class' => 'text'
            )
             ,'conditions' => array(
              array(
                'field' => 'header_format'
                ,'value' => 1
                ,'reset' => false
              )
            )     
          ));
      
        piklist('field', array(
            'type' => 'text'
            ,'field' => 'small_ad_3_url'
            ,'description' => __('<strong>Small Advert 3 Destination URL</strong>')
            ,'columns' => '8'
            ,'attributes' => array(
                'class' => 'text'
            )
             ,'conditions' => array(
              array(
                'field' => 'header_format'
                ,'value' => 1
                ,'reset' => false
              )
            )     
          ));
      
        // MEDIUM ADVERTS
      
        piklist('field', array(
            'type' => 'text'
            ,'field' => 'medium_ad_1'
            ,'description' => __('<strong>Medium Advert 1 Image [435(w) x 60(h)px] URL</strong>')
            ,'columns' => '8'
            ,'attributes' => array(
                'class' => 'text'
            )
             ,'conditions' => array(
              array(
                'field' => 'header_format'
                ,'value' => 2
                ,'reset' => false
              )
            )     
          ));
      
        piklist('field', array(
            'type' => 'text'
            ,'field' => 'medium_ad_1_url'
            ,'description' => __('<strong>Medium Advert 1 Destination URL</strong>')
            ,'columns' => '8'  
            ,'attributes' => array(
                'class' => 'text'
            )
             ,'conditions' => array(
              array(
                'field' => 'header_format'
                ,'value' => 2
                ,'reset' => false
              )
            )     
          ));
      
        piklist('field', array(
            'type' => 'text'
            ,'field' => 'medium_ad_2'
            ,'description' => __('<strong>Medium Advert 2 Image [205(w) x 60(h)px] URL</strong>')
            ,'columns' => '8' 
            ,'attributes' => array(
                'class' => 'text'
            )
             ,'conditions' => array(
              array(
                'field' => 'header_format'
                ,'value' => 2
                ,'reset' => false
              )
            )     
          ));
      
        piklist('field', array(
            'type' => 'text'
            ,'field' => 'medium_ad_2_url'
            ,'description' => __('<strong>Medium Advert 2 Destination URL</strong>')
            ,'columns' => '8'
            ,'attributes' => array(
                'class' => 'text'
            )
             ,'conditions' => array(
              array(
                'field' => 'header_format'
                ,'value' => 2
                ,'reset' => false
              )
            )     
          ));
      
        // LARGE ADVERT
      
        piklist('field', array(
            'type' => 'text'
            ,'field' => 'large_ad'
            ,'description' => __('<strong>Large Advert Image [665(w) x 60(h)px] URL</strong>')
            ,'columns' => '8'
            ,'attributes' => array(
                'class' => 'text'
            )
             ,'conditions' => array(
              array(
                'field' => 'header_format'
                ,'value' => 3
                ,'reset' => false
              )
            )     
          ));
      
        piklist('field', array(
            'type' => 'text'
            ,'field' => 'large_ad_url'
            ,'description' => __('<strong>Large Advert Destination URL</strong>')
            ,'columns' => '8'
            ,'attributes' => array(
                'class' => 'text'
            )
             ,'conditions' => array(
              array(
                'field' => 'header_format'
                ,'value' => 3
                ,'reset' => false
              )
            )     
          ));
    • #2055
      chrissoutham
      Member

      Thanks @Steve, that fixed the initial bug with WP Helpers.
      There are a couple more, not sure if you can see them – it’s the same when I applied my fix too.

      Within WordPress Helper:
      Tabs are now in reverse order! ๐Ÿ˜‰
      ‘Remove Dashboard Widgets’ has multiple duplicate checkboxes, same with ‘Remove Widgets’.

    • #2056
      Steve
      Keymaster

      @chrissoutham– Was just able to push an update for the tabs. We don’t see the issue with “Remove Dashboard Widgets” or “Remove Widgets”.

      Can you email screenshots to: [email protected]

    • #2078
      zanedickens
      Member

      @kevin – Thanks! works perfectly now ๐Ÿ™‚

Viewing 11 reply threads
  • The topic ‘Bugs in 0.9.4.0’ is closed to new replies.