Fatal error: include-exclude extension after update
-
Dear Anh Tran
I got a white screen on admin when I updated the include-exlude metabox plugin before the weekend –> Version 1.0.6I have reverted to Version 1.0.5 and can now access the admin.
I tested activating again and got the following fatal error message:
Fatal error: Can’t use function return value in write context in /**/**/**/wp-content/plugins/meta-box-include-exclude/class-mb-include-exclude.php on line 258
***
I was wondering if anyone else has experienced this – or if the error message helps any?
-
Thanks for letting me know. Can you post the code you use to register meta boxes that triggers the error?
Sure: it’s a bit long.
// !META BOXES add_filter( 'rwmb_meta_boxes', 'casketfive_register_meta_boxes' ); function casketfive_register_meta_boxes( $meta_boxes ) { $prefix = 'casketfive_'; // !Casket News and Audio $meta_boxes[] = array( 'id' => 'footermeta', 'title' => 'NEWS and AUDIO panels (appear site-wide)', 'post_types' => array( 'page' ), 'include' => array( 'ID' => array( 4 ), ), 'fields' => array( array( 'name' => __( 'News title', 'casketfive' ), 'id' => $prefix . 'newspaneltitle', 'desc' => __( 'Title for news panel', 'casketfive' ), 'type' => 'text', ), array( 'name' => __( 'News text - approx 80 words', 'casketfive' ), 'id' => $prefix . 'newspaneltext', 'type' => 'wysiwyg', 'options' => array( 'textarea_rows' => 8, 'teeny' => true, 'media_buttons' => false, ), ), array( 'name' => __( 'News link', 'casketfive' ), 'id' => $prefix . 'newspanelurl', 'desc' => __( 'Add full URL to page on or off website. Include https://', 'casketfive' ), 'type' => 'url', ), array( 'name' => __( 'News link text', 'casketfive' ), 'id' => $prefix . 'newspanelurltext', 'desc' => __( 'URL Link text', 'casketfive' ), 'type' => 'text', ), array( 'name' => __( 'Audio text - approx 80 words<br>Links to Audio Page', 'casketfive' ), 'id' => $prefix . 'audiopaneltext', 'type' => 'wysiwyg', 'options' => array( 'textarea_rows' => 8, 'teeny' => true, 'media_buttons' => false, ), ), ) ); // !Audio for Story posts $meta_boxes[] = array( 'id' => 'audiostory', 'title' => 'AUDIO LINK', 'post_types' => array( 'story' ), 'fields' => array( array( 'name' => __( 'Audio Url', 'casketfive' ), 'id' => $prefix . 'audiofile', 'desc' => __( 'Copy the <b>Media Url</b> from related Podcast Episode (Posts) here.', 'casketfive' ), 'type' => 'url', ), array( 'name' => __( 'Voice Artist(s)', 'casketfive' ), 'id' => $prefix . 'voice', 'desc' => __( 'Add name of voice artist (use \'and\' plus commas if more than one.)', 'casketfive' ), 'type' => 'text', ), ) ); // !Pages meta $meta_boxes[] = array( 'id' => 'audiostory', 'title' => 'PAGE QUOTE - optional', 'post_types' => array( 'page' ), 'exclude' => array( 'ID' => array( 4 , 6760 ), ), 'fields' => array( array( 'name' => __( 'Page quote', 'casketfive' ), 'id' => $prefix . 'pagequote', 'desc' => __( 'Add a quote for the bottom of the page. Do not add inverted commas - just the words', 'casketfive' ), 'type' => 'textarea', ), array( 'name' => __( 'Quote citation', 'casketfive' ), 'id' => $prefix . 'pagecite', 'desc' => __( 'Who said this?', 'casketfive' ), 'type' => 'text', ), array( 'name' => __( 'Page foot Image', 'casketfive' ), 'id' => $prefix . 'pagefootimg', 'type' => 'image_advanced', 'max_file_uploads' => 1, ), ) ); // !Brooches meta // Default value update https://stackoverflow.com/questions/21171003/metabox-in-wordpress-not-updating-on-existing-posts $meta_boxes[] = array( 'id' => 'broochmeta', 'title' => 'BROOCH BACKGROUND: If your brooch is very light opt for a dark background on pop-up<br><br>BROOCH QUOTE: Optional quote for bottom of the page.<br><br>IMAGES: Please add the following images to the media library and then attach on this page.<br>1) Featured Image: 1024px maximum width or height<br>2) Desktop image. 3000px width x 380px height. Cropped image should be 1500px width, positioned to the left.<br>3) Devices image (for table and mobile): 1024px width x 190px height', 'post_types' => array( 'brooches' ), 'fields' => array( array( 'name' => __( 'Brooch Background', 'casketfive' ), 'desc' => __( '<b>Tick for a dark background for the zoom popup</b>', 'casketfive' ), 'id' => $prefix . 'broochbg', 'type' => 'checkbox', 'std' => 0, ), array( 'name' => __( 'Brooch page quote', 'casketfive' ), 'id' => $prefix . 'broochquote', 'desc' => __( 'Add a quote for the bottom of the brooch page. Do not add inverted commas - just the words', 'casketfive' ), 'type' => 'textarea', 'std' => __( 'Often I don’t recognize faces, but I always recognize the jewellery', 'casketfive' ), ), array( 'name' => __( 'Brooch page quote citation', 'casketfive' ), 'id' => $prefix . 'broochcite', 'desc' => __( 'Who said this?', 'casketfive' ), 'type' => 'text', 'std' => __( 'Jean Giraudoux 1882 -1944', 'casketfive' ), ), array( 'name' => __( 'Desktop Image', 'casketfive' ), 'desc' => 'Url for Desktop image: 3000px width x 380px height. Image should be 1500px width, positioned to the left.', 'id' => $prefix . 'desktop', 'type' => 'url', ), array( 'name' => __( 'Devices Image', 'casketfive' ), 'desc' => 'Mobile Devices image (for table and mobile): 1024px width x 190px height.', 'id' => $prefix . 'devices', 'type' => 'image_advanced', 'max_file_uploads' => 1, ), ) ); return $meta_boxes; } if ( ! function_exists( 'rwmb_meta' ) ) { function rwmb_meta( $key, $args = '', $post_id = null ) { return false; } }
Looks like a bug with PHP 5.2. I’ve just updated the extension, please update it.
Thanks v. much for looking into this – I haven’t been able to update the extension as for some reason the metabox updater hasn’t triggered the new 1.0.7 version – and my account is lapsed so can’t manually download the new version.
Looks like your license is expired. Please renew it by purchasing the extension again, then you can manual download and the Update will work.
Done – and it’s fine. Thanks v. much.
Looks like your license is expired. Please renew it by purchasing the extension again, then you can manual download and the Update will work.
If there’s any more help needed in this topic please take it up with the author on his site directly.
As the author is aware, commercial products are not supported in these forums. As you are their customer I am sure they will have no problem supporting you there.
I have paid for a new year – hadn’t realised the lapse, so it’s been useful for me to be able to get in contact with MB support here. Support is very good, so am very happy to pay!
- The topic ‘Fatal error: include-exclude extension after update’ is closed to new replies.