Search

A new extension, "Entry Relationship Field" is now available for download. Comments and feedback can be left here but if you discover any issues, please post it on the issue tracker.

I am really pleased to release this extension. I've been working really hard on this and I am thrilled to publicly talk about it!

This extension tries to solve a problem already tackled by lots of people: Parent-child relationship. As the readme states it we wanted to:

  • Supports multiple sections for the same relationship.
  • Offers developers the possibility to create xslt templates for the field's backend UI.
  • Offers a modal UI in order to create/edit for the children.
  • Compatible with Symphony associations.
  • Supports multiple level (recursive) of associations.
  • Aims to be compatible with all fields.

Of course, this field would not have been created if some other people did not released some really cool stuff. We would like to thanks everybody that contributed to those projects:

We basically trashed things that were not necessary and re-implemented things that we liked from those extensions.


I really hope you like it and can't wait to see what amazing things it can do. We already tested it and the response from our client is very positive. Please submit issues and feedback!

I've made a screencast too! https://www.screenr.com/pDDN

Looks interesting. Will hopefully be able to have a closer look and provide feedback soon.

Thanks Jens!

That's very impressive Nicolas! Well done, very well done!

Thanks Brendan, I apreciate it! The really cool thing is, there is no hack involved. The field actually only stores the related entries id. Everything else is made with Symphoy's core API.

Please share your thoughts !

@Nitriques this is pretty epic work! From what I can see it takes associations another step closer to an ideal world and options are always good to have.

One of the main concerns raised in the Associations UI debate when moving associations over to the drawer was raised was that doing so would interrupt author workflow (which is true in cases). With that in mind I can understand why you've stuck with a field to make the association and I think just storing the related entries ID as you have done is about the best compromise we can get? (Unless there's another way to provide an ordable 'association' on the publish page which isn't a field? Can we make an 'association' an orderable output on the publish page?) This still allows it to be positioned anywhere on the publish page and displays the association info but mainly just acts as a reference storing on the minimal amount of data in the ID.

I love the fact that you've created the ability to template the output style so the Symphony developer can style it however they choose and create a different template for each data type (Section entry). That's pretty powerful and can really go a long way to allowing the designer/developer to add some customisation.

Would this work in combination with the Reflection field as well so you can output multiple field values on the field display — much like the Association UI does — for an image thumbnail and caption for instance?

I wouldn't say the modal overlay is as elegant as it could be at the moment. Would it be possible to integrate some of Nils' excellent work on the Associations UI page overlay? Failing that I can see the the best of both worlds coming together where we could use the drawer style animation to reveal or push the interface when the association is to be edited or created. By way of an 'enhanced' drawer how about something like this? It functions in much the same way where the field provides the trigger to the drawer interface where associated assets can be linked without taking the user out of their authoring flow. I think then we'd have the best of both worlds.

Really nice work!

I have installed both the association field and your relation field. Here are a few of my thoughts

  • relation field is only 1 extension :D vs association field 4 :(

  • They both do similar things, I like the association field because its search able, where I like the relation field for giving me a full list of the section entries, which is better if you don't know the title of the item you are searching for, if there was also a search here that would be killer.

  • I have not tried the customized view yet but I imagine that will be awesome.

  • Being able to create a new entry even with multiple related sections selected is great, the association field throws an error here saying "unknown section" This might be fixed in the future though. Most likely it will require a section select drop down as in the relation field, or instead of throwing the error it could ask what section you want to create a new item in....

  • (edit ) The relation field also shows what section each item is from :D see attachemnt

    • I prefer the default Relation field interface, the left edge of the association field looks like the drag and drop spot but that opens the editor as if you clicked the page icon and in my previous point it is clear that the association field needs a drop down added as well or something else.
  • In the Section editor relationship field shows section titles and not all the fields in each section. This is going to be waaaaay better in a large site because the list will get awful big.

  • BOTH fail to update the data in the entry once an association has been updated (until page refresh)

So as far as an editor user goes, the experience will be similar. However having the add new being broken with multiple associated sections in the associations field if you want to have multiple sections in one association field I would choose the Relation field for now.

Bravo for the great work on both of these extensions guys.

Attachments:
entry view.png

Wow! Thanks a lot for this feedback!

I will personally address every concerns ASAP (I sadly do not have the time to do it right now)

One thing I must say is that this extensions comes from a very particular use case we had this summer that could not be resolve with this summer's ecosystem. Nils' work on Association is nice but came in too late for us. I really think both extension can/should play nice with each other and I am looking foward to it.

We share our ideas mostly on github, please feel free to join the conversation :) Also, please submit any issues you encounter.

Thanks again!

Can't wait to try, especially recursive subsections. I know it's messy in one way but I just wanted to attach owner details to an image and an image to a gallery all in one place(UI wise) - without going into separate sections.

Some have said it's bad structural form but it seems logical to me, those data items "belong" to each other in a chain.

Some have said it's bad structural form but it seems logical to me, those data items "belong" to each other in a chain.

There is a very very big gap between what good from a structure (DB normalisation) POV vs. a client POV. This extension really tries to focuses on the client POV so recursive subsection are often easier to understand that 3FN :)

@ijy

One of the main concerns raised in the Associations UI debate when moving associations over to the drawer was raised was that doing so would interrupt author workflow (which is true in cases). With that in mind I can understand why you've stuck with a field to make the association and I think just storing the related entries ID as you have done is about the best compromise we can get?

I totally agree! Associations made with the Entry Relationship Field (hereafter ERF) are valid Symphony core associations (drawer included). That's part of the core feature and cannot be removed. Some like it a lot others don't: just do not open it if you do not want it!

Unless there's another way to provide an ordable 'association' on the publish page which isn't a field? Can we make an 'association' an orderable output on the publish page?

I do not know how this can be possible... You need a way to store the data and the best way to do it is via a field. The association data is also stored in the sym_sections_association but it does not store the order (which is crucial for us)

storing on the minimal amount of data in the ID.

It's just a string. If your server can't handle it, well, change your server! It really makes the code more easy to read/understand/maintain/reason about...

That's pretty powerful and can really go a long way to allowing the designer/developer to add some customisation.

Yeah that was one of the primary goals. More work will be done on that for sure. Even better, you can have multiple templates for the same section and use them with the xml mode field setting (which blown my mind when I thought of it and was implemented in like 10 min!)

Would this work in combination with the Reflection field as well so you can output multiple field values on the field display — much like the Association UI does — for an image thumbnail and caption for instance?

It should.. please test it and report any issue! I really want to make this work with everything, but can't test every scenario.

I wouldn't say the modal overlay is as elegant as it could be at the moment. Would it be possible to integrate some of Nils' excellent work on the Associations UI page overlay?

Yes! Please send a PR !

we could use the drawer style animation to reveal or push the interface when the association is to be edited or created.

It was in my head already and would love to see that!

Really nice work!

My pleasure! Thanks for the feedback.

@jeffleeder

I like the association field because its search able, where I like the relation field for giving me a full list of the section entries, which is better if you don't know the title of the item you are searching for, if there was also a search here that would be killer.

Yeah I will try to find a way to include that. I think that re-using the core filtering capabilities would be the best option, has it would be compatible with the most field out there.

I have not tried the customized view yet but I imagine that will be awesome.

It is! :)

In the Section editor relationship field shows section titles and not all the fields in each section. This is going to be waaaaay better in a large site because the list will get awful big.

Absolutely. Please note that it displays the first visible field. Developers can use the templating capabilities to show other fields. Also, we plan to support for kind of templating for the "header" as well and also offers collapsible contents.

BOTH fail to update the data in the entry once an association has been updated

That's issue #1 :) https://github.com/DeuxHuitHuit/entryrelationshipfield/issues/1

Bravo for the great work on both of these extensions guys.

Thanks!!!

Erm, I broke it when I clicked "link to entry". Got really exciting for a minute then...

Symphony Fatal Database Error: Unknown column 'd.entries' in 'where clause'

An error occurred while attempting to execute the following query

SELECT SQL_CACHE `e`.id, `e`.section_id, e.`author_id`, UNIX_TIMESTAMP(e.`creation_date`) AS `creation_date`, UNIX_TIMESTAMP(e.`modification_date`) AS `modification_date` FROM `ar6_entries` AS `e` INNER JOIN `ar6_entries_data_41` AS `d` ON `e`.id = `d`.`entry_id` WHERE 1 AND `e`.`section_id` = '10' AND (`d`.`entries` = '235' OR `d`.`entries` LIKE '235,%' OR `d`.`entries` LIKE '%,235' OR `d`.`entries` LIKE '%,235,%') ORDER BY ( SELECT `ed`.value FROM ar6_entries_data_12 AS `ed` WHERE entry_id = e.id ) ASC

What's actually happening is that if ERF is used in a section that includes an association to a section where Nils' field is in use then any attempt to access that associated section in the backend, either directly in the page or in the "link to entry" modal, causes the error shown above.

I don't know why someone would use both fields in a site, in my case one is already there and I wanted to test the other.

@munki Great, you broke it ! Can you please report the issue on github? I'll try to fix it ASAP !

@Nitriques will try, new to Github but I did Chat with Nils on it once. I will try not to break Github before you fix the issue.

I'm like a github native, I formatted my line of code and everything :)

@munki Thanks a lot !

And yeah, markdown is awesome.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details