Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Steps to reproduce this error :-
1) Create a view page display, set path for the page.
2) Include fields, Title field and views row counter field, Save view.
3) Check the url of the page display, it will produce following error.
Warning: Missing argument 1 for Drupal\views\Plugin\views\pager\PagerPluginBase::set_offset(), called in C:\wamp\www\drupal-8.x-dev\core\modules\views\lib\Drupal\views\Plugin\views\field\Counter.php on line 55 and defined in Drupal\views\Plugin\views\pager\PagerPluginBase->set_offset() (line 84 of core\modules\views\lib\Drupal\views\Plugin\views\pager\PagerPluginBase.php).
Please check the attached screen shot for the errors which i can see on my screen.
Comment | File | Size | Author |
---|---|---|---|
#11 | vdc-1830828-10.patch | 13.74 KB | Pancho |
#6 | vdc-1830828-6.patch | 14.5 KB | dawehner |
#4 | vdc-1830828-4-fail.patch | 7.95 KB | dawehner |
#4 | vdc-1830828-4.patch | 12.71 KB | dawehner |
#1 | drupal-1830828-1.patch | 800 bytes | dawehner |
Comments
Comment #1
dawehnerThanks for reporting!
Posting the fix, but i think this should be able tested so the fail never happens again
Comment #2
tajinder.minhas CreditAttribution: tajinder.minhas commentedYour welcome dawehner,
I want to be more active in community, so finding the ways for me. I found checking drupal8 interesting so was working on it. Maybe you can suggest better way to get involved in the community.
Comment #3
dawehnerWelcome in the community!
So one way how you could get involved is to write tests for that issue.
The idea behind is to write code, which checks the expected output.
The file in which the tests for that field exists is http://api.drupal.org/api/drupal/core!modules!views!lib!Drupal!views!Tes...
so feel free to improve them. Feel free to ask if you need more information.
Comment #4
dawehnerLet's replace the existing tests with phpunit and extend it with pager related tests.
Comment #5
ParisLiakos CreditAttribution: ParisLiakos commentedi am not sure whether we could break this test up so we dont duplicate code?
especially this for loop is 3 times the same code
Comment #6
dawehnerReally good idea!!
So what about something like that?
Comment #8
ParisLiakos CreditAttribution: ParisLiakos commented#6: vdc-1830828-6.patch queued for re-testing.
Comment #9
ParisLiakos CreditAttribution: ParisLiakos commenteddefinitely better now, i canm understand whats going on
this will be fixed @ #2005616: Views should use ['#attached']['library'] rather than ['#attached']['css']
whichever goes in first the other will be rerolled
Comment #10
ParisLiakos CreditAttribution: ParisLiakos commentedissue above committed
Comment #11
PanchoJust a reroll after #2005616: Views should use ['#attached']['library'] rather than ['#attached']['css'].
Comment #12
ParisLiakos CreditAttribution: ParisLiakos commentedthank you
Comment #13
alexpottCommitted bf1b3d2 and pushed to 8.x. Thanks!
Comment #14.0
(not verified) CreditAttribution: commentedI have mentioned the steps how to reproduce the issue which i have raised.