When I install the plugin I receive table doesn’t exist errors for the following queries:
SELECT text FROM WHERE id='7'
INSERT INTO wp_instagram_info (id, text) VALUES ('7', '')
INSERT INTO wp_instagram_info (id, text) VALUES ('8', '0')
INSERT INTO wp_instagram_info (id, text) VALUES ('9', '[[\"button_package_1\",\"Followme5.png\"],[\"button_package_1\",\"Followme2.png\"],[\"button_package_1\",\"Followme4.png\"],[\"button_package_1\",\"Followme3.png\"],[\"button_package_1\",\"Followme1.png\"]]')
SELECT text FROM WHERE id='8'
INSERT INTO wp_instagram_user_info (id) VALUES ('1')
Notice the missing table names. If you look inside instagram-picture.php on line 42, an unnecessary global call is made on $instagram_picture_variable which when removed fixes this, but I still received table doesn’t exist errors on wp_instagram_info. The query on line 51 causes this, maybe consider doing a table check first?
$checktable = mysql_query("SHOW TABLES LIKE '$this_table'");
$table_exists = mysql_num_rows($checktable) > 0;
Aha! I just found the problem. In the file inc/output_widget.php on line 285 and 286 the variable $result_follow_me is null. The follow_me value was not saved in the widget_instagram_picture option. When I add it in manually then YAY it works! Then I realized I had to update the widget settings by hitting the save button on the widget page. That does the trick!
One last thing: while your WP_Widget update functions work, they are a bit messy. Maybe use this instead?
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['style'] = strip_tags($new_instance['style']);
$instance['title'] = strip_tags($new_instance['title']);
$instance['link'] = strip_tags($new_instance['link']);
$instance['bild_title'] = strip_tags($new_instance['bild_title']);
$instance['border-radius'] = strip_tags($new_instance['border-radius']);
$instance['follow_me'] = strip_tags($new_instance['follow_me']);
return $instance;
}
I hope this helps!