Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi guys, I have created a start of adding views support to paragraph entities.
Comment | File | Size | Author |
---|---|---|---|
#26 | filter_criteria.png | 177.82 KB | tduong |
#26 | paragraphs_views-2527620-26-test_only.patch | 8.42 KB | tduong |
#12 | 2527620-12-paragraphs-views.patch | 565 bytes | jan.stoeckler |
| |||
#7 | Screen Shot 2015-08-24 at 19.10.23.png | 60.81 KB | Lukas von Blarer |
#6 | 2527620-6.patch | 1.07 KB | webflo |
Comments
Comment #1
Peter van Lierop CreditAttribution: Peter van Lierop commentedComment #2
dawehnerYou seem to have used the color output of git diff and move that into a file, yeah that doesn't work.
Comment #5
dawehner.
Comment #6
webflo CreditAttribution: webflo at UEBERBIT GmbH commentedThe default views integration is quite good.
Comment #7
Lukas von BlarerI am trying to filter nodes by a field on paragraphs referenced by them. I have no option to choose any fields on the paragraphs bundle. I only see the properties.
Here is the exported view in case that helps:
Also attaching a screenshot of the add filter form.
Comment #8
webflo CreditAttribution: webflo at UEBERBIT GmbH commented@Lukas von Blarer i think you need #2548701: Update views integration as well. Because the field type provides these relationships and fields.
Comment #9
Lukas von BlarerYou were totally right. Thank you!
Comment #10
miro_dietikerI committed the issue to fix entity reference revisions to unlock the situation. But still i would be very happy to see more tests. :-)
Comment #11
miro_dietikerIf our views integration is just the default, then we can also just use the EntityViewsData instead of providing an own empty class.
See related / duplicate proposal #2592135: No entity type for field in views
Comment #12
jan.stoecklerHi all,
can we add the core views integration now?
Comment #13
miro_dietikerYeah, looks like a good start.
Comment #14
owenbush CreditAttribution: owenbush commentedHas there been any progress of rolling this commit in #12 into a release? I just tested the patch locally and it seemed to address the issues I had with saving a view with a relationship to a paragraph entity.
Comment #15
Ralf Eisler CreditAttribution: Ralf Eisler commentedThe patch in #12 worked for me with saving a view with a relationship to a paragraph entity.
Comment #17
miro_dietikerCommitted the default entity views integration for now.
Back to needs work for test coverage. We really need a valid application example with a solid test.
Note that if you do list paragraphs with views for the use case of searching in paragraphs for reusing a paragraph item, you're on the wrong road. We decided that we don't want to support this case. However, lukas described issues is a valid case.
Comment #18
Ralf Eisler CreditAttribution: Ralf Eisler commentedI am not sure if I understand you correctly:
In Views I list content from a node-type containing an entity-reference to a paragraphs-bundle. From it I want to list one field. In order to do that I create a relationship of type Paragraph referenced from field_myfield. With your latest commit, this now works perfectly.
Is there a problem with this?
Comment #19
heshanlkIt is not possible to list of all Paragraphs if you can create a Paragraph view for a specific node id. If it is possible I'd like to know details on how to achieve it please?. Thanks
Comment #20
miro_dietiker@Thomas Factory
No that's perfectly fine and it is important we properly support it.
You missed my point about "reusing a paragraph" - which you don't.. And i totally see the need for this feature.
Comment #21
Ralf Eisler CreditAttribution: Ralf Eisler commented@miro_dietiker
Perfect, thanks.
Comment #22
Morbus IffBeen doing some tests with this using the dev in 8.x. So far so good. Manual filters working, contextual filters working, relationships working, etc.
Comment #23
miro_dietikerPinging this. We should have some views test coverage for our release... :-)
Comment #24
johnchqueTime to add some test coverage.
Comment #25
johnchqueComment #26
tduong CreditAttribution: tduong at MD Systems GmbH commentedTried to start with a test, but I'm not sure I'm doing it right... cannot import that exported views in #7 in the test. Anyway from my local machine I don't have the same view filter criteria form like in
... I get this
What am I doing wrong ?
Comment #30
tduong CreditAttribution: tduong at MD Systems GmbH commentedDiscussed with @Berdir and he does not see the point to have a test coverage here, because this views_data is 100% standard views integration provided by core and there is no valid reasons to make demo complex enough to test for a specific view. Any disproof ?
Comment #31
miro_dietikerI agree that the standard functionality with the current annotation doesn't need test coverage.
I originally thought we will need some additional pieces anyway, but until now we didn't identify anything missing.
Let's work in follow up issues if missing pieces are found.
Comment #32
BerdirChanging back to the original category and title then ;)
Comment #34
shubhangi1995Comment #35
shubhangi1995