ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Reverse Related Entries not working

May 03, 2010 8:07pm

Subscribe [3]
  • #1 / May 03, 2010 8:07pm

    David Hemphill

    18 posts

    I’m having a very peculiar problem building out a site.

    I have two sites. One is in production and the other is a development site with all the weblogs, fields, entries and data duplicated from the production site. I can’t seem to get reverse_related_entries to show up on the development site. I’m using the same template code and it works great on the production site, but not the other.

    Here is a simplified version of the code:

    {exp:weblog:entries weblog="message_series"}
        <h3>{title}</h3>
    
    <p>    <ul><br />
        {reverse_related_entries weblog="messages"}<br />
            <li>{title}</li><br />
        {/reverse_related_entries}<br />
        </ul><br />
    {/exp:weblog:entries}

    I’m wondering if there is something about cloning existing site data that doesn’t carry the relationships across, or if I’m just plain doing something wrong.

    Thanks for the help!

  • #2 / May 03, 2010 10:19pm

    David Hemphill

    18 posts

    I should also mention that when I first created the development site I received a “Headers already Sent” error. I made another site to see if it would error again and this is what it outputted:

    Notice: Undefined index: 0 in /nfs/c02/h09/mnt/20731/domains/lebanonfamilychurch.org/html/system/cp/cp.sites.php on line 869
    
    Warning: Cannot modify header information - headers already sent by (output started at /nfs/c02/h09/mnt/20731/domains/lebanonfamilychurch.org/html/system/cp/cp.sites.php:869) in /nfs/c02/h09/mnt/20731/domains/lebanonfamilychurch.org/html/system/core/core.functions.php on line 296
  • #3 / May 04, 2010 12:15am

    David Hemphill

    18 posts

    After further inspection, it appears when you duplicate a weblog, any entry that has a related field is still linked to the related field from the site you copied the weblog from.

    For example, say your original weblog has a entry called “Ringo” that is related to an entry called “The Beatles”. When you duplicate and copy those weblogs to a new site, the newly-duplicated entry called “Ringo” is still related to the old entry called “The Beatles”.

  • #4 / May 04, 2010 2:58am

    John Henry Donovan

    12339 posts

    David,

    Can you clear your cache please and see if problem persists?

    Admin ›  Utilities ›  Clear Cached Data

    Are you using the same database for both sites?

    If so then be aware that relationship data is held in the database which may be your problem here. If you duplicated the database and didn’t clear the cache then clearing it will solve that.

  • #5 / May 04, 2010 12:49pm

    David Hemphill

    18 posts

    Last night, I might have taken the long way, but I manually set all the relationships to the new entry. Would clearing the cache have set all those relationships to the correct weblog?

  • #6 / May 04, 2010 4:10pm

    Ingmar

    29245 posts

    Clearing the cache would have allowed all relations to be re-built as needed. I’m no sure how to read your posting, exactly: did you manage to do what you wanted, or do you still need help?

  • #7 / May 05, 2010 12:50pm

    David Hemphill

    18 posts

    I manually reset the relations; I went into every entry and manually adjusted them. So yes, I did get it fixed! 😊 Wish I would’ve thought of clearing the cache first. I changed over 300 entries!

  • #8 / May 05, 2010 3:35pm

    Ingmar

    29245 posts

    Glad to see you’re up and running, even if it did take some work… Please don’t hesitate to post again in case anything else comes up.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases