Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Contributor P?r Thernstr?m

    (@eskapism)

    Is the plugin active?

    Thread Starter Codestone

    (@codestone)

    Yes

    Plugin Contributor P?r Thernstr?m

    (@eskapism)

    Ok, then I’m clueless. The plugin has the function in the file functions.php, and if that file where not loaded you would have gotten a error about that.

    Thread Starter Codestone

    (@codestone)

    Here is the site before upgrade https://www.m-science.com

    And here it is on 4.1.1 https://testwww.m-science.com

    Thanks for helping

    Plugin Contributor P?r Thernstr?m

    (@eskapism)

    https://testwww.m-science.com/ is inaccessible (timeout).

    Thread Starter Codestone

    (@codestone)

    Can you see this: Fatal error: Call to undefined function simple_fields_register_field_group() in /var/www/wordpress/wp-content/themes/m-science_bak2/simple_fields_config.php on line 39

    or nothing at all?

    Thread Starter Codestone

    (@codestone)

    Please try again now – you should be able to see it.

    Thanks

    Plugin Contributor P?r Thernstr?m

    (@eskapism)

    i see it now. have you really really checked that the plugin is active, after you updated it?

    does the field you’ve added in simple fields show up in the admin?

    Thread Starter Codestone

    (@codestone)

    I can’t see admin on the testwww – it has white screen too.

    Shall I try to restore and upgrade again – making sure plugin is active?

    Plugin Contributor P?r Thernstr?m

    (@eskapism)

    in simple_fields_config you could probably do something like this at the top:

    if (!function_exists("simple_fields_register_field_group")) {
      return;
    }

    and then you would be able to login to your site, and then activate simple fields again.

    Thread Starter Codestone

    (@codestone)

    Thanks – tried that and got the following error:

    Parse error: syntax error, unexpected ‘;’, expecting T_PAAMAYIM_NEKUDOTAYIM in /var/www/wordpress/wp-content/themes/m-science_bak2/simple_fields_config.php on line 2

    Still no access to admin

    Plugin Contributor P?r Thernstr?m

    (@eskapism)

    that’s an error in your file, not in the plugin. check your code again, something is wrong somewhere there.

    Thread Starter Codestone

    (@codestone)

    Thank you for trying to help.

    I inherited this site and have little to no knowledge of PHP so excuse me if I sound dumb.

    I have spotted an add-on plugin wirtten by the site author, could this be conflicting with ‘Simple Fields’?

    <?php
    /*
    Plugin Name: Button Field
    Description: Add on for simple fields plugin
    Version: 1.0
    Author: Rafael G. Lepper
    */
    add_action("plugins_loaded", "init_simple_fields_field_button");
    
    function init_simple_fields_field_button() {
    
        class simple_fields_field_button extends simple_fields_field {
    
            public $key = "buttonfield", $name = "Button field";
    
            function __construct() {
                parent::__construct();
            }
                    /**
             * Output fields and stuff on post edit page
             * This is the output a regular user will see
             */
            function options_output($existing_vals) {
                return ;
            }
    
            function edit_output($saved_values, $options) {
    
                // name tex. date: simple_fields_fieldgroups[3][1][new0]
                // name denna: simple_fields_fieldgroups[3][2][new0][option1]
                // allts? ett steg till = bra f?r vi kan lagra fler saker med mindre problem. hej hopp.
                $output = "";
                $output .= sprintf(
                    '
                        <label for="%2$s">Button text</label>
                        <input type="text" placeholder="Button text" name="%1$s" id="%2$s" value="%3$s"><br>
                        <label for="%5$s">Button link</label>
                        <input type="text" placeholder="Button link" name="%4$s" id="%5$s" value="%6$s">
                    ',
                    $this->get_options_name("text"),
                    $this->get_options_id("text"),
                    esc_attr(@$saved_values["text"]),
                    $this->get_options_name("link"),
                    $this->get_options_id("link"),
                    esc_attr(@$saved_values["link"])
                );
    
                return $output;
    
            }
    
            /**
             * Before the values are returned
             */
            function return_values($values) {
                foreach ($values as &$one_field) {
                    foreach ($one_field as $one_field_key => &$one_field_value) {
                        if ($one_field_key == "text") {
                            $one_field_value = $one_field_value . "";
                        }
                    }
                }
                return $values;
            }
    
        }
    
        simple_fields::register_field_type("simple_fields_field_button");
    
    }
    Thread Starter Codestone

    (@codestone)

    In case it helps… When I am on WordPress 3.9.3 and all I do is upgrade simple fields from 1.4.6 to 1.4.8 it results in white screen for admin area.

    Plugin Contributor P?r Thernstr?m

    (@eskapism)

    I think you need to check our error logs. I’m not aware of anything in 1.4.8 that would make your site crash like this.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Fatal Error after 4.1.1 upgrade’ is closed to new replies.