Open damienmckenna opened 9 years ago
Hi! My coworkers and I are starting work on a D8 port. Before getting too deep, is any other work in progress?
We are also working on a port to D8, but sure do your work in a fork and we can handle any pull requests etc. when it is ready.
Thanks! I have created a fork at https://github.com/paul-mckibben/er_viewmode, with initial code committed.
Note: for 8.x, there is a fundamental difference in the approach compared to 7.x. In 8.x, it seems cleaner to use Drupal 8's new OO architecture to create a new field type that extends the EntityReference field type, rather than perform alterations to the existing entity reference fields. Therefore, I have created new EntityReferenceViewModeFieldType and EntityReferenceViewModeFormatter plugins.
I'd like to know your thoughts, especially if you found any alternatives in D8 that better align with the approach used in D7.
I have issued a pull request here: https://github.com/adaptdk/er_viewmode/pull/3 @lslinnet I welcome your feedback. Thank you!
@paul-mckibben I'm also interested to the D8 port, I'll test your fork and see where I can get from there.
Hi I tried using the the fork above on a 8.3.1 installation and I get a wsod on when installing the field .. the field appears after clearing the cache but the field display is also a wsod withe the following error Notice: Undefined index: target_id in Drupal\Core\Field\Plugin\Field\FieldWidget\EntityReferenceAutocompleteWidget->massageFormValues() (line 131 of drupal/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/EntityReferenceAutocompleteWidget.php).
Placeholder for any work that would be done to port it to D8.