Problem/Motivation
Follow-up to #2036195: Remove views-more.html.twig and replace with #type link render arrays
+++ b/core/modules/views/views.module
@@ -279,6 +275,15 @@ function views_theme_suggestions_comment_alter(array &$suggestions, array $varia
+ if (!empty($variables['element']['#type']) && $variables['element']['#type'] == 'more_link' && !empty($variables['element']['#view']) && $variables['element']['#view'] instanceof \Drupal\views\ViewExecutable) {There should not be full namespace, add "use" statement and it's strange that there's no interface for ViewExecutable
From @andypost
Coding standards reference: https://www.drupal.org/node/1353118
Proposed resolution
Fix it
Remaining tasks
None
User interface changes
n/a
API changes
n/a
Beta phase evaluation
| Issue category | Task, just a coding standards fix |
|---|---|
| Issue priority | Normal, nothing's broken |
| Disruption | No disruption at all, just a coding standards fix. |
Comments
Comment #1
yogen.prasad commentedComment #2
yogen.prasad commentedComment #3
yogen.prasad commentedComment #4
andypostindent should be 2 spaces, and needs add use statement to not use full namespace for Viewexecutble
Comment #5
yogen.prasad commentedComment #6
willzyx commentedwe are talking about fix code in
views_theme_suggestions_container_alter(), isn't it?in the patch we are modifying
views_theme_suggestions_comment_alter()Comment #7
yogen.prasad commentedI think we need to modify code in both views_theme_suggestions_container_alter() and views_theme_suggestions_comment_alter(),
Comment #8
yogen.prasad commentedComment #9
star-szrUse statement is already there, so retitling.
Thanks for working on this @yogen.prasad.
This change needs to be reverted, it's not correct, we only need to change the one line in views_theme_suggestions_container_alter().
Comment #10
andypostLooks we have no test coverage
s/element/elements- You checking wrong propertynot sure the change makes sense, it was supposed to check that $comment has a view as property!
Also data in "elements" not in "element"?
Comment #11
deepakaryan1988Fixed the issue as mentioned in comment#9
Comment #12
star-szrYup, #11 does the trick I'd say :)
Comment #13
deepakaryan1988That's great @Cottser !!
:)
Comment #14
star-szrAdding a basic beta evaluation and updating the issue summary.
Comment #15
webchickCommitted and pushed to 8.0.x. Thanks!