- Issue created by @a.dmitriiev
- 🇩🇪Germany a.dmitriiev
The issue is in
EntityReferenceDisplayFormatterTrait
class. In the parent issue methods__construct
andcreate
. Maybe it it would work in trait, but__construct
completely overwrites parent constructors, so propertyfieldDefinition
that is defined in FormatterBase is not set, because it is set in its__construct
method. - Merge request !14Issue #3501685 by a.dmitriiev: Error: Call to a member function getTargetEntityTypeId() on null → (Merged) created by a.dmitriiev
- 🇩🇪Germany a.dmitriiev
To avoid overriding construct and create methods, I suggest using
parent::create
call. This way any changes in parent classes will be covered still. - 🇩🇪Germany a.dmitriiev
Uploading patch for using in composer based projects. Please ignore it and review the MR instead.
- 🇦🇺Australia cb Sydney
@a.dmitriiev click 'plain diff' in MR line to see the patch.
- First commit to issue fork.
-
eleonel →
committed 824636da on 2.0.x authored by
a.dmitriiev →
Issue #3501685 by a.dmitriiev, cb: Error: Call to a member function...
-
eleonel →
committed 824636da on 2.0.x authored by
a.dmitriiev →
- 🇩🇪Germany a.dmitriiev
Thank @cb for a hint, but composer patches version 2.x doesn't allow to have patches from MR links.
- 🇲🇩Moldova Spurlos Chisinau
@a.dmitriiev You can add patches from MRs like so:
https://git.drupalcode.org/project/entity_reference_display/-/merge_requests/14.patch
- 🇺🇸United States mark_fullmer Tucson
Thanks for the fix!
Given that this produces a fatal error on page loads using this module, it would be much appreciated for a new release to be provided that includes this committed change. Certainly patches can be applied, but that requires time and effort on the part of every developer supporting sites using this module's latest release. In contrast, providing a new release requires only the time and effort of a single individual.
This kind of fix-and-release philosophy is potentially more important these days. Many developers/teams use continuous integration to automatically apply contributed code updates. Ideally, that continuous integration will have tests that check before deployment. But those tests don't always catch the issue. This was the case with our team's CI process.
Thanks for the consideration!
Automatically closed - issue fixed for 2 weeks with no activity.