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
|
Posted: 28 September 2011 07:23 AM |
|
|
|
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
|
Posted: 28 September 2011 08:32 AM |
# 1
|
|
Developer
|
Hi, please tell me what happens if you use only one field?
|
|
|
Pushloop
|
Posted: 28 September 2011 09:13 AM |
# 2
|
|
|
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
|
Posted: 28 September 2011 09:25 AM |
# 3
|
|
Developer
|
hmm.. could you please show your code? or temporary access to site (thru email)
|
|
|
Pushloop
|
Posted: 28 September 2011 11:21 AM |
# 4
|
|
|
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
|
Posted: 28 September 2011 12:23 PM |
# 5
|
|
Developer
|
are you sure you have MR field hotel? I have such error if use non existent field
|
|
|
Pushloop
|
Posted: 28 September 2011 03:36 PM |
# 6
|
|
|
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
|
Posted: 28 September 2011 10:25 PM |
# 7
|
|
Developer
|
;)
|
|
|