Needs work
Project:
Drupal core
Version:
main
Component:
views.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
21 Oct 2017 at 09:19 UTC
Updated:
6 May 2026 at 05:15 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
tstoecklerComment #3
tstoecklerComment #5
jhodgdonI was looking at this patch because of #2928351: Make sure filter dependency is in the help topic configuration, where we need to do something similar.
Just as a note... the calculateDependencies() method is supposed to add dependencies to $this->dependencies and then return $this. See
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Config%21...
That is most likely why your tests failed on this patch...
Comment #6
jhodgdonOh wait, sorry, that is for config entities and this is a plugin... may not apply...
Comment #15
mstrelan commentedShould we deprecate calling this without an EntityTypeManager?
Comment #19
dcam commentedI converted the patch in #2 to an MR. Then I fixed it because the return value from
calculateDependencies()was incorrect. I added a test. At some point I realized that this needed an update path. So I wrote that and added a test for it too.I did not address the question in #13. I wasn't sure if it's necessary since plugins are @internal.
Comment #20
mrdalesmith commentedChange applies cleanly, test pass and the correct dependency is now added to the exported config. I think this is OK to go.
Comment #21
smustgrave commentedProbably need to update any default views that ship with core to include these. Example views.view.frontpage.yml in node, there may be others.
Comment #22
dcam commentedResults of
grep -rn "plugin_id: text$" --include views.view.*.yml:Comment #23
dcam commentedNot all of those views specified the content of the text, so there was nothing to update in those cases. But I updated the ones that needed a dependency.
Comment #24
smustgrave commentedBelieve all views in core have been addressed, double checked that views.view.front in node actually didn't have any format use also (just to follow up on #22)
Comment #25
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #26
dcam commentedRestoring RTBC status
Comment #27
xjmIt even has an upgrade path test. Excellent.
Saving issue credits.
Comment #28
xjmRegarding #15:
I think since it has a factory method, BC-and-deprecation for the constructor might not be necessary. But I will confirm.
Comment #30
xjmOK, I asked in committer Slack about the constructor deprecation, and got feedback from @larowlan:
...Which is what I'm more comfortable with anyway; I was just trying not to be over-restrictive or NW unnecessarily in case we had become less restrictive about this since I last worked the RTBC queue. 😀
So let's add a default null value and a deprecation to the constructor. However, it does not require a deprecation test, nor a change record mention of the added service.
...Though, we probably should have a change record of the added config dependency. Generally, anything that needs an upgrade path also wants a CR.
Thanks everyone!
Comment #31
dcam commentedI added the change record. I haven't addressed other feedback yet.
Comment #32
xjmAs always, @mstrelan, a really great catch!
The question about what to do in
calculateDependencies()with invalid data gets us into subsystem/release/framework manager review territory. I can't decide which and I'm two of the three, so let's put these two tags on for now, to make sure we take a close look at the decisions we make about this before an eventual commit.First, though:
calculateDependencies().Then, we can decide exactly what to do about
calculateDependencies()and what we need to add for handling existing broken views.Thanks everyone!
Comment #34
wim leersThis is still a bug, and it caused a bug in Canvas/Drupal CMS: #3566119: [upstream bug] `views.view.canvas_pages` triggers validation error when installed outside Drupal CMS: "Missing text format: content_format.".
Responded to @xjm's Q in #32: https://git.drupalcode.org/project/drupal/-/merge_requests/11568/diffs#n...
Comment #35
wim leersPer https://git.drupalcode.org/project/drupal/-/merge_requests/11568/diffs#n..., we probably want to wait to do this until #2536594: Add a FilterFormatRepository providing methods to load filter formats lands, which is currently RTBC.
Comment #36
wim leersLooked into updating/fixing this MR. But then I noticed this probably should be postponed.
Comment #37
godotislate#2536594: Add a FilterFormatRepository providing methods to load filter formats is in, so I think this is unblocked.