How to perform: "function WP_List_Table::get_columns() must be over-ridden in a sub-class.&quot

Hi, and thanks for your help.

I am using the "Placester real estate builder" plugin with the "Scribe" Up Front theme.

The Placester plugin is preventing any other widgets/plugins/shortcodes from appearing correctly.

The Placester plugin does display a message: "function WP_List_Table::get_columns() must be over-ridden in a sub-class."

I don't know how to "over-ride in a sub-class". Can you tell me how to perform this request?

The Placester plugin is critical to me. If I can get the Up Front themes to work with the Placester plugin, I can move dozens of clients to your platform.

Thank you.

  • Adam Czajczyk

    Hey Justin,

    I hope you're well today and thank you for your question!

    The WP_List_Table is a native WP core php class that's marked as "private", meaning that can't be used directly in any code. Here's a relevant article:

    https://codex.wordpress.org/Class_Reference/WP_List_Table

    The message you're referring to means that you need your own PHP code to make use of it. "Overriding" function in this case means the code such as:

    class My_WP_List_Table extends WP_List {
    }

    Take a look here please:

    http://php.net/manual/en/keyword.extends.php

    That being said, I'm not familiar with the "Placester real estate builder" plugin so I'm not sure why it wants you to do such things. Could you please elaborate a bit on what exactly are you trying to achieve and how are you using this plugin?

    Thanks!
    Adam

  • Justin

    Hi Adam,

    The Placester real estate plugin displays a real estate data feed; ie, it displays the property information, property search functions, etc. It displays the information in columns and tables (though I don't know if that's relevant).

    I build real estate websites, and I use this plugin to handle/display the real estate data.

    1. When I activated the Placester plugin, it doesn't work - it displays the message about the over-ride. This message appears if you go to the WP admin panel and then Placester > Shortcodes in the left-panel.
    2. I noticed that once I activated the Placester plugin, all of the widgets/shortcodes on the page displayed in "Ooops, something seems to have gone wrong with rendering the widget". So it's also messing up the other plugins, like the WMPU DEV contact form, etc.

    I have granted you access if that helps. I really appreciate your help.

    Justin

  • Adam Czajczyk

    Hey Justin,

    Thanks for this explanation!

    I've checked your site again and tried to replicate the issue on my sandbox. I've found out that there's indeed a conflict between our Upfront-based themes and Placester plugin, however this is because of Placester's built-in cache engine. Unfortunately there's no option to disable this cache.

    That said, I've investigated plugin's code and I believe I got a "work around" for you, it seems to be working on my sandbox. It will require though a bit of "plugin hacking".

    Please follow these steps:

    1. Access your site with FTP
    2. Go to

    /wp-content/plugins/placester/blueprint/functions

    folder
    3. Download the "caching.php" file (and make a copy of it for backup, just in case it didn't work for you and you'd have to revert to the original file)
    4. Open the file with a "clean text" editor (such as Notepad++, Sublime etc)
    5. Around line #52 you should find this line:

    add_action('wp', array(__CLASS__,'widget_cache_redirect_callback'), 99999);

    6. Replace it with this line:

    //add_action('wp', array(__CLASS__,'widget_cache_redirect_callback'), 99999);

    7. Replace the "caching.php" file on your server with edited one

    This will turn off caching for widgets and it seems to be working. I'm pretty sure it shouldn't affect any advanced plugin functionality but please give it a try and let me know. Also note, that unfortunately you'll most likely need to apply this solution each time the Placester plugin is updated.

    That said, I'd suggest letting plugin developers know about it as this most likely may be the issue in case of some other popular "front-end editor" based themes.

    As for the "function WP_List_Table::get_columns() must be over-ridden in a sub-class" error. I've checked the plugin against it as well and it's not something related to our Scribe theme. The same error appears with WP default Twenty Fifteen theme and other. I'm not sure if and how it affects plugin features but this is obviously a plugin bug and should be fixed by it's developer.

    I hope that helps!

    Cheers,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.