Any idea what's causing this for regular users logging in:
TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in node_layout_load_by_router_item_alter() (line 1679 of /var/www/clients/client1/web1/web/core/modules/node/node.module).
It's a fatal stop for the login screen, which then shows:
refreshing the page allows to carry on. The Recent logs showed the type error.
Of note: Administrator logins are fine; they go straight to their Dashboard.
Comments
Are you using any contrib module to redirect users upon login? For example Login Destination? Typically, after login, authenticated users are redirected to their account profile page, so my guess is that you are using a redirect, and that redirect may be causing this problem.
Nope, but I have found that the most limited type of user is okay... I am trying to narrow the possiblities, as I have a few types, with multiple levels of perms.
Do you perhaps have any blocks in the default layout that are loading a node with a visibility condition for specific user roles, which may be shown upon login?
This must be something to do with it. It's a particular role, even when the user is multi-roled, including a higher-permed one. Thanks again, mate, I'll keep digging.
I found the problem! A role with Access Dashboard on it, but it is not Full Admin. Because the Dashboard settings are set to redirect Admins logging in over to the Dashboard, the system runs into a deadlock with itself around permission to enter the dashboard. So the next question, is why? With the permission available in the Perms table, it should be possible, right? Or are only full admins allowed into the Dashboard, despite the fact that it allows you to choose other roles? I have a layout for the Dashboard, which looks like this:
I've tried setting the Visibility conditions to Role, and the roles that can have access. No difference.
I've checked the blocks that the dashboard uses, and all are correct permission-wise for the teams involved.
So the only conclusion I can come to is that ONLY Administrators can use a dashboard. I will build another for the other roles.
Hmmm this sounds like a bug to me. I'll see if I can reproduce later.
Onyx, I'm afraid I can't reproduce. Out of the box, Backdrop provides the Editor Role with Dashboard access. I have no problems logging in as an editor and being redirected to the Dashboard.
The problem must be in some weird combination of block permissions etc. Can you please try the following:
That will show the permissions for that particular role. That could shed some light on the problem.
{ "_config_name": "user.role.manager", "name": "manager", "label": "Manager", "description": "VHB Manager", "weight": 6, "permissions": [ "administer comment settings", "administer comments", "edit own comments", "administer credit cards", "process credit cards", "view cc details", "access file overview", "create files", "view own private files", "view own files", "view private files", "view files", "manage files", "delete files", "edit own document files", "edit any document files", "delete own document files", "delete any document files", "download own document files", "download any document files", "edit own image files", "edit any image files", "delete own image files", "delete any image files", "download own image files", "download any image files", "edit own svg files", "edit any svg files", "delete own svg files", "delete any svg files", "download own svg files", "download any svg files", "edit own video files", "edit any video files", "delete own video files", "delete any video files", "download own video files", "download any video files", "upload editor files", "use text format full_html", "bypass node access", "administer content types", "view own unpublished content", "view any unpublished content", "view revisions", "revert revisions", "delete revisions", "view hidden paths", "create card content", "edit own card content", "edit any card content", "delete own card content", "delete any card content", "create organisation content", "edit own organisation content", "edit any organisation content", "delete own organisation content", "delete any organisation content", "create page content", "edit own page content", "edit any page content", "delete own page content", "delete any page content", "create post content", "edit own post content", "edit any post content", "delete own post content", "delete any post content", "create product content", "edit own product content", "edit any product content", "delete own product content", "delete any product content", "create role content", "edit own role content", "edit any role content", "delete own role content", "delete any role content", "access administration pages", "create todo content", "edit own todo content", "edit any todo content", "delete own todo content", "delete any todo content", "create terms in actions", "edit terms in actions", "delete terms in actions", "create terms in status_update", "edit terms in status_update", "delete terms in status_update", "administer blocks", "edit webform components", "administer youtube", "flag activateswitch", "unflag activateswitch", "create header_text content", "edit own header_text content", "edit any header_text content", "delete own header_text content", "delete any header_text content", "create field_notes", "edit own field_notes", "edit field_notes", "view own field_notes", "view field_notes", "create field_assigned_to", "edit own field_assigned_to", "edit field_assigned_to", "view own field_assigned_to", "view field_assigned_to", "create field_ccreg", "edit own field_ccreg", "edit field_ccreg", "view own field_ccreg", "view field_ccreg", "create field_phone", "edit own field_phone", "edit field_phone", "view own field_phone", "view field_phone", "create field_street", "edit own field_street", "edit field_street", "view own field_street", "view field_street", "create field_id", "edit own field_id", "edit field_id", "view own field_id", "view field_id", "create field_country", "edit own field_country", "edit field_country", "view own field_country", "view field_country", "create field_background_check_reason", "edit own field_background_check_reason", "edit field_background_check_reason", "view own field_background_check_reason", "view field_background_check_reason", "create field_email_or_phone", "edit own field_email_or_phone", "edit field_email_or_phone", "view own field_email_or_phone", "view field_email_or_phone", "create resources content", "edit own resources content", "edit any resources content", "delete own resources content", "delete any resources content", "administer software updates", "access site reports", "flush caches", "administer taxonomy", "create terms in age_group", "edit terms in age_group", "delete terms in age_group", "create terms in ages", "edit terms in ages", "delete terms in ages", "create terms in area", "edit terms in area", "delete terms in area", "create terms in city", "edit terms in city", "delete terms in city", "create terms in ethnicity", "edit terms in ethnicity", "delete terms in ethnicity", "create terms in gender", "edit terms in gender", "delete terms in gender", "create terms in labour_status", "edit terms in labour_status", "delete terms in labour_status", "create terms in news_categories_tags", "edit terms in news_categories_tags", "delete terms in news_categories_tags", "create terms in region", "edit terms in region", "delete terms in region", "create terms in skills", "edit terms in skills", "delete terms in skills", "create terms in vhb_team", "edit terms in vhb_team", "delete terms in vhb_team", "create terms in working_hours", "edit terms in working_hours", "delete terms in working_hours", "create terms in zone", "edit terms in zone", "delete terms in zone", "unpublish nodes", "publish nodes", "administer permissions", "administer users", "assign roles", "administer account settings", "access user profiles", "change own username", "select account cancellation method", "administer search", "access contextual links", "create field_list_order", "edit own field_list_order", "edit field_list_order", "view own field_list_order", "view field_list_order", "access backup and migrate", "perform backup", "access backup files", "delete backup files", "restore from backup", "administer backup and migrate", "administer charts", "access example charts", "administer dependencies", "synchronize configuration", "administer custom breadcrumbs", "administer feeds", "import node_import feeds", "clear node_import feeds", "unlock node_import feeds", "import organisation feeds", "clear organisation feeds", "unlock organisation feeds", "import organisation_import_from_cc feeds", "clear organisation_import_from_cc feeds", "unlock organisation_import_from_cc feeds", "import orgnotes feeds", "clear orgnotes feeds", "unlock orgnotes feeds", "import roles feeds", "clear roles feeds", "unlock roles feeds", "import roles_org_contact_details feeds", "clear roles_org_contact_details feeds", "unlock roles_org_contact_details feeds", "import user_import feeds", "clear user_import feeds", "unlock user_import feeds", "import volunteers feeds", "clear volunteers feeds", "unlock volunteers feeds", "administer feeds_tamper", "tamper node_import", "tamper organisation", "tamper organisation_import_from_cc", "tamper orgnotes", "tamper roles", "tamper roles_org_contact_details", "tamper user_import", "tamper volunteers", "bypass file access", "administer filters", "administer layouts", "administer flexible templates", "administer layout contextual links", "administer layout nodes", "create layout node content", "administer mailsystem", "administer menu", "administer menu attributes", "administer meta tags", "edit meta tags", "edit mimemail user settings", "administer nodes", "access content overview", "create biography content", "edit own biography content", "edit any biography content", "delete own biography content", "delete any biography content", "create data_relationship content", "edit own data_relationship content", "edit any data_relationship content", "delete own data_relationship content", "delete any data_relationship content", "create dir_listing content", "edit own dir_listing content", "edit any dir_listing content", "delete own dir_listing content", "delete any dir_listing content", "create enquiry content", "edit own enquiry content", "edit any enquiry content", "delete own enquiry content", "delete any enquiry content", "create faqs content", "edit own faqs content", "edit any faqs content", "delete own faqs content", "delete any faqs content", "create forum_ng content", "edit own forum_ng content", "edit any forum_ng content", "delete own forum_ng content", "delete any forum_ng content", "create image_menu content", "edit own image_menu content", "edit any image_menu content", "delete own image_menu content", "delete any image_menu content", "create insight content", "edit own insight content", "edit any insight content", "delete own insight content", "delete any insight content", "create layout_node content", "edit own layout_node content", "edit any layout_node content", "delete own layout_node content", "delete any layout_node content", "create secure_page content", "edit own secure_page content", "edit any secure_page content", "delete own secure_page content", "delete any secure_page content", "create testimonials content", "edit own testimonials content", "edit any testimonials content", "delete own testimonials content", "delete any testimonials content", "create vhbmenu_item content", "edit own vhbmenu_item content", "edit any vhbmenu_item content", "delete own vhbmenu_item content", "delete any vhbmenu_item content", "create webform content", "edit own webform content", "edit any webform content", "delete own webform content", "delete any webform content", "administer order workflow", "view customers", "view own orders", "view own invoices", "view all orders", "create orders", "edit orders", "delete orders", "unconditionally delete orders", "administer phpexcel", "administer url aliases", "create url aliases", "administer path patterns", "notify of path changes", "view payments", "manual payments", "delete payments", "administer products", "administer product classes", "administer product features", "administer own product features", "administer redirects", "administer rrssb", "administer rules", "bypass rules access", "access rules debug", "administer rules_onceperday", "administer search_api", "administer select2", "access site map", "administer site map", "administer statistics", "access statistics", "view post access counter", "administer store", "view reports", "administer modules", "administer site configuration", "access site in maintenance mode", "view the administration theme", "create terms in forum_ng", "edit terms in forum_ng", "delete terms in forum_ng", "create terms in event_category", "edit terms in event_category", "delete terms in event_category", "create terms in type_of_organisation", "edit terms in type_of_organisation", "delete terms in type_of_organisation", "import users", "limited user import", "user import assign roles", "administer views", "access all views", "access views_bootstrap settings", "create views calc", "administer views calc", "administer views_send", "mass mailing with views_send", "attachments with views_send", "access all webform results", "access own webform results", "edit all webform submissions", "delete all webform submissions", "access own webform submissions", "edit own webform submissions", "delete own webform submissions", "access administration bar", "access back_to_top settings", "access dashboard" ] }
It would also be helpful if you export the Dashboard layout and paste it here
{ "_config_name": "layout.layout.dashboard", "path": "admin/dashboard", "name": "dashboard", "title": "Dashboard", "description": "Site overview dashboard", "renderer_name": "standard", "module": "dashboard", "weight": 0, "storage": 2, "layout_template": "moscone", "disabled": false, "settings": { "title": "", "title_display": "default", "title_block": null, "alternative_paths": [], "ancestor_matching": 0 }, "positions": { "header": [ "eb936b48-d2ec-4d9f-9dd9-ef24a1ad3493" ], "top": [ "40c2107e-4b2c-4c5e-ad09-9a9ed3bd979a", "a314b689-83cf-460e-9635-946582740e22" ], "content": [ "5a4ec847-16c1-45dd-b168-58afed5081d4", "aab75ee1-7a16-4137-b253-83a0f6323936", "f149b0ac-ff4c-46f5-8402-ee1aac572dfb", "8ebebe78-4aa4-4d08-a79f-2463daf79863", "271e8ac3-a2a9-4a0b-8d45-69e68e95938a", "a4b4935d-e085-4d77-a522-ea805e172c1a", "2496a766-3efd-410d-88ea-c84f7b67806e", "fe51ec3f-6310-42cd-87f1-1c2361d666c1" ], "sidebar": [ "9ae6c401-fcfe-4aac-9541-65a33d520115" ], "bottom": [ "c67c5bc0-72e3-4e19-a509-09698089a4f4", "04ef7f40-28d9-4f83-a04f-792fc6e25f6f", "3be6ef7d-b09f-45a5-8b34-5295dfba3e2a" ], "footer": [], "title": [] }, "contexts": [], "relationships": [], "content": { "eb936b48-d2ec-4d9f-9dd9-ef24a1ad3493": { "plugin": "system:breadcrumb", "data": { "status": 1, "module": "system", "delta": "breadcrumb", "settings": { "title_display": "default", "title": "", "style": "default", "block_settings": [], "contexts": [] }, "uuid": "eb936b48-d2ec-4d9f-9dd9-ef24a1ad3493", "style": { "plugin": "default", "data": { "settings": { "classes": "" } } } } }, "40c2107e-4b2c-4c5e-ad09-9a9ed3bd979a": { "plugin": "menu:menu-vhb-admin", "data": { "status": 0, "module": "menu", "delta": "menu-vhb-admin", "settings": { "title_display": "default", "title": "", "style": "default", "block_settings": { "menu_name": "menu-vhb-admin", "style": "tree", "level": "1", "depth": "0", "expand_all": 1, "clickdown": 0, "toggle": 1 }, "contexts": [], "admin_label": "", "admin_description": "" }, "uuid": "40c2107e-4b2c-4c5e-ad09-9a9ed3bd979a", "style": { "plugin": "default", "data": { "settings": { "classes": "" } } } } }, "a314b689-83cf-460e-9635-946582740e22": { "plugin": "dashboard:welcome", "data": { "status": 0, "module": "dashboard", "delta": "welcome", "settings": { "title_display": "default", "title": "", "style": "default", "block_settings": [], "contexts": [], "types": [] }, "uuid": "a314b689-83cf-460e-9635-946582740e22", "style": { "plugin": "default", "data": { "settings": { "classes": "" } } } } }, "5a4ec847-16c1-45dd-b168-58afed5081d4": { "plugin": "dashboard:create", "data": { "status": 1, "module": "dashboard", "delta": "create", "settings": { "title_display": "default", "title": "", "style": "default", "block_settings": [], "contexts": [], "types": [ "biography", "faqs", "header_text", "insight", "organisation", "page", "resources", "role", "testimonials", "todo" ], "admin_label": "", "admin_description": "" }, "uuid": "5a4ec847-16c1-45dd-b168-58afed5081d4", "style": { "plugin": "default", "data": { "settings": { "classes": "" } } } } }, "aab75ee1-7a16-4137-b253-83a0f6323936": { "plugin": "dashboard:updates", "data": { "status": 0, "module": "dashboard", "delta": "updates", "settings": { "title_display": "default", "title": "", "style": "default", "block_settings": [], "contexts": [], "project_types": [ "core", "module", "theme", "layout" ] }, "uuid": "aab75ee1-7a16-4137-b253-83a0f6323936", "style": { "plugin": "default", "data": { "settings": { "classes": "" } } } } }, "f149b0ac-ff4c-46f5-8402-ee1aac572dfb": { "plugin": "dashboard:overview_user", "data": { "status": 1, "module": "dashboard", "delta": "overview_user", "settings": { "title_display": "default", "title": "", "style": "default", "block_settings": [], "contexts": [], "user": 1, "roles": [ "editor", "administrator", "manager" ], "user_counts": true, "user_counts_active": true, "user_counts_blocked": true, "admin_label": "", "admin_description": "" }, "uuid": "f149b0ac-ff4c-46f5-8402-ee1aac572dfb", "style": { "plugin": "default", "data": { "settings": { "classes": "" } } } } }, "8ebebe78-4aa4-4d08-a79f-2463daf79863": { "plugin": "dashboard:overview_content", "data": { "status": 1, "module": "dashboard", "delta": "overview_content", "settings": { "title_display": "default", "title": "", "style": "default", "block_settings": [], "contexts": [], "comment_enabled": true, "comment_include_unapproved": true, "comment_types": [], "types": [ "biography", "enquiry", "faqs", "header_text", "image_menu", "insight", "organisation", "page", "resources", "role", "secure_page", "testimonials", "todo", "webform" ], "admin_label": "", "admin_description": "" }, "uuid": "8ebebe78-4aa4-4d08-a79f-2463daf79863", "style": { "plugin": "default", "data": { "settings": { "classes": "" } } } } }, "271e8ac3-a2a9-4a0b-8d45-69e68e95938a": { "plugin": "dashboard:news", "data": { "status": 0, "module": "dashboard", "delta": "news", "settings": { "title_display": "default", "title": "", "style": "default", "block_settings": [], "contexts": [] }, "uuid": "271e8ac3-a2a9-4a0b-8d45-69e68e95938a", "style": { "plugin": "default", "data": { "settings": { "classes": "" } } } } }, "a4b4935d-e085-4d77-a522-ea805e172c1a": { "plugin": "dashboard:menu", "data": { "status": 0, "module": "dashboard", "delta": "menu", "settings": { "title_display": "default", "title": "", "style": "default", "block_settings": [], "contexts": [], "menus": [ "menu-three", "main-menu" ] }, "uuid": "a4b4935d-e085-4d77-a522-ea805e172c1a", "style": { "plugin": "default", "data": { "settings": { "classes": "" } } } } }, "2496a766-3efd-410d-88ea-c84f7b67806e": { "plugin": "dashboard:node_types", "data": { "status": 0, "module": "dashboard", "delta": "node_types", "settings": { "title_display": "default", "title": "", "style": "default", "block_settings": [], "contexts": [], "types": [] }, "uuid": "2496a766-3efd-410d-88ea-c84f7b67806e", "style": { "plugin": "default", "data": { "settings": { "classes": "" } } } } }, "fe51ec3f-6310-42cd-87f1-1c2361d666c1": { "plugin": "dashboard:taxonomy", "data": { "status": 0, "module": "dashboard", "delta": "taxonomy", "settings": { "title_display": "default", "title": "", "style": "default", "block_settings": [], "contexts": [], "vocabularies": [] }, "uuid": "fe51ec3f-6310-42cd-87f1-1c2361d666c1", "style": { "plugin": "default", "data": { "settings": { "classes": "" } } } } }, "9ae6c401-fcfe-4aac-9541-65a33d520115": { "plugin": "menu:menu-vhb-admin", "data": { "status": 1, "module": "menu", "delta": "menu-vhb-admin", "settings": { "title_display": "default", "title": "", "style": "default", "block_settings": { "menu_name": "menu-vhb-admin", "style": "tree", "level": "1", "depth": "0", "expand_all": 1, "clickdown": 0, "toggle": 1 }, "contexts": [], "admin_label": "", "admin_description": "" }, "uuid": "9ae6c401-fcfe-4aac-9541-65a33d520115", "style": { "plugin": "default", "data": { "settings": { "classes": "" } } } } }, "c67c5bc0-72e3-4e19-a509-09698089a4f4": { "plugin": "views:my_todo_list-block_1", "data": { "status": 1, "module": "views", "delta": "my_todo_list-block_1", "settings": { "link_to_view": "1", "more_link": false, "use_pager": true, "pager_id": "0", "items_per_page": "20", "offset": 0, "path": "admin/content/todo", "fields_override": null, "title_display": "default", "title": "", "style": "default", "block_settings": [], "contexts": [], "allowed": [], "path_override": false, "exposed": [], "admin_label": "", "admin_description": "" }, "uuid": "c67c5bc0-72e3-4e19-a509-09698089a4f4", "style": { "plugin": "default", "data": { "settings": { "classes": "" } } } } }, "04ef7f40-28d9-4f83-a04f-792fc6e25f6f": { "plugin": "views:new_users-block_1", "data": { "status": 1, "module": "views", "delta": "new_users-block_1", "settings": { "link_to_view": "1", "more_link": false, "use_pager": true, "pager_id": "0", "items_per_page": "20", "offset": 0, "path": "new_users", "fields_override": null, "title_display": "default", "title": "", "style": "default", "block_settings": [], "contexts": [], "allowed": [], "path_override": false, "exposed": [], "admin_label": "", "admin_description": "" }, "uuid": "04ef7f40-28d9-4f83-a04f-792fc6e25f6f", "style": { "plugin": "default", "data": { "settings": { "classes": "" } } } } }, "3be6ef7d-b09f-45a5-8b34-5295dfba3e2a": { "plugin": "views:new_content-block_1", "data": { "status": 1, "module": "views", "delta": "new_content-block_1", "settings": { "link_to_view": 0, "more_link": false, "use_pager": true, "pager_id": "0", "items_per_page": "50", "offset": 0, "path": "admin/content/node", "fields_override": null, "title_display": "default", "title": "", "style": "default", "block_settings": [], "contexts": [], "allowed": [], "path_override": false, "exposed": [], "admin_label": "", "admin_description": "" }, "uuid": "3be6ef7d-b09f-45a5-8b34-5295dfba3e2a", "style": { "plugin": "default", "data": { "settings": { "classes": "" } } } } } }, "conditions": [ { "plugin": "user_role", "data": { "settings": { "negate": false, "roles": [ "editor", "administrator", "manager" ], "load_condition_nojs": "Load condition" } } } ] }
Thanks mate.
At first sight everything looks fine. You can try some of the following:
We can try some debugging too. Enable Devel and edit the code in node.moule, line 1677. Right after:
$map = $router_item['map'];
Insert
Be sure to give the offending role the permission "Access developer information" so that you can see the dpm output. Then paste here...