I'll be throwing up the D8CX tag on the front page - I want EVA to be ready to go on the day that Drupal 8 is released. I've opened a new 8.x branch. It's time we start working. Who's in?

I'm not envisioning it being very difficult, but it will take some time and effort and we should get started!

Comments

erik.erskine’s picture

Any update on how far this has progressed? I see there's been some work done. If there's more to do I'm hoping to look at it during DrupalCon Prague.

mkadin’s picture

Definitely go for it. I don't have much time for Drupal contrib anymore...if you put some time and effort into a D8 version, I'll add you as a project maintainer for the 8.x branch.

andypost’s picture

Issue summary: View changes
Related issues: +#2245771: EVA D8

There's 8.x branch already with display plugin ported, code just needs some time

jonathanshaw’s picture

This is not a big module, and it's very popular. I need it, and while I don't have the skills to do it myself I can co-ordinate hiring someone to do it, if we can raise the money.

Let's fundraise.

I'm willing to chip in $300. Anyone else?

mxh’s picture

If you use Display Suite already, you could create dynamic fields which use views as selected content.

jonathanshaw’s picture

That's funny @mxh, I was just discovering that myself yesterday after I posted here.

The only disadvantage of the Display suite route is that you don't get the contextual filter of the view working properly if it is embedded in a view (as it gets the content ID from the URL, so can only get the parent node as context from tne node view page).

But for that use case one could use views_field_view instead which I believe already has a D8 port.

I'm hoping that Panels will also provide a solution when Panelizer is ported.

jonathanshaw’s picture

2 other modules already exist for D8 which functionality that rivals EVA:

- Viewfield (an unofficial port from D7); and

- Display fields is a new D8 module

ahebrank’s picture

I started a D8 port for my own use at https://github.com/ahebrank/eva forked from the existing 8.x branch in the repo. I haven't put much work in yet, but it's currently functional under the simplest of test conditions (attaching a list of linked titles to a Paragraph entity) -- would love to get some feedback and improvement from others and maybe move it into the official project at some point.

ahebrank’s picture

Sorry, duplicate.

spacereactor’s picture

@ahebrank just try your drupal 8 version, work with basic setting, but once i on views ajax the whole thing break.

node give a blank page with the following error.
Fatal error: Call to undefined method Drupal\node\Entity\Node::uri() in /home/r0bq3/www/modules/eva-8.x-1.x/src/Plugin/views/display/Eva.php on line 271

And from the Recent log messages
Notice: Undefined index: q in Drupal\eva\Plugin\views\display\Eva->execute() (line 284 of /home/r0bq3/www/modules/eva-8.x-1.x/src/Plugin/views/display/Eva.php).

Using https://simplytest.me drupal 8.0.5

ahebrank’s picture

Thanks--there will be lots of these so tracking at https://github.com/ahebrank/eva/issues/2

webel’s picture

+1 for this being on the urgent D8 wishlist (because it's so extremely useful for easily creating entity reference backlinks as EVA views)

jasonawant’s picture

Hi All,

I think Drupal 8 already provides a way to reference an view entity via entity reference field. However, there's currently no way to render the view as an entity. I think the following feature request for Drupal core aims to do that: #1857422: Add a ViewBuilder for Views.

Are there other features EVA provides other than rendering the view? Jason

ahebrank’s picture

For me, EVA is useful when:

  1. I want to embed a list of content (that might be contextually related to the current entity) in the middle of a bunch of other fields
  2. I want the same list to be present (although perhaps filtered slightly differently) on every instance of a bundle without requiring the interaction of a content editor

An example would be a View display of related or recent news items on a news detail page where the design dictates the list appear among node fields. I don't want content editors to have to specify anything to make this list appear on every news detail.

EVA is a useful frontend shortcut. There are certainly other ways to accomplish a similar goal (mentioned above: DisplaySuite dynamic field for View block, D7's Viewfield, a future ER View viewbuilder render)... and with Drupal I'm always open to the possibility that my preferred strategy is flawed.

joachim’s picture

> I think Drupal 8 already provides a way to reference an view entity via entity reference field.

That's not what EVA does.

You don't pick a view to show when you edit the entity.

You create a view, and create an EVA display which is set to show on all entities of a particular type and bundle. Tokens from the entity are passed to the view.

jasonawant’s picture

Thanks for the info and clarifying. I just thought there was a possibility to include some of EVA's functionality, rendering a view as a field, as a ViewBuilder since core allows us to reference a view entity via a entity reference field.

caldenjacobs’s picture

Andy this is brilliant! When can we port this over from Github to the project page proper?

ahebrank’s picture

StatusFileSize
new44.65 KB

Attaching a patch file (origin/8.x-1.x vs. https://github.com/ahebrank/eva/tree/8.x-1.x) to try to get things rolling. Maintainers, let me know how I can help get this available for folks--or if there are major technical/philosophical concerns.

jonathanshaw’s picture

I just messaged tim.plunkett (as he was the last maintainer to make a commit), pointing to this issue and saying

Could you please either make ahrebank a maintainer or tag an alpha release based on the patch there?

hydra’s picture

Status: Active » Reviewed & tested by the community

The patch applies perfectly on the 8.x-1.x branch and at the first view it is working as expected.
I will change the status to RTBC to gain some attention from the maintainer :) I highly support the request to release an alpha release with this codebase to get some people testing this on the field.

ahebrank’s picture

StatusFileSize
new45.56 KB

Here's an updated patch based on the current repo head, which includes some improvements from James Williams, notably:

  • defaulting, like the 7.x branch, to using all bundles for an entity rather than none
  • using hook_entity_view rather than hook_entity_view_alter to inject the view
dman’s picture

I can report I had good results with #24
The patch applied well on top of eva-7.x-1.x-dev (not the many-years-old eva-8.x-1.x that is hidden in the repository http://cgit.drupalcode.org/eva/log/?h=8.x-1.x )

I was able to:
* Build a view
* Create a new EVA display
* Select the target entity and bundle
* See my new view appear on the "manage display" form, where I could position it like a pseudo-field.
* See results displayed on my content page!

I *did* get a small AJAX glitch (throbber shows, but no modal to select the entity type) when first creating the EVA display in the views UI ... but I've been getting glitches like that irregularly in Drupal 8.1.9 - A cache clear and edit form reload seemed to make it go away)

So far this feels like it's actually working, so it would be really worth an 8.x public dev branch up so we can get more eyes on it!

dman’s picture

I can also report that setting a contextual filter for the EVA display, and specifying the entityreference field I that use to link my sub-content to my super-content - worked exactly as hoped for. My attached views are now contextually filtered depending on the thing they are attached to.
This is great to see!

ahebrank’s picture

Sorry about the confusion with the patches. I don't know if/how to get this some kind of status on d.o, but the best/easiest way for most folks to install dev HEAD is:

composer require ahebrank/eva "dev-8.x-1.x"

Issues and PRs are welcome at https://github.com/ahebrank/eva and I'm happy to open up commit access if anyone takes an interest.

I've seen dman's AJAX cache issue in #25 a few times but couldn't get it to come out last night--would be very interested if anyone can provide reliable steps to replication.

martinma’s picture

If module field group is installed I can't edit input forms and displays of content types. I get following message in message log:

Symfony\Component\Routing\Exception\RouteNotFoundException: Route "field_ui.field_group_add_node.display" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (Line 187 in /....core/lib/Drupal/Core/Routing/RouteProvider.php).

dman’s picture

While I respect the motivations for some folk to prefer github etc (especially while D8+composer was unstable)
... it's a PITA to not have this at least mirrored over here on d.o. It makes many things unfeasible for a distribution we'd like to release.
We can't seem to get any traction like it is.

Can we ask that ahebrank is given access to the project here to push an 8.x branch please?
Or other suggestions?

ahebrank’s picture

Thanks for pushing on this, dman. I've written axel.rutz directly since he seems to be the most active maintainer to try to at least get the 8.x branch updated. Next step will be to open a ticket on https://www.drupal.org/project/projectownership

Packagist tells me that 350+ installs of the D8 branch are in the wild, and since I haven't had any bug reports (or any changes) in a few months I went ahead and tagged a 8.x-1.0 stable on my end: https://github.com/ahebrank/eva/tree/8.x-1.0

I'll update here with what I find out. Please ping the thread (anyone) after a week or two if I forget.

geek-merlin’s picture

Thanks for the message! Given that information, a +1 from me to take you and the code aboard!

Unfortunately i have not been given the permissions to do so.
Look in that issue for hints who might have the power:
#2200549-13: Seeking co-maintainer(s)

dman’s picture

Given the agreements I see at #2200549: Seeking co-maintainer(s) - I've gone in and ticked an extra "Administer maintainers" checkbox for you Axel.
You should be able to delegate properly now.

geek-merlin’s picture

Status: Reviewed & tested by the community » Fixed

@ahebrank
Hi Andy, welcome abourd as maintainer.

You know: with great power comes great responsibility.
Feel free to PM me if you need any support.

And: Rock on!

ahebrank’s picture

Thanks, Axel! I've squashed commits, pushed up the current version here, added a dev release, closed the no-D8-version issue callout, and tested that this now works:

composer require drupal/eva "~8"

ahebrank’s picture

Status: Fixed » Closed (fixed)