Comments

UnknownError’s picture

Problem in nodequeue_contextual_links_view_alter:

if (empty($element['#element']['#contextual_links']['views_ui'])) {
    return;
  }

latest versions of views provides another structure for contextual links element:
$element['#element']['#views_contextual_links_info']['views_ui']

UnknownError’s picture

Status: Active » Needs review
StatusFileSize
new478 bytes

Patch for nodequeue module.

UnknownError’s picture

Patch for view as a pane.

Status: Needs review » Needs work
UnknownError’s picture

Status: Needs work » Needs review
StatusFileSize
new3.08 KB

Status: Needs review » Needs work
jkingsnorth’s picture

Title: Contextual link for view via panel pane. » Contextual link for view via panel pane, or ds field
Category: Feature request » Bug report
Priority: Normal » Minor

Also doesn't work when added via a display suite field. Exactly the same issue with where the data is held. A symptom of the problem is the warning:

Notice: Undefined index: content in nodequeue_contextual_links_view_alter() (line 321 of .../nodequeue/includes/views/nodequeue.views.inc).

abdhomsi’s picture

I get this error two with views and display suite.

jeebsuk’s picture

I can report the same problem as #7 and #8 using Views fields with Display Suite.

sam moore’s picture

Same error as #7,8,9 using Views and Display suite.
Notice: Undefined index: content in nodequeue_contextual_links_view_alter() (line 368 of .../sites/all/modules/nodequeue/nodequeue.module).

mvzundert’s picture

nsciacca’s picture

+1 for the patch in #11, fixed the errors.

jkingsnorth’s picture

I can confirm that #11 fixes the issue in #7.

+++ b/nodequeue.module
@@ -387,6 +391,10 @@ function nodequeue_contextual_links_view_alter(&$element, $items) {
+  if (!empty($element['#element']['#views_contextual_links_info']['views_ui']['view']->display_handler->handlers['argument']['name']->relationship) && $element['#element']['#views_contextual_links_info']['views_ui']['view']->display_handler->handlers['argument']['name']->relationship == 'nodequeue_nodes_node') {
+    $node_queue = $element['#element']['#views_contextual_links_info']['views_ui']['view']->display_handler->handlers['argument']['name']->argument;

These lines are rather long, is there a utility function which could replace the lengthy way of accessing the deeper levels of ['#element']?

joshuamaddux’s picture

Same issue as #7,8,9, & 10. I am using Display Suite with an embedded view block.

#11 fixed the issue.

ykyuen’s picture

Patch #11 did the trick. Thanks.

jkingsnorth’s picture

Status: Needs work » Reviewed & tested by the community

#11 has 4 positive reviews now, so RTBC
(The refactoring is optional I think)

herved’s picture

+1 for patch #11. Fixed the notices on my side as well (using a 2 column DS layout and DS views block fields).

alexverb’s picture

Status: Reviewed & tested by the community » Needs work

Found an issue where exposed filter blocks from a view are still trowing an undefined index error.
I'm setting it back to "needs work" and will provide a patch with a fix.

alexverb’s picture

Status: Needs work » Needs review
StatusFileSize
new2.37 KB

Here's the updated patch. It allows for exposed filter blocks to return as they already have the view in the contextual link.

  • jenlampton committed 5d1dadf on 7.x-2.x authored by alexverb
    Issue #2489096 by UnknownError, alexverb, mvzundert: Contextual link for...
jenlampton’s picture

Status: Needs review » Fixed

Thanks for the update @alexverb, I've committed this change. It will be included in the next release.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

BasH’s picture

I got a notice with php 7.4, changed this:

nodequeue.module line 509:
-   $relationship = $elview->display_handler->handlers['argument']['name']->relationship;
+   if (isset($elview->display_handler->handlers['argument']['name'])) { $relationship = $elview->display_handler->handlers['argument']['name']->relationship; }
kbasarab’s picture

Updated PHP notices from BasH's comment and included additional notice within the subqueue module..