Forum Replies Created

Viewing 15 posts - 1 through 15 (of 46 total)
  • Author
    Posts
  • in reply to: Shortcodes panel not working #11394
    thor
    Member

    Since PHP 7.4 the unparenthesized usage has been deprecated.
    So in /piklist/parts/forms/shortcode.php changing:

    $index = empty($shortcode_data) ? -1 : array_key_exists('index', $shortcode_data) ? $shortcode_data['index'] : -1;

    to:

    $index = empty($shortcode_data) ? -1 : ( array_key_exists('index', $shortcode_data) ? $shortcode_data['index'] : -1 );

    makes the plugin work again with PHP 8. Perhaps there are other places Piklist will produce an error?

    in reply to: Shortcodes panel not working #11393
    thor
    Member

    Hi Steve,

    I have PHP version 8.0.14 – that is the only change besides updated WordPress and plugins.

    in reply to: Piklist Fatal Error with WP Forms #11392
    thor
    Member

    Hi Steve

    Thanks, it is working now :). It is not affecting other parts of the site?

    in reply to: Notice: Trying to access array offset on value of type bool #11104
    thor
    Member

    No need for more debugging for me. A hard refresh wasn’t enough but when I cleared the browser cache then the added lines worked. Please included it in the next piklist update if possible. Thanks 🙂

    in reply to: Notice: Trying to access array offset on value of type bool #11102
    thor
    Member

    Hmm, it might be working – or I am tired (which might be the case :D)… but the errors are not appearing right now.
    swalker, try logging out clearing cache stuff and see it the error is still there?

    in reply to: Notice: Trying to access array offset on value of type bool #11101
    thor
    Member
    This reply has been marked as private.
    in reply to: Notice: Trying to access array offset on value of type bool #11098
    thor
    Member
    This reply has been marked as private.
    in reply to: Notice: Trying to access array offset on value of type bool #11095
    thor
    Member

    I did – i tried adding a line break to check that I wasn’t making an error editing the wrong file. A line break and it says line 127. So the code is added correctly…

    in reply to: Notice: Trying to access array offset on value of type bool #11093
    thor
    Member

    Hmm, still throws the Notice: Trying to access array offset on value of type bool in /var/www/moumou.dk/cc/wp-content/plugins/piklist/includes/class-piklist-meta.php on line 126

    if( !is_null( $meta_box[‘id’])) { …

    in reply to: Notice: Trying to access array offset on value of type bool #11090
    thor
    Member

    I have tried with the most basic field, and still throws that error. For me it is happening on a custom post type at the moment. I can’t remember if it also happens on regular posts.

    in reply to: Tutorial not working #11003
    thor
    Member

    If I have this:

    
    <?php
    /*
    Name: Test
    Description: Testing
    Shortcode: test
    Icon: dashicons-editor-quote
    */
    
    piklist('field', array(
        'type' => 'text'
        ,'field' => 'my_shortcode'
        ,'label' => 'Demo shortcode'
    ));
    

    and enter “This is a test” in the field, it encodes and outputs the shortcode to

    
    [test my_shortcode="This%20is%20a%20test"]
    

    I understand that this is safer in many cases, but it makes the shortcodes almost unreadable in some cases – and not easily editable – e.g. if it’s an URL as attribute or comma separated values like 1,2,3,4: [test my_shortcode="1%2C2%2C3%2C4"]

    in reply to: Tutorial not working #11000
    thor
    Member

    Thank you Steve. I understand how it works now 🙂

    Is there a way (filter?) to prevent the urlencoding of the shortcode fields/parameters that Piklist returns to the editor?

    in reply to: Add TinyMCE button to editor field #10995
    thor
    Member

    The weird thing is that if I add a teeny editor as the first Piklist field it prevents the next non-teeny editor from showing the buttons from various plugins. Is it a Piklist bug?

    
    piklist('field', array(
    	'type' => 'editor',
    	'field' => 'intro_content',
    	'label' => 'Intro text',
    	'template' => 'field',
    	'options' => array(
    		'wpautop' => true,
    		'media_buttons' => false,
    		'shortcode_buttons' => false,
    		'teeny' => true, // If true - next editor will not have various tinymce plugin buttons
    		'dfw' => false,
    		'quicktags' => true,
    		'drag_drop_upload' => false,
    		'tinymce' => array(
    			'resize' => false,
    			'wp_autoresize_on' => true,
    			'toolbar1' => 'bold,italic,underline,link,unlink',
    			'toolbar2' => '',
    		),
    		'textarea_rows' => 10,
    	),
    	'columns' => 12,
    ));
    
    piklist('field', array(
    	'type' => 'editor',
    	'field' => 'my_content', // 'post_content' is the field name of the WordPress default editor
    	'scope' => 'post', // Save to the wp_post table
    	'label' => 'Post Content',
    	'template' => 'field', // Only display the field not the label
    	'options' => array( // Pass any option that is accepted by wp_editor()
    		'wpautop' => true,
    		'media_buttons' => true,
    		'shortcode_buttons' => true,
    		'teeny' => false,
    		'dfw' => false,
    		'quicktags' => true,
    		'drag_drop_upload' => true,
    		'tinymce' => array(
    			'resize' => false,
    			'wp_autoresize_on' => true,
    		)
    	),
    	'columns' => 12,
    ));
    
    in reply to: Add TinyMCE button to editor field #10994
    thor
    Member

    'teeny' => true
    – was the problem 😀

    And perhaps buttons can be added in teeny mode – https://wordpress.stackexchange.com/questions/248019/how-to-add-button-in-tinymce-teeny-mode. But for now I’ll just set teeny to false

    in reply to: Add TinyMCE button to editor field #10993
    thor
    Member

    Hmm, there must be another plugin interfering. I just tried the approach on a clean install and it works. It has something to to with custom post type since it works on pages.

Viewing 15 posts - 1 through 15 (of 46 total)