Reverse Related Entries tag doesn’t parse categories / Bug Report / EllisLab

This bug report is over one year old and may not be relevant.

Clarification Requested (?)

Reverse Related Entries tag doesn’t parse categories

Version: EE 2.2.2, Reporter: Kevin Smith

Since 2.1.3, the Reverse Related Entries tag no longer parses categories, as noted in the forum thread. This is the code that worked in 2.1.3 and doesn’t as of 2.2.2:

{reverse_related_entries channel="articles"}
                        {categories limit
="1"}
                                {if category_id 
=="3"}
                                        
<class="button2" href="{url_title_path='media/press_room'}">PRESS RELEASE</a>
                                
{if:elseif category_id =="13"}
                                        
<class="button2" href="{url_title_path='events/reviews_results'}">REVIEWS/RESULTS</a>
                                
{/if}
                        {
/categories}
                {
/reverse_related_entries} 

Update: It looks like this may be a wider issue with conditionals inside the Channel Entries tag as a whole. See this thread, too.

Comments & Feedback

  1. commenting for updates

    Picture of Dave @ Exp:resso

    Dave @ Exp:resso

  2. Any chance of a patch for this please? Its messing up our sites…  Not a good look telling the client we can’t fix something.

    Picture of Dave @ Exp:resso

    Dave @ Exp:resso

  3. Dave- open up system/expressionengine/modules/mod.channel.php and around line 3864 look for:

    //$tagdata = $this->EE->functions->prep_conditionals($tagdata, $cond); 

    Change it to

    $tagdata $this->EE->functions->prep_conditionals($tagdata$cond); 

    Basically- remove the //.

    Then around line 4275, edit so it looks like:

    // We swap out the conditionals after pairs are parsed so they don't interfere
                // with the string replace
                //$tagdata = $this->EE->functions->prep_conditionals($tagdata, $cond); 

    You add a // before the $tagdata.

    That get it parsing properly for you?
    That should fix the issue.

  4. Thanks Robin, That appears to have fixed it!

    Picture of Dave @ Exp:resso

    Dave @ Exp:resso

  5. Got bit by this one as well…subscribing to make sure it is fixed before the next upgrade.

    Picture of FortySeven Media

    FortySeven Media

You must be logged in to comment on bug reports