Recently I was working on a website that has old RevSlider from 2014! It never got updated and the previous developers never cared to check or update the theme or the slider plugin.
Since WordPress is migrating to jQuery 3.x, I went to check into the site to make sure none of the plugins are dependent on jQuery and if they are, I need to add some fixes if the plugin devs don’t do anything.
Well, it turned out that none of the plugins were updated and it was running on old WordPress from 2014!
The people who developed the website couldn’t breathe without RevSlider plugin and I had to update everything. They bought the theme and the plugin came with it so they didn’t have a clue on what was going on. So, as soon as I updated the WordPress, the whole site broke into pieces!
So, I am going to add a quick fix that worked for me but first let’s see what the error looked like.
The error starts with “Fatal error: Uncaught Error: Call to undefined function mysql_error()”
My error was pointing to couple of files in the slider plugin directory.
The first error was base_admin.class.php which is located at wp-content/plugins/revslider/inc_php/framework/base_admin.class.php
The variable $arrMetaBoxes was defined as a string and I changed that variable to an array. your error should mention the line number as well.
$arrMetaBoxes = ""; // remove this
$arrMetaBoxes = array(); // add this
The second error was pointing db.class.php which is located at wp-content/plugins/revslider/inc_php/framework/db.class.php
The function RevSlider is calling was deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0. Instead, the MySQLi or PDO_MySQL extension should be used.
On PHP official site, there is a mention of this error.
Here is the fix:
if(mysql_error()){ // remove this
if($this->wpdb->last_error){ // add this
Both of the errors mention the line number and variable so that it makes our job a bit easier (not a whole lot though).
error functions mysql plugin quick fix RevSlider solution undefined