Extension, Fieldtype

Archived
Forum
(read-only)

Multi Relationships

ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Denza

     

Errors when using two regular relationship tags

General

Pushloop
Pushloop

Hey Denza

I’m getting the following error when using two relationship tags on the same page:

A PHP Error was encountered

Severity: Notice
Message: Undefined index: field_id_
Filename: mrelshp/ext.mrelshp.php
Line Number: 242

A PHP Error was encountered
Severity: Notice
Message: Undefined index: hotel
Filename: mrelshp/ext.mrelshp.php
Line Number: 237

This is actually repeated like 10 times, and it doesn’t help it I switch from your fieldtype to the regular single relationship tag :(

denza
# 1
Developer
denza

Hi, please tell me what happens if you use only one field?

Pushloop
# 2
Pushloop

Sorry, I should have added that the first field does work, even with two fields in the same template.
It’s the second field that generates the errors!

denza
# 3
Developer
denza

hmm.. could you please show your code? or temporary access to site (thru email)

Pushloop
# 4
Pushloop

Here’s the template code:

{exp:channel:entries channel="trips" limit="1" disable="pagination|trackbacks"}
{html_open}
{embed
="embeds/.head" title="{title}" description="{description_trip}" keywords="{keywords_trip}" revised="{entry_date format='%Y-%m-%d'}" author="{author}"}
<body>

<
div id="wrapperContent">
 
{embed="embeds/.menu"}
 
<div class="contentWrapper">

  <
div class="contentLeft"

   
{exp:imgsizer:size src="{image_trip}" width="540"}
   
<img class="frame" src="{sized}" width="{width}" height="{height}" />
   
{/exp:imgsizer:size}

   
<h1>{title}</h1>
   <
h3 class="boxed">{departure format="%d %M"}-{return format="%d %M %Y"Från {price}kr/pers.</h3><br class="clear"/>
   <
p><strong>{description_trip}</strong></p>

              
{content_trip}
      
</div>

  <
div class="contentRight">
   <
div class="rightBoxTop"></div>
   <
div class="rightBoxMiddle">
    
{if content_right_trip}
    
<h2 class="arrowHeader"><span>Mer om resan</span></h2>
                  
{content_right_trip}
    {
/if}

    {related_entries id
="destination"}
    {embed
="resa/.destinations" entry_id="{entry_id}"}
    {
/related_entries}

    {related_entries id
="hotel"}
    {embed
="resa/.hotels" entry_id="{entry_id}"}
    {
/related_entries}
   
</div>
   <
div class="rightBoxBottom"></div>
  </
div>

 </
div>
</
div>

{embed="embeds/.footer"}

{body_html_close}
{
/exp:channel:entries} 
denza
# 5
Developer
denza

are you sure you have MR field hotel? I have such error if use non existent field

Pushloop
# 6
Pushloop

Hey, you know what, I didn’t! It was called ‘hotels’ :D
Sorry for wasting your time like that, and thanks for the heads-up!

denza
# 7
Developer
denza

;)