Until this issue is addressed by Charles I think it's a good idea to modify Related Videos per Steve's recommendation (posted to the show-in-a-box google group on Oct. 5) so that users who activate K2's live search will not get database errors:
Edit videopress-related-videos.php
change line 349 from:
$temp_related_videos = $wpdb->get_results($sql);
to:
if ($post_ids != NULL) {$temp_related_videos = $wpdb->get_results($sql);};
Steve's original post describing the problem:
On Sep 29, 5:48 pm, elbows <st...@dvmachine.com> wrote:
> I like the livesearch thing in K2. But it causes a problem with
> related videos. Here is the db error:
>
> WordPress database error: [You have an error in your SQL syntax; check
> the manual that corresponds to your MySQL server version for the right
> syntax to use near ') ORDER BY RAND()' at line 3]
> SELECT * FROM wpsiabnearly_videopress
_related_videos WHERE post_id IN
> () ORDER BY RAND()
>
> WordPress database error: [You have an error in your SQL syntax; check
> the manual that corresponds to your MySQL server version for the right
> syntax to use near ') ORDER BY RAND()' at line 3]
> SELECT * FROM wpsiabnearly_videopress_related_videos WHERE post_id IN
> () ORDER BY RAND()
>
> So Im assuming that the plugin has problems if its ona sidebar for a
> page where there are no posts, hence no post_ids. This happens with
> the livesearch when no results are found, but I guess in theory there
> are other scenarios where it could occur?
Comments (0)
You don't have permission to comment on this page.