I think that the issue happens on rows in the view results for which there are no scheduled transitions. The value for the scheduled transition fields (new state, previous state and revision link) are empty, and the errors happen when Drupal, trying to render these fields, attempts to execute methods on these null values.
I've added a simple check for null values. It works for me.
I noticed that the code in ScheduledTransitionFromStateViewsField.php is quite different from ScheduledTransitionToStateViewsField.php. I don't understand the reason for this. Perhaps the module's maintainer will know.
- Status changed to RTBC
about 2 years ago 5:58pm 13 February 2023 - 🇺🇸United States alfattal Minnesota
Patch on #4 worked perfectly. Thank you @esomething!
- First commit to issue fork.
- 🇮🇳India urvashi_vora Madhya Pradesh, India
Patch on #4 worked and saved a lot of struggle. Thank you @esomething, appreciate the work.
Committing the changes to help the maintainers.
- @urvashi_vora opened merge request.
- Status changed to Needs work
about 2 years ago 1:08pm 27 February 2023 - 🇦🇺Australia dpi Perth, Australia
The suggested changes look ok.
The diff's are quite noisy, can we change these to early exits instead of another layer of nesting.
Please do not use `empty()`. Use appropriate type checking via
instanceof
or similar.Code supplied does not meet coding standards.
We should have at least one test. The project has Views tests already, this should make it easier to implement.
- Status changed to Active
about 1 year ago 5:39pm 23 February 2024 - 🇺🇸United States alfattal Minnesota
The patch in #4 failed to apply when upgrading to version 2.4.1 resulting in the same error message in the description. Changing the status to Active again.
- Status changed to Needs work
about 1 year ago 7:02pm 23 February 2024 - 🇺🇸United States SocialNicheGuru
Since there is a patch, it should be "Needs work"
- 🇦🇺Australia dpi Perth, Australia
@13.
I looked at it over a year ago, there has been no further progress. The issue remains NW.
- Status changed to Needs review
about 1 year ago 11:53am 14 April 2024 - last update
about 1 year ago 62 pass - 🇺🇸United States SocialNicheGuru
I rerolled.
If $scheduled_transition then return '' - Status changed to RTBC
about 1 year ago 1:40am 24 April 2024 - 🇺🇸United States alfattal Minnesota
Patch in #15 applied successfully on the 2.4 branch. Thank you, @SocialNicheGuru!
- Status changed to Needs work
about 1 year ago 2:49am 24 April 2024 - First commit to issue fork.
- 🇺🇦Ukraine sickness29
sickness29 → changed the visibility of the branch 3319205-views-error to hidden.
- Merge request !54Fix issue with view relationship to scheduled transitions → (Open) created by sickness29
- 🇺🇦Ukraine sickness29
Hey @dpi
I have created a new MR with a test and also added a fix from #15 with code quality fixes.
Please have a look