Hi I have just experienced a few problems using Reverse Relationships.
Firstly I am using EE 2.1.3 - build 20101220
I have setup two channels.
Both have different but similar custom field groups and contain a relationship field to another (third) channel.
I ran this script:
{exp:channel:entries channel="services" limit="1" url_title="{segment_2}"}
{if logged_in}
{reverse_related_entries channel="exclusive_offers" sort="desc" orderby="date"}
{if exclusive_image == ""}
<h3>{title}</h3>
<p> {exclusive_description}<br />
{if:else}<br />
{exclusive_image}<br />
</p><h3>{title}</h3>
<p> {exclusive_description}<br />
{/if}<br />
{/reverse_related_entries}<br />
{/if}</p>
<p> {reverse_related_entries channel="special_offers" sort="desc" orderby="date"}<br />
{if offer_image == ""}<br />
</p><h3>{title}</h3>
<p> {offer-description}<br />
{if:else}<br />
{offer_image}<br />
</p><h3>{title}</h3>
<p> {offer-description}<br />
{/if}<br />
{/reverse_related_entries}<br />
{/exp:channel:entries}And got the follow 3 errors
A PHP Error was encountered
Severity: Notice
Message: Undefined index: 1
Filename: channel/mod.channel.php
Line Number: 4044A PHP Error was encountered
Severity: Warning
Message: Invalid argument supplied for foreach()
Filename: channel/mod.channel.php
Line Number: 4044A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /Users/MacPro/Sites/-RBM/system/codeigniter/system/core/Exceptions.php:170)
Filename: core/Common.php
Line Number: 409So then, I changed the channels to share the same custom fields, and it worked like a charm. Could this be a bug?
Next, I went to delete the old custom field group, and also when trying to delete just the relationship field that I no longer needed and get the follow fatal error:
A PHP Error was encountered
Severity: Notice
Message: Undefined property: Rel_ft::$db
Filename: fieldtypes/ft.rel.php
Line Number: 202
Fatal error: Call to a member function select() on a non-object in /Users/MacPro/Sites/-RBM/system/expressionengine/fieldtypes/ft.rel.php on line 202My site is working fine now I changed the custom field groups to be the same, but wanted to let someone know about the problem incase it is a bug. Although I cant delete the custom field group still.
Thanks Nathan