• Resolved vizyul

    (@vizyul)


    The latest update to the Gravity Forms – Edit Entries plugin contains an error that breaks both the front-end and backend wordpress site. This isa summary of what’s wrong

    Found it. There are two separate problems, and the first one is what’s blocking activation.

    The parse error: <? instead of <?php

    Right after the closing </form> tag in bp_add_quick_edit_markup():

    php

            </form>
            <?
    
            // RIP
            wp_die();
        }

    short_open_tag is off by default on PHP 7 and 8, so PHP never reopens into code there. Everything after it — wp_die();, the closing brace of the function, and the closing brace of the if (class_exists('GFForms')) block — gets treated as literal HTML. PHP then hits end of file with two braces still open and throws Parse error: syntax error, unexpected end of file. That happens at include time, which is exactly when WordPress sandboxes the activation, so you get the generic “fatal error” notice.

    Fix:

    php

            </form>
            <?php
    
            // RIP
            wp_die();
        }

    The runtime fatal: fw_print()

    Even after that, bpgf_edit_markup() will crash your admin on the next page load:

    php

    function bpgf_edit_markup(){
        $field = GFFormsModel::get_entry(176);
        $form = GFAPI::get_form(5);
        fw_print($form['fields']);
    }

    fw_print() isn’t a PHP or WordPress function — it’s from the Unyson theme framework. Unless Unyson is active, this is Call to undefined function fw_print(). And it’s hooked to admin_footer, so it fires on every single admin page. The hardcoded 176 and 5 make it clear this is leftover debug scaffolding. Delete the function and its add_action('admin_footer', 'bpgf_edit_markup'); line, or comment out the fw_print call and swap it for error_log( print_r( $form['fields'], true ) );.

    One more to watch

    Both AJAX handlers start with if (!DOING_AJAX). On PHP 8, referencing an undefined constant is a fatal Error, not a notice like it was on PHP 7. DOING_AJAX is only defined when WordPress is actually handling an AJAX request, so use if ( ! wp_doing_ajax() ) instead. Same for the unguarded $_POST['nonce'] reads — those will throw warnings on a malformed request.

    Make the <?php fix first and try activating again. If it goes through, you’ve confirmed the diagnosis.

Viewing 1 replies (of 1 total)
  • Plugin Author Kleinmann

    (@kleinmannbrightvessel)

    Hi @vizyul,

    Thanks for sharing your feedback with us and the community!
    Please update to the new version v1.2 and let us know how it works for you.

    – Best regards

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.