Gravity Forms Error
Asked Answered
P

6

19

I keep trying to setup a notification when a form is submitted but I'm not getting the emails. When I go back in to edit the notification, it is not there. It's like it is not saving that. Then I noticed this on the notifications page: function WP_List_Table::get_columns() must be over-ridden in a sub-class. Any idea what that means?

Note: It is saving the submissions in the entries area of the plugin.

Pamela answered 27/8, 2015 at 19:35 Comment(0)
S
48

There is a simple fix for this without upgrading Gravity Forms, but you'd have to edit a plugin file for Gravity Forms.

in notification.php, in the class

GFNotificationTable extends WP_List_Table { ...

Add this method:

    function get_columns() {
        $columns = array(
                'name' => 'Name',
                'subject' => 'Subject'
                );
        return $columns;
    }

The same solution can be applied to any plugin where you're seeing this problem. The columns array just needs to match the names set as $this->_column_headers.

Stannic answered 28/9, 2015 at 4:34 Comment(1)
Please note that the answer below is also relevant to fixing the issue. You should also add the above function to the file: form_settings.php inside class GFConfirmationTable extends WP_List_table { ...Jagir
H
41

Adding to the previous answer, to fully fix the problem you'll need to also place that same function:

function get_columns() {
        $columns = array(
                'name' => 'Name',
                'subject' => 'Subject'
                );
        return $columns;
    }

In the GF form_settings.php file under the class GFConfirmationTable extends WP_List_Table.

The first fixes the Notifications error and this fixes the Confirmations error.

Howze answered 3/10, 2015 at 20:31 Comment(1)
Thanks for sharing! I didn't want to upgrade my Gravity forms license for such a simple fix/problem that I strongly feel Gravity should of offered as a free upgrade patch release or at the least, they should of offered an instructional post like this Q&A did!Heavyweight
P
4

I figured it out. Once I put the license key into the settings, I was able to download the update. Installed and the error went away.

Pamela answered 27/8, 2015 at 20:20 Comment(0)
B
3

You also have to add it to: class GFAddOnFeedsTable extends WP_List_Table of file "class-gf-feed-addon.php" in includes/addons folder in order for add ons to work.

function get_columns() {
    $columns = array(
            'name' => 'Name',
            'subject' => 'Subject'
            );
    return $columns;
}
Boraginaceous answered 26/11, 2015 at 16:9 Comment(0)
P
1

You have to try this code inside wp-admin/includes/class-wp-list-table.php

Copy and paste this code inside the function public function get_columns() at line 872.

$columns = array(
'name' => 'Name',
'subject' => 'Subject'
);
return $columns;
Pterous answered 21/1, 2016 at 10:58 Comment(0)
S
-2

I have tried this code snippet and it worked!

function get_columns() {
    $columns = array(
            'name' => 'Name',
            'subject' => 'Subject'
            );
    return $columns;
}
Selfrevealing answered 5/12, 2015 at 1:38 Comment(1)
This needs some further explanation to be useful. How would the OP apply this to their given problem?Forwarder

© 2022 - 2024 — McMap. All rights reserved.