Was running into the issue below:

Notice: Undefined index: pager_offset in Drupal\ctools_views\Plugin\Display\Block->preBlockBuild() (line 334 of /var/www/www2.com/web/modules/contrib/ctools/modules/ctools_views/src/Plugin/Display/Block.php).

Steps to reproduce

1) Download and enable Ctools and Chaos Tools Views.
2) Create a view that shows Content of type article.
3) Check "Create a block".
4) Place the block created in content region using the block layout.
5) Go to the view settings, click on Allow settings and check "Pager offset".
6) Go to front page and it is possible to see the error.

After reviewing issue https://www.drupal.org/project/ctools/issues/2820783, realized the issue was similar but not exactly. So created the attached patch to resolve

Comments

rjdjohnston created an issue. See original summary.

rjdjohnston’s picture

Issue summary: View changes
paulocs’s picture

I had the same issue. Steps to reproduce:

1) Download and enable Ctools and Chaos Tools Views.
2) Create a view that shows Content of type article.
3) Check "Create a block".
4) Place the block created in content region using the block layout.
5) Go to the view settings, click on Allow settings and check "Pager offset".
6) Go to front page and it is possible to see the error.

I will attach a new patch because patch #1 is corrupted.

Cheers, Paulo.

paulocs’s picture

Status: Active » Needs review
StatusFileSize
new640 bytes

Please review it :)

paulocs’s picture

Issue summary: View changes
paulocs’s picture

Assigned: rjdjohnston » paulocs
paulocs’s picture

Assigned: paulocs » Unassigned
darrenwh’s picture

Status: Needs review » Reviewed & tested by the community
  1. installed Drupal 8.9.7
  2. Installed ctools 8.x-3.4
  3. Enabled ctools and ctools views
  4. Replicated steps above and get undefined error
  5. Applied patch in #4 using composer
  6. Error no longer showed

RTBC

Does this need tests?

joelpittet’s picture

Status: Reviewed & tested by the community » Fixed

@darrenwh nope, I think this is pretty straight forward, I appreciate the steps in the RTBC. I've committed this to the dev branch

  • joelpittet committed fe965be on 8.x-3.x authored by paulocs
    Issue #3117925 by paulocs, rjdjohnston, darrenwh: Undefined index:...

Status: Fixed » Closed (fixed)

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