No results showing: Notice: Trying to access array offset on value of type null in theme_views_mini_pager(

Created on 16 May 2023, about 1 year ago

Problem/Motivation

I try to add several views. One made myself, one sandbox project. the adding goes fine.
But the views are extra fields which I need to migrate my nodes from Drupal 7 to Drupal 10.
I got the following notice, and there are no results shown anymore. After I remove the field, the results show again.
The notice I got is:

Notice: Trying to access array offset on value of type null in theme_views_mini_pager() (line 1094 of /sites/all/modules/views/theme/theme.inc).

I tried setting an isset, and then the notice is gone, but still no data.

if (isset($pager_total[$element])) {

Steps to reproduce

Install drupal 7 with views. Build a view which shows the nodes in de system.
Add, for example, this sandbox project https://www.drupal.org/sandbox/seewatson/2285335 β†’
Or my own bettercounter views module from: https://stackoverflow.com/questions/76211445/try-better-counter-for-view...
Add the redirect node field to the view.
Notice appears, and no content shows.

Proposed resolution

Some how with some additional views modules there is a problem with a Null value of $pager_total[$element]
I have it with several views field handler modules.
May be there is a general solution to be able to set the pager correctly, and show the values? A hook?

Remaining tasks

Please if there is a hook, show me how to use this. I am not a professional programmer.
Thanks a lot in advance.

greetings,

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

3.0

Component

Miscellaneous

Created by

πŸ‡³πŸ‡±Netherlands Summit

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024