The title sounds complicated...just as the problem. The scenario: An entity that submits its own id as argument to the attached EVA-View. The entity itself is shown in a view as the row-content. In my case the view showing the fullcontent of the entity has 4 rows. Each time the id of the first row is sended to the EVA-View. Strangely that does not happen in the Preview of the view, but as soon as I visit the actual page the EVA of each row gets the same argument. So I assume that there has to be a problem with cashing. But turning off any views-cache does not solve the problem. The only solution I could find was downgrading back to eva 8.x-1.0-rc1 solves the problem. Does anyone have an idea what could have gone wrong?
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | issue-2873385.patch | 4.68 KB | ahebrank |
Comments
Comment #2
semanthis commentedComment #3
ahebrank commentedI'm not sure I understand the scenario -- is this right?
If that's right, I'm deprioritizing the issue a bit since it seems like an edge case and I'm (personally) skeptical about this usage. I think the view-within-a-view problem might be better solved by something like https://www.drupal.org/project/views_field_view, where the contextual relationship is more explicitly defined by the current view row. Alternatively, you could probably accomplish this with a single View, aggregating your Y output by the X entities. But... if it worked in an earlier version and isn't now it's still something to investigate.
Can you confirm or correct my rephrasing of the issue?
Comment #4
semanthis commentedHi, thanks for Your help. Yoa are rephrasing the issue in a correct way. That is actually the issue. I do not fully agree that this is a edge case. Shure https://www.drupal.org/project/views_field_view would get me around this issue but for reasons of consistency I perfere using this module. In any cases I ever had this module works fine. In Drupal 7 and earlier versions of this module this worked perfectly.
Comment #5
ahebrank commentedI'm unable to replicate using 1.x-dev so I suspect this is either a caching issue or I've made some incorrect assumption.
Using a standard profile setup, I:
Browsing to the page View I'm seeing the correct Articles listed with each Page.
If interested, you should be able to replicate this setup using the test-container branch (https://github.com/ahebrank/eva/tree/test-container), which contains a docker network and the field and view configuration above exported. See readme in the ./testing directory. After setting up, importing config, and generating content, browse to http://localhost:9000/2873385 for the page View of Pages with their attached Articles. Note that caching is entirely disabled in this stack.
Comment #6
ahebrank commentedI was able to replicate this issue as a test case. As I understand the underlying problem, with typical cache settings the Eva is cached and the contextual argument (parent entity NID in this case) is not represented as a cache key, so the cache system returns the first Eva for every other Eva on the page (because the only difference between the Evas on the page, in terms of their inputs, is the contextual argument).
This may actually be a Views issue, but I moved some things around and attempted to add a cache key for the display arguments. That seems to work (and tests pass), but would like some feedback about whether this fixes the original issue and (more importantly) whether it breaks other things.
Feature branch is here: https://github.com/ahebrank/eva/pull/16/files ; patch attached.
Comment #7
ahebrank commentedComment #8
semanthis commentedHi ahebrank, I'm very sorry that I have not answered earlier, at the moment I have a lot of pressure to finish a D7 project...so the D8-Project is on standby. Thank You for all Your work. I'll test the patch on some of the next days and will let You know if everything is fine.
Comment #9
coecks commentedI can confirm that the patch in #6 is working on 1.x-dev.
Comment #10
skybow commentedHi ahebrank, thanks for this patch: I ran into this issue yesterday and was very delighted to see, that someone, you, already created a patch for this. I updated EVA to version 1.2rc2 and installed the patch in #6 and now the problem is gone (for me).
Comment #11
ahebrank commentedHaven't heard any issues associated with the patch and I'm using it now, so merged to dev.