Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workaround for views activity related fields. #460

Draft
wants to merge 1 commit into
base: 4.0.x
Choose a base branch
from

Conversation

puresyntax71
Copy link
Contributor

Overview

Activity status and type filters throw the following errors:

Error: Attempt to assign property "type" on null in Drupal\views\ManyToOneHelper->ensureMyTable() (line 251 of ./web/core/modules/views/src/ManyToOneHelper.php).

This happens when creating a view like this:

Create View listing Activities
Add "Activity Status" filter
Choose "is none of" or "is all of" operation.
Save View, now error.

Before

Throws an error.

After

The whole filter plugin is overridden from "list_field" to "in_operator" as a workaround to avoid the error.

Technical Details

Existing views that use the filters for activity status and type might need to reconfigure their views. The other difference is that "list_field" has the following operators:

  • Is one of
  • Is all of
  • Is none of

The in_operator is somewhat simpler where in the operators are only the following:

  • Is one of
  • Is not one of

@civibot civibot bot added the 4.0.x label Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant