API page: http://api.drupal.org/api/views/views.api.php/function/hook_views_ajax_d...

Inside the foreach loop shown as an example for this function command should be used as the a key and not method, method is not a defined index of the $commands array.

For example
This:

foreach ($commands as $command) {
    if ($command['method'] == 'viewsScrollTop') {
      $command['method'] .= 'myScrollTop';
    }
  }

Should be:

foreach ($commands as $command) {
    if ($command['command'] == 'viewsScrollTop') {
      $command['command'] .= 'myScrollTop';
    }
  }
CommentFileSizeAuthor
#2 1887892-incorrect-array-index.patch641 bytestlattimore

Comments

dawehner’s picture

Version: 7.x-dev » 8.x-dev
Component: install system » views.module
Issue tags: +Novice

Moving to 8, feel free to post a patch.

tlattimore’s picture

Issue tags: +Documentation
StatusFileSize
new641 bytes

Here is a patch that resolves the issue described in the issue summary. Probably should have just created this yesterday.. This will also need a 7.x backport and need to be moved to the views project once its resolved in 8.x core.

tlattimore’s picture

Removing documentation tag. I am not sure its needed here.

tlattimore’s picture

Status: Active » Needs review

Oops. This needs review.

enhdless’s picture

Issue summary: View changes
Status: Needs review » Needs work

Patch no longer applies, I think it needs reroll.

lokapujya’s picture

hook does not exist in Drupal 8, since #1843224: Convert Views Ajax commands to new Ajax API

I think the issue needs to be closed and moved to the views contrib project for the D7 fix.

sandipmkhairnar’s picture

Created issue https://drupal.org/node/2211253 for drupal7.

amool’s picture

Damn it! Wrong window.

amool’s picture

Status: Needs work » Closed (won't fix)

As said in #6 it doesn't apply to Drupal 8