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

Last Updated on: 31st July 2017, 10:33 am

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.

 

5 responses

  1. […] 경우 “How to fix revolution slider MySQL Fatal error: Uncaught exception ‘Exception’ with message ‘f…” 글을 참고로 문제를 해결할 수 […]

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

    1. Con Schneider Avatar
      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(?).

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

    1. Con Schneider Avatar
      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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Con Schneider