On second thought, there IS a problem. { if no_related_entries } does not parse with your extension. :( Thoughts?
I was just coming here to see if there was a solution to this yet. { if no_related_entries } does not parse for us either.
On another note, once you’ve clicked and made a selection, or submitted an entry with a selection it isn’t possible to de-select and submit with no value selected.
In our case we are using about 15 multi-relational fields, all are not required. If we accidentally submit an entry with a selection in one of the relational fields and later change our mind, or need to update that field to remove a previously selected value – at this point it seems that is not possible.
As expected I too got the {REL[31][field-name]VbgUKbQdREL} error. So, off I went to the mod.weblog.php page to include the extra php lines. But lo, I couldn’t find the comment line:
// 'weblog_entries_tagdata' hook.
I’m currently on v 1.6.0 build 20070708 and slightly baffled. Am I missing something? Can someone provide me with the precise line number where I should insert the fix? Or has the mod.weblog file been altered since this post and subsequent fix were posted?
BTW Mark, your EE plugins, ext’s and modules are emphatically brilliant: the dog’s appendages.
Can anyone tell me how to increase the height of the multiselect beyond 6 rows? There’s a line in the HTML source:
but I simply cannot find how to change the ‘size=”6”’ bit anywhere! If I change it locally in Firebug it works a treat, so if I could only find that darned 6 somewhere in the system…
Cheers 😊
Hello all,
I posted a request for help a few posts ago… Now I’ve got a lengthier explanation of my conundrum.
I’m running version 1.6.0 - build 20070918 on a php4 server.
I have 3 weblogs that I’m trying to link to each other with mark hout’s multi-relation (106) extension. The weblogs are: - Artists - Events - Press
The Press weblog has 2 custom multi-relation fields {news-artist-relationship} {news-event-relationship} where publishers can select which Artists and Events to create a relationship from the Press article.
The Events weblog has 1 custom multi-relation field {event-artist-relationship} where publishers can select which Artist to associate to the event.
In the Artist’s entry template I’ve placed 2 reverse relationship calls: one links it to any Press articles about the Artist, the other to any relative Events. It works a treat.
{exp:weblog:entries weblog="artists|events|news" orderby="date" sort="asc" disable="member_data|trackbacks"}
{if weblog_id == '2'}
<span class="artist-born">{artist-born-lives}</span>
{artist-image}
<span class="introtext">{artist-intro}</span>
{artist-biog}
{artist-website}
<h4>Artist's Press Coverage</h4>
<ul>
{reverse_related_entries status="open" sort="desc" orderby="title"}
{if no_reverse_related_entries}<li>There has been no press coverage about the artist.</li>{/if}
{if news-artist-relationship}<li><a href="http://{title_permalink=news/press-article}">{title}</a></li>{/if}
{/reverse_related_entries}
</ul>
<h4>Come and see the Exhibition</h4>
<ul>
{reverse_related_entries status="open" sort="desc" orderby="title"}
{if no_reverse_related_entries}<li>There are no exhibitions listed yet.</li>{/if}
{if event-artist-relationship}<li><a href="http://{title_permalink=events/exhibitions}"><span class="entrydate">{entry_date format=' %F %d %Y '}</span>{title}</a></li>{/if}
{/reverse_related_entries}
</ul>
{/if}
{/exp:weblog:entries}
In the Events entry template, I placed 1 reverse entry call for any Press Articles associated to the event and 1 related entry call to display the Artists related to the event.
{exp:weblog:entries weblog="artists|events|news" orderby="date" sort="asc" disable="member_data|trackbacks"}
{if weblog_id == '4'}
<span>Showing:</span>
<abbr title="{event-start-date format=">{event-start-date format="%l %F %j, %Y"}</abbr> -
<abbr title="{event-end-date format=">{event-end-date format="%l %F %j, %Y"}</abbr>
<span>Visitng hours:</span> {event-opening-hours}
<span>Location:</span> <span class="location">{event-venue}</span>
<a href="http://suda.co.uk/projects/microformats/hcalendar/get-cal.php?uri=http://www.folkestonetriennial.org.uk/index.php/events/exhibitions/{url_title}">Add this event to your iCal</a>
<span class="description"><!-- hCalendar description -->
<span class="introtext">{event-intro}</span>
{event-image}
{event-body}
</span><!-- end hCalendar description -->
<h4>Event's Press Coverage</h4>
<ul>
{reverse_related_entries status="open" sort="desc" orderby="title"}
{if no_reverse_related_entries}<li>There has been no press coverage about the artist.</li>{/if}
{if news-artist-relationship}<li><a href="http://{title_permalink=news/press-article}"><span class="entrydate">{entry_date format=' %F %d %Y '}</span>{title}</a></li>{/if}
{/reverse_related_entries}
</ul>
<h4>Read about the Artist</h4>
<ul>
{related_entries id="event-artist-relationship"}
<li><a href="http://{path=artists/biography}">{title}</a></li>
{/related_entries}
</ul>
{/if}
{/exp:weblog:entries}
The reverse entry works, but the related entry link doesn’t. Instead I get the dreaded {REL[45][event-artist-relationship]JqKzNzqQREL} borf. I’ve tried to modify the mod.weblog.php file as outlined in the original thread for the Mutli-Relationship but I couldn’t find any reference to the suggested line of code where to insert the fix.
In the Press entry template, where I want to display links to any Artists or Events that the article may refer to, I get the {REL[N}…} error twice over.
<h4>Read about the Artist</h4>
<ul>
{related_entries id="news-artist-relationship"}
<li><a href="http://{title_permalink=events/exhibitions}">{title}</a></li>
{/related_entries}</ul>
<h4>See the Exhibition</h4>
<ul>
{related_entries id="news-event-relationship"}
<li><a href="http://{title_permalink=events/exhibitions}">{title}</a></li>
{/related_entries}
</ul>
Have I simply misunderstood how Related Entries work? Or am I clearly a victim of an incompatability issue with the Multi-relationship extension? Should I upgrade to PHP 5 to fix this? Or should I use the Multi-Drop-down-list instead or it’s Checkbox variant? Or should I head for Boyink’s suggestion and create different master relationship weblogs, which would take a while for me to get my head around, let alone my client?
BTW, all my entry templates are held in one page-article embed and generated accordingly as explained in Luke’s Jamboree article. Hence all the surrounding {if} statements and all-inclusive weblog tags.
Many thanks, Seb
Before I go on with my problem, let me first say thank you Mark for this extension. It has been a huge help.
I’ve got an error which I think is related to the multi-relationship extension. I’m running EE 1.6 Build 20070918 on PHP 4 (with the weblog_entries_tagdata hook fix). I’ve got the following extentions: Custom Fields in EE Tags (v 2.1.8), File (v 2.1.2), Multi-Drop Down List (v 1.1.1), Clone Entries (v 1.1), and Multi-Relationship (v 1.0.6)
I have a weblog with a number of text fields and drop down lists. It also has one Multi-Drop Down list and one Multi-Relationship list. When I try to save the weblog, I get the following error if anything was already selected in the Multi-Relationship field:
MySQL ERROR:
Error Number: 1064
Description: You have an error in your SQL syntax near 'exp_relationships FROM exp_relationships WHERE rel_id=5866' at line 1
Query: DELETE exp_relationships FROM exp_relationships WHERE rel_id=5866
We had been running for a while with the Multi-Drop Down list without any problems. We are transitioning the information from the Multi-Drop Down list to the Multi-Relationship list to make some changes in how things work on the front end. The problem only started after the Multi-Relationship field was added. The problem does not occur if the field is blank or if it is the first time data is entered for the field. We’ve used Multi-Relationship on other sites with the same set-up (with the exception of the extensions) without any problems. I’m wondering if it could have something to do with one of the other extensions.
Any ideas? Thanks for your help.
Fixed my own problem. The database at the host for this particular website didn’t like the syntax of the delete statement. I changed the delete statement from
DELETE exp_relationships FROM exp_relationships WHERE rel_id=$data
to
DELETE FROM exp_relationships WHERE rel_id=$data
and everything worked fine. Something about the extra table reference between the DELETE and FROM didn’t agree with the database.
If anyone knows any reason why this fix is a bad idea, please let me know. Otherwise I think this problem is solved.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.