Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port er_viewmode to Drupal 8 #1

Open
damienmckenna opened this issue Feb 13, 2015 · 6 comments
Open

Port er_viewmode to Drupal 8 #1

damienmckenna opened this issue Feb 13, 2015 · 6 comments

Comments

@damienmckenna
Copy link

Placeholder for any work that would be done to port it to D8.

@paul-mckibben
Copy link
Contributor

Hi! My coworkers and I are starting work on a D8 port. Before getting too deep, is any other work in progress?

@lslinnet
Copy link
Contributor

lslinnet commented Mar 3, 2015

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.

@paul-mckibben
Copy link
Contributor

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.

@paul-mckibben
Copy link
Contributor

I have issued a pull request here: #3
@lslinnet I welcome your feedback. Thank you!

@ademarco
Copy link

@paul-mckibben I'm also interested to the D8 port, I'll test your fork and see where I can get from there.

@stevieburns
Copy link

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants