Reviewed & tested by the community
Project:
Node view count
Version:
8.x-1.0-alpha2
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Apr 2023 at 10:35 UTC
Updated:
5 Mar 2024 at 12:05 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
nblack69 commentedComment #3
nblack69 commentedComment #4
siddharthjain commentedI am not able to reproduce this issue.
Comment #5
nblack69 commentedI have drupal 9.5.3 and php 8.1.16
I get this :
when i go to /admin/config/content/nodeviewcount
Comment #6
nblack69 commentedI get when I access "admin/config/content/nodeviewcount"
Drupal 9.5.3
Php 8.1.16
Comment #8
nblack69 commentedI cannot make it work.. I don't know
Comment #9
nblack69 commentedDon't understands... maybe because of Drupal or php?
Drupal 9.5.3 and php 8.1.16
Comment #10
shashank5563 commentedI am able to reproduce the issue.
Message TypeError: Drupal\nodeviewcount\Form\NodeViewCountSettingsForm::getRoleNamesOptions(): Argument #1 ($excluded_user_roles) must be of type array, null given, called in /modules/contrib/nodeviewcount/src/Form/NodeViewCountSettingsForm.php on line 123 in Drupal\nodeviewcount\Form\NodeViewCountSettingsForm->getRoleNamesOptions() (line 206 of /modules/contrib/nodeviewcount/src/Form/NodeViewCountSettingsForm.php)I am using following PHP,Drupal and db
Step to reproduce issue:
1. Following Configuration needed.
Drupal Version: 9.5.0
PHP Version: 8.1.9
Database Version: 10.8.3-MariaDB
2. I have install the module
3. Then try to access following URL: admin/config/content/nodeviewcount
4. Getting the issue.
Comment #11
shashank5563 commented@nblack69, I have made some changes in code. after fixing the code it is working fine.
Comment #12
shashank5563 commentedComment #13
adci_contributor commentedThank you for your help!
I was unable to repeat this problem with Drupal 9.5.11 and PHP 8.1.18. But everyone who has encountered the issue can try flush caches, uninstall and install the module again. If that doesn't help, this patch will be a good solution.
Comment #14
kostiantynOn Drupal version: 10.2.3, MariaDB version: 10.4, and PHP version: 8.1, everything is working fine. I was able to reproduce the error on Drupal version 9.5.0, but the patch from @shashank5563 successfully resolves it.
Comment #15
kostiantynI tested the patch from @shashank5563 on Drupal 9.5.11. The error has disappeared.