Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I created an entity/bundle with ECK and added the bundle as a field in a custom content type. Using Inline Entity Form, I was able to successfully configure the form and page display view modes and create a new node. Upon editing the same node I get a fatal php error:
Call to undefined method Drupal\\eck\\Entity\\EckEntity::getChangedTime()
Adding the function to this file allows me to edit the node.
Comment | File | Size | Author |
---|---|---|---|
#16 | eck-get_changed_time_for_beta_2-2659916-16-do-not-test.patch | 1.5 KB | dgroene |
#13 | eck_get_changed_time_2659916_13.patch | 614 bytes | elgordogrande |
Issue fork eck-2659916
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
akalata CreditAttribution: akalata commentedWhat function did you add to what file?
Other questions since I am not able to reproduce the issue:
Looking at core for examples, this module should probably add
EntityChangedInterface
as an extend to theEckEntity
base class (or inEckEntityInterface
?), but I can't be sure that this will fix OP's issue.Comment #3
legolasboComment #4
pratik.mehta19 CreditAttribution: pratik.mehta19 commentedComment #5
rshafakian CreditAttribution: rshafakian as a volunteer commentedCLosing this as it cannot be reproduced. This can be reopen with detailed steps to reproduce the issue if it still exists.
Comment #6
demonde CreditAttribution: demonde commentedI have the same error when I have a paragraph from the paragraphs project within a ECK entity bundle
Error: Call to undefined method Drupal\eck\Entity\EckEntity::getChangedTime() in paragraphs_edit_paragraph_view_alter() (line 54 of modules/paragraphs_edit/paragraphs_edit.module).
This is kind of strange because I did not use paragraphs edit in this context.
Comment #7
legolasboThanks for reporting that this still is an issue @demonde.
Would it at all be possible to provide us with clear steps to reproduce on a vanilla Drupal installation? These steps should contain something following:
Comment #8
demonde CreditAttribution: demonde commentedThis will take me a moment @legolasbo since this is a complex installation.
Right now my configuration is a
The reason is that for such a complex nested structure is to build a page footer that contains dynamic paragraphs editable by editors.
If I uninstall the paragraphs edit project the error message is gone. That is what is sufficient for me right now. Anyway there must me an entity expectation by the paragraphs edit project that is broken.
I cannot promise to rebuild this structure in a way to find the "go boom" factor in the upcoming days since I am quite busy right now.
Comment #9
demonde CreditAttribution: demonde commentedOk, I found the probable culprit:
https://www.drupal.org/project/paragraphs_edit/issues/2914976
I will test the patch soon.
Comment #10
demonde CreditAttribution: demonde commentedOk, this patch solves this issue. Thus it is not a problem of ECK but of paragraphs edit and the issue can be closed.
But you have a case how this bug can be reasoned.
Comment #11
elgordogrande CreditAttribution: elgordogrande commentedI followed the thread mentioned in #10 and had no success with the patches there. I was able to fix my issue by adding the trait to the EckEntity. I have attached a small patch here.
Comment #12
MatroskeenRe-opening because there is a patch.
Comment #13
elgordogrande CreditAttribution: elgordogrande commentedRe-roll to account for poor path management in patch.
Comment #15
MatroskeenGiven those fields can be missing (they are configurable on entity type level), we cannot use methods provided by
EntityChangedTrait
trait.I opened a merge request with our own implementation, that returns either timestamp or NULL if value doesn't not exist and added the same for "created" field.
@elgordogrande, can you review and see if it works for you?
Thanks!
Comment #16
dgroene CreditAttribution: dgroene commentedFor beta2.
Comment #18
MatroskeenThe merge request was merged into 8.x-1.x.
Thanks!