Fatal Error
Support › MB Include Exclude › Fatal Error
- This topic has 5 replies, 2 voices, and was last updated 8 years, 2 months ago by
martinschapiro.
-
AuthorPosts
-
February 11, 2017 at 2:57 PM #5060
martinschapiro
ParticipantI updated Meta Box Include/Exclude earlier today and got the following error when I trying to log in just now.
"Fatal Error: Can't use function return value in write context in ...filepath//wp-content/plugins/class-mb-include-exclude.php on line 258"
I've been able to disable the plugin and get back into my site. WordPress will not let me reactivate the plugin. "Plugin could not be activated because it triggered a fatal error."
I see you released a new version of this plugin yesterday, is it possible there is a problem in 1.0.6?
February 13, 2017 at 11:54 AM #5067Anh Tran
KeymasterHi, I couldn't replicate the bug. Can you post your code to register meta boxes?
February 13, 2017 at 12:00 PM #5068martinschapiro
ParticipantI'm registering my metaboxes as a plugin. Perhaps this is contributing to the fatal error? Thank you for looking at this.
<?php /* Plugin Name: Metabox Instances Version: 1.0.1 Author: Martin Schapiro */ function my_scholarship_styles() { $themeVersion = wp_get_theme()->get('Version'); // Enqueue our style.css with our own version wp_enqueue_style('plugin-scholarship-style', plugin_dir_url( __FILE__ ) . '/style.css', array(), $themeVersion); } // Enqueue this theme's scripts and styles (after parent theme) add_action('wp_enqueue_scripts', 'my_scholarship_styles', 20); add_filter( 'rwmb_meta_boxes', 'SCHOLARSHIPPAGE_register_meta_boxes' ); function SCHOLARSHIPPAGE_register_meta_boxes( $meta_boxes ) { $prefix = '_rw_'; // 1st meta box $meta_boxes[] = array( 'id' => 'scholarships', 'title' => __( 'Scholarshop Applicants' ), 'post_types' => array( 'page' ), 'context' => 'normal', 'priority' => 'high', 'include' => array( 'template' => 'page-scholarshipnew.php', ), 'fields' => array( array( 'id' => 'standard', // Gropu field 'type' => 'group', // Clone whole group? 'clone' => true, // Drag and drop clones to reorder them? 'sort_clone' => true, // Sub-fields 'fields' => array( array( 'name' => __( 'Full name', 'textdomain' ), 'desc' => 'Format: First Last', 'id' => $prefix . 'fname', 'type' => 'text', 'class' => 'scholarship-name', 'clone' => false, ), array( 'name' => __( 'Headshot', 'textdomain' ), 'desc' => 'Will be cropped square', 'id' => $prefix . 'headshot', 'type' => 'file_input', 'class' => 'scholarship-headshot', 'clone' => false, ), array( 'name' => __( 'link', 'textdomain' ), 'desc' => 'full URL with http://', 'id' => $prefix . 'link', 'type' => 'text', 'class' => 'scholarship-link', 'clone' => false, ), array( 'name' => __( 'Hometown', 'textdomain' ), 'desc' => 'eg: Tucson, AZ', 'id' => $prefix . 'hometown', 'type' => 'text', 'class' => 'scholarship-town', 'clone' => false, ), array( 'name' => __( 'Vocal Range', 'textdomain' ), 'desc' => 'Alto, Tenor, Soprano, Baritone, Vocal Percussionist, etc.', 'id' => $prefix . 'range', 'type' => 'text', 'class' => 'scholarship-range', 'clone' => false, ), ), ), ), ); return $meta_boxes; } ?>
February 13, 2017 at 12:17 PM #5070Anh Tran
KeymasterI couldn't replicate the issue. Here is my screencast:
February 14, 2017 at 1:37 PM #5078Anh Tran
KeymasterLooks like a compatibility with PHP 5.2. I've updated the extension, please try again.
February 15, 2017 at 7:02 AM #5095martinschapiro
ParticipantThanks so much. The update seems to have resolved the issue.
-
AuthorPosts
- The topic ‘Fatal Error’ is closed to new replies.