Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: Related Entries Query Issue

Status Resolved
Add-on / Version Publisher
Severity Critical
EE Version 24

Matt Bulfair

Mar 28, 2013

I know this is a 3rd party plugin, but this worked in version 0.98.1 and now doesn’t

In my channel I am embedding related posts, based on Solspace Tag’s Module.

I am using this code in the embed:

{exp:tag:related_entries channel="article" entry_id="{embed:entry_id}” orderby=“relevance”}

  • {tag_relevance_percent}%  {title}
  •   {/exp:tag:related_entries}

    I get this error:
    Fatal error: Call to undefined method Publisher_entry::order_query_result() in /expressionengine/third_party/publisher/ext.publisher.php on line 492

    If I remove the orderby it will work, however I need it be sorted by most relevant posts.

    Any help would be awesome.

    #1

    BoldMinded (Brian)

    Call to an undefined method makes me think the publisher_entry model wasn’t updated properly. Its basically saying the method does not exist.

    #2

    Matt Bulfair

    Am I possibly missing a file from the 0.98.2 update? Should I wait to get 0.98.3, because this worked in 0.98.1

    #3

    Matt Bulfair

    I Updated to the package you sent me last week named 0.98.2d and while it seems to fix that issue, I get a PHP error:

    Severity: Notice

    Message: Undefined index: relevance

    Filename: models/publisher_entry.php

    Line Number: 616

    #4

    BoldMinded (Brian)

    I’ll try to look into it this weekend.

    #5

    BoldMinded (Brian)

    Are you using 0.98.3? Line 616 is part of a function comment.

    #6

    Matt Bulfair

    Seems 0.98.4 fixes the issue.

    #7

    BoldMinded (Brian)

    Sweet!

    #8

    Matt Bulfair

    Well it seems I was wrong, it worked and then stopped at random.. I am running 0.98.4

    I did have a weird error where nothing worked, then it did in the admin, it couldn’t find any of my languages.

    Regardless. I have a screenshot of what I am seeing:

    http://sprng.me/hqr0u

    in case that doesn’t work: http://springpad-user-data.s3.amazonaws.com/09d2f/09d2f4932c23cb325db2559e1b704382/relevanterror.jpg

    #9

    BoldMinded (Brian)

    In publisher_model.php just above line 480 find this:

    $this->session->cache['publisher']['cfields'][$this->EE->publisher_lib->site_id] = array();

    Add this after it

    $this->session->cache['publisher']['cfields_flipped'][$this->EE->publisher_lib->site_id] = array();

    See if that does it.

    #10

    BoldMinded (Brian)

    So it should look like:

    $this->session->cache['publisher']['cfields'][$this->EE->publisher_lib->site_id] = array();
    $this->session->cache['publisher']['cfields_flipped'][$this->EE->publisher_lib->site_id] = array();
    #11

    Matt Bulfair

    So line 478 currently starts with:

    if ($flipped) { return $this->session->cache[‘publisher’][‘cfields_flipped’][$this->EE->publisher_lib->site_id][$name][$return]; } else { return $this->session->cache[‘publisher’][‘cfields’][$this->EE->publisher_lib->site_id][$name][$return]; }

    Am I removing the if condition?

    #12

    BoldMinded (Brian)

    No, just add the new line to it so the variable is set.

    $this->session->cache[‘publisher’][‘cfields_flipped’][$this->EE->publisher_lib->site_id] = array();

    #13

    BoldMinded (Brian)

    This should be done before the conditional.

    #14

    Matt Bulfair

    I cleared the EE cache, and the error came back.. It’s odd because the errors went away when it was cached. Line 478 is now: $this->session->cache[‘publisher’][‘cfields_flipped’][$this->EE->publisher_lib->site_id] = array(); followed by the if($flipped)

    #15

    Brian Litzinger

    This was resolved via email and a fix will be in 0.98.5

    Login to reply