Con
Yet another WordPress dev

How to fix revolution slider MySQL Fatal error: Uncaught exception ‘Exception’ with message ‘fetch

Today I was playing around with Revolution Slider and had trouble getting it to run in my Multisite test environment.

Upon activation this error would pop up:

“Fatal error: Uncaught exception ‘Exception’ with message ‘fetch – <b>Unknown column ‘type’ in ‘where clause'</b><br>—<br> Query: select * from wp_revslider_sliders where type !=

To solve this edit revslider.php located in revslider root directory:

Add

$rsv = get_option('rs_version', 0);
if(version_compare($revSliderVersion, $rsv, '>')){
RevSliderFront::createDBTables();
RevSliderPluginUpdate::do_update_checks();
update_option('rs_version', $revSliderVersion);
}

Right before:

add_action('plugins_loaded', array( 'RevSliderFront', 'createDBTables' )); //add update checks
add_action('plugins_loaded', array( 'RevSliderPluginUpdate', 'do_update_checks' )); //add update checks

Also add:

update_option('revslider_table_version', '1.0.0');

right before php closing tag.

Here is how it should look:

Screen Shot

Deactivate and reactivate Revolution Slider.
This should fix the error.

 

keep reading?

5 comments

  • After use this solution create every new site import a slider demo.
    can you share solution for this problem.

    • A
      Con Schneider

      I am afraid it has been too long for me since I last used Revolution Slider. You will have to ask the good folks of Revolution Slider support.

  • Excellent! Can you also advise how to keep this code with updates. Through an addon?

    • A
      Con Schneider

      Hi sangos,

      Thank you for your message.

      > Excellent! Can you also advise how to keep this code with updates. Through an addon?

      I am afraid not since I did not look for any hooks or an update friendly way when I was troubleshooting this. However it might be worth to point that out to the revolution slider crew. Maybe they can implement this(?).

Leave your comment