Title: [Plugin: Yet Another Related Posts Plugin] WordPress database error
Last modified: August 19, 2016

---

# [Plugin: Yet Another Related Posts Plugin] WordPress database error

 *  ResolvedModerator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [17 years, 3 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-wordpress-database-error-1/)
 * I’m reposting since, for some reason, my post was closed (or bozo’d I think).
 * When I go to the admin page for Yarpp and look under the section for Website 
   display code example, I get the error below. Of note, everything seems to work
   just fine!
 * Image: [http://img156.imageshack.us/img156/8817/yarpp.png](http://img156.imageshack.us/img156/8817/yarpp.png)
   
   Code: [http://wordpress.pastebin.ca/1404890](http://wordpress.pastebin.ca/1404890)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [mitcho (Michael Yoshitaka Erlewine)](https://wordpress.org/support/users/mitchoyoshitaka/)
 * (@mitchoyoshitaka)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-wordpress-database-error-1/#post-1061941)
 * Hmm, bizarre, but I think I found a fix: please try adding this to line 384 of`
   magic.php`.
 * >  if ($reference_ID === ” || $reference_ID === false)
   >  return false;
 * So it should look like
 * > function yarpp_cache_enforce($type=array(‘post’),$reference_ID,$force=false){
   > 
   > global $wpdb, $yarpp_debug, $yarpp_caching_queue;
   >  if ($reference_ID === ” || $reference_ID === false)
   >  return false;
   >  $timeout = 600;
   >  if (!$force) {
 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [17 years, 3 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-wordpress-database-error-1/#post-1061948)
 * That was already set (I’m using the 3.0.1 plugin, since I thought I’d try that
   before going forward with a debug).
 *  [mitcho (Michael Yoshitaka Erlewine)](https://wordpress.org/support/users/mitchoyoshitaka/)
 * (@mitchoyoshitaka)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-wordpress-database-error-1/#post-1061949)
 * [@ipstenu](https://wordpress.org/support/users/ipstenu/) the updated version 
   of magic.php I uploaded and linked to [here](http://wordpress.org/support/topic/265515?replies=9#post-1057921)
   also includes this patch, fyi. Please let me know if it works.
 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [17 years, 3 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-wordpress-database-error-1/#post-1061950)
 * I did (since I too use child themes) and it works! Huzzah! Thank you! 🙂
 *  [mitcho (Michael Yoshitaka Erlewine)](https://wordpress.org/support/users/mitchoyoshitaka/)
 * (@mitchoyoshitaka)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-wordpress-database-error-1/#post-1061951)
 * [@ipstenu](https://wordpress.org/support/users/ipstenu/)? I’m confused… those
   two extra lines (the `if $reference_ID === ''`…) is new and not included in 3.0.1.
   Can you try the patch I uploaded?
 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [17 years, 3 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-wordpress-database-error-1/#post-1061953)
 * The patch you uploaded (regarding child themes) fixed the issues.
 * (Which, since I’m using child themes, makes a certain amount of sense. Oy!)
 *  [mitcho (Michael Yoshitaka Erlewine)](https://wordpress.org/support/users/mitchoyoshitaka/)
 * (@mitchoyoshitaka)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-wordpress-database-error-1/#post-1061955)
 * Alright y’all, I got antsy and pushed this as 3.0.2. After wordpress.org updates
   its servers, you’ll be able to download it.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘[Plugin: Yet Another Related Posts Plugin] WordPress database error’ 
is closed to new replies.

 * 7 replies
 * 2 participants
 * Last reply from: [mitcho (Michael Yoshitaka Erlewine)](https://wordpress.org/support/users/mitchoyoshitaka/)
 * Last activity: [17 years, 3 months ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-wordpress-database-error-1/#post-1061955)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
