view kanban (Taxonomy term) Error: Call to a member function get()

Created on 24 August 2023, 10 months ago
Updated 10 April 2024, 3 months ago

Problem/Motivation

I have installed the kanban views demo and added tasks and dragged them around and the tasks get saved in the new swimlanes they are dragged to. Works perfect.

I then created a Taxonomy term view and set the format to Kanban.
When I drag tasks I get the following warning.

An error occurred during the update of the entity. Please consult the watchdog.

and the error log states the following

Error: Call to a member function get() on null in Drupal\views_kanban\Controller\KanbanController->getAllowedValues() (line 261 of \modules\contrib\views_kanban\src\Controller\KanbanController.php).

Steps to reproduce

Created a Taxonomy vocabulary (tasks) and added similar fields (term fields) that the demo uses.

Create a Taxonomy term view and add the term fields required by views Kanban.

Add some Taxonomy term tasks

Drag Taxonomy term task and get the above error message

Do I need to add/set something to my Taxonomy term view?

line 261 of \modules\contrib\views_kanban\src\Controller\KanbanController.php
$statusFieldDefinition = $entity->get($fieldName)->getFieldDefinition();

πŸ’¬ Support request
Status

Closed: won't fix

Version

1.0

Component

Miscellaneous

Created by

πŸ‡ΏπŸ‡¦South Africa Vlooi Vlerke

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

Comments & Activities

  • Issue created by @Vlooi Vlerke
  • πŸ‡«πŸ‡·France lazzyvn paris

    why are you creating a Kanban view with taxonomy base?
    Create node content type (or user, user profile but not taxonomy)
    create field status with taxonomy add status in taxonomy terms list
    add view kanban for node content type
    add field status taxonomy
    select the field in the Kanban parameter.
    I have 20 Kanban views for my project with taxonomy. If there is a mistake, I need to know about it.
    I want next version support color for each status with color field in taxomy if it define but drupal 10 remove color field.

  • πŸ‡ΏπŸ‡¦South Africa Vlooi Vlerke

    I have no issues with taxonomy term reference fields used on "node" content types. They work.

    I did the following tests, I recreated the demo but used different entity types.

    node (task content type demo) - no errors
    user (user entity with user task fields) - no errors
    storage (storage entity type with storage task fields) - no errors

    Taxonomy (vocabulary with term task fields) - dragg error
    Profile (profile entity with profile task fields) - dragg error

    You right it does not make sense to use terms as tasks, same goes for profile entities.

    Storage entity works great as it does not clutter the "node" content with loads of tasks and all tasks can be managed thru storage content admin.

    Thanks, this is a great module

  • Status changed to Closed: won't fix 3 months ago
  • πŸ‡«πŸ‡·France lazzyvn paris
Production build 0.69.0 2024