Tagged: ,

Viewing 28 reply threads
  • Author
    Posts
    • #11007
      thor
      Member

      I get several of these “errors” on pages where I have piklist meta fields:

      
      Notice: Trying to access array offset on value of type bool in /var/www/.../wp-content/plugins/piklist/includes/class-piklist-meta.php on line 126
      
    • #11084
      swalker
      Participant

      I seem to have this issue also

    • #11085
      Steve
      Keymaster

      Can you send me the Piklist /parts/ file that is outputting that error?

    • #11086
      swalker
      Participant

      Will do now in a private reply – thank you!

    • #11087
      swalker
      Participant
      This reply has been marked as private.
    • #11088
      swalker
      Participant
      This reply has been marked as private.
    • #11089
      Steve
      Keymaster

      @swalker– not the file from the Piklist plugin. The file that generating the fields that are throwing that error

    • #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.

    • #11091
      swalker
      Participant

      Oh sorry – the error says it’s line 126 of that file

      I think its this

      https://gist.github.com/shereewalker/48d699a722f404cc55e73cf22bf49c54

    • #11092
      Steve
      Keymaster

      Looks like it may be a PHP 7.4 thing. Can you edit lines 126-136 in class-piklist-meta.php and change to this:

      if( !is_null( $meta_box['id'])) {
      	if ($meta_box['id'] == $id)
      	{
      		if ($action == 'remove')
      		{
      			unset($wp_meta_boxes[$page][$context][$priority][$order]);
      
      			return $order;
      		}
      
      		$check = true;
      	}
      }

      Let me know if that fixes the issue.

    • #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’])) { …

    • #11094
      Steve
      Keymaster

      Please double check it saved, because it’s still referencing line 126 even though the old code is probably 127 or 128

    • #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…

    • #11096
      Steve
      Keymaster

      Ugh. This is tough to test because I can’t reproduce. Can you email me your Piklist code so I can test? Send to support at piklist.com

    • #11097
      swalker
      Participant

      I’m afraid id did not work for me either

    • #11098
      thor
      Member
      This reply has been marked as private.
    • #11099
      swalker
      Participant
      This reply has been marked as private.
    • #11100
      swalker
      Participant

      Would it help if I gave you my login credentials so you could see it?

    • #11101
      thor
      Member
      This reply has been marked as private.
    • #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?

    • #11103
      Steve
      Keymaster

      If your Piklist code is in a custom plugin then I need that plugin. If it’s in a custom theme, then I need that theme.

      How to tell:
      PLUGIN: look for a /parts/ folder
      THEME: look for a /piklist/parts/ folder

    • #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 🙂

    • #11105
      swalker
      Participant

      It looks like it’s in a theme

    • #11106
      swalker
      Participant

      Unfortunately I cleared the WordPress Cache, the browser cache AND logged out and back in again

    • #11107
      Steve
      Keymaster

      @thor– Awesome! We’ll get that out.

    • #11108
      swalker
      Participant

      Hi Steve – do you need my entire theme folder?

    • #11109
      Steve
      Keymaster

      @swalker– Thor said the change worked. We’ll get it out tomorrow and you can upgrade normally.

    • #11110
      swalker
      Participant

      Hi Steve,

      Is there a changelog anywhere?

      Thanks
      SHeree

    • #11111
      Steve
      Keymaster

      You can download version 1.0.11 from WordPress.org, which should fix the issue.

      Changelog is here: https://wordpress.org/plugins/piklist/#developers

Viewing 28 reply threads
  • The topic ‘Notice: Trying to access array offset on value of type bool’ is closed to new replies.