- Issue created by @matthand
- ๐ฉ๐ชGermany jurgenhaas Gottmadingen
The create method should not call
new static()
butparent::create()
. I'll open an MR and post a fix for that. - @jurgenhaas opened merge request.
- Status changed to Needs review
3 months ago 2:30pm 7 August 2024 - ๐จ๐ฆCanada alangmuir
Seeing this with Entity Embed already installed after updating Embed.
- ๐ฏ๐ดJordan Rajab Natshah Jordan
Also when updating.
Tested with$instance = new static($configuration, $plugin_id, $plugin_definition, \Drupal::service('extension.list.module'));
I think Jรผrgen's fix is better with$instance = parent::create($container, $configuration, $plugin_id, $plugin_definition);
- Status changed to RTBC
3 months ago 3:13pm 7 August 2024 - ๐จ๐ฆCanada Liam Morland Ontario, CA ๐จ๐ฆ
Contents of merge request as a patch.
- ๐บ๐ธUnited States matthand Riverdale Park, Maryland
Plus 1 on the RTBC! Entity Embed now installs with the patch from #9. Thank you!
- ๐บ๐ธUnited States richardbporter
Does the version constraint in composer.json need to be updated also?
- ๐บ๐ธUnited States cpierce42
Same issue today as others. Plus 1 on the RTBC! #9 works great for me.
- ๐บ๐ธUnited States millenniumtree Holualoa, HI
Perfect. My status report page was bombing. Patch from comment 9 fixes it!
- ๐บ๐ธUnited States jason.ullstam
Same issue for me on existing sites and new site installs. Patch from #9 resolves the issue. Let's get this pushed!
- ๐จ๐ฆCanada FranckyLFS Montreal
Same here. The patch from #9 fixed the issue. Thanks!
- ๐บ๐ธUnited States bsnodgrass
I had the same issue... It showed for me when viewing the status report. I added the patch to my composer.json and updated the patch on #9 failed to install.
I'm not sure what I might be doing wrong.
Attaching log file $ ddev composer update --lock -v - ๐จ๐ฆCanada Liam Morland Ontario, CA ๐จ๐ฆ
@bsnodgrass it looks like this is patching
entity
instead ofentity_embed
. It is probably a better solution to stay withembed
8.x-1.7. - ๐บ๐ธUnited States bsnodgrass
@liam-morland Thanks for the tip! I did not see that!
I did get the patch to install properly and corrected my problem.
- ๐ท๐บRussia TLTHades
Today after updating to the latest version of varbase I can't edit nodes anymore. Error:
Error: Call to undefined method Drupal\embed\EmbedType\EmbedTypeBase::create() in Drupal\entity_embed\Plugin\EmbedType\Entity::create() (line 63 of modules/contrib/entity_embed/src/Plugin/EmbedType/Entity.php).
- ๐ฏ๐ดJordan Rajab Natshah Jordan
Embed 8.x-1.9 was released on: 7 Aug 2024
Embed 8.x-1.9 was released on: 10 Aug 2024 by: phenaproxima โ
https://www.drupal.org/project/embed/releases/8.x-1.8 โ
https://www.drupal.org/project/embed/releases/8.x-1.9 โ Thanks, Adam๐ Automated Drupal 11 compatibility fixes for embed Needs work
https://www.drupal.org/project/embed/issues/3430097#comment-15722876 ๐ Automated Drupal 11 compatibility fixes for embed Needs workThe patch is no longer needed ( removing it )
- Status changed to Active
3 months ago 12:43pm 11 August 2024 - ๐ฏ๐ดJordan Rajab Natshah Jordan
What is the next step for this issue?
Close it or better solution not to let this issue happen again. - ๐จ๐ฆCanada Liam Morland Ontario, CA ๐จ๐ฆ
The immediate problem is solved by using
entity
8.x-1.9. entity_embed should be made so it is also compatible withentity
2.0.x. - ๐ซ๐ทFrance floown
Hello,
Please, don't apply the path, I have this error this morning:
$ drush updb [success] No pending updates. [error] Error: Call to undefined method Drupal\embed\EmbedType\EmbedTypeBase::create() in Drupal\entity_embed\Plugin\EmbedType\Entity::create() (line 56 of /home/userhome/web/domain.com/public_html/web/modules/contrib/entity_embed/src/Plugin/EmbedType/Entity.php) #0 /home/userhome/web/domain.com/public_html/web/core/lib/Drupal/Core/Plugin/Factory/ContainerFactory.php(21): Drupal\entity_embed\Plugin\EmbedType\Entity::create() [blablabla]
I have revert the patch, and the drush updb worked.
Regards.
- ๐ฉ๐ชGermany jurgenhaas Gottmadingen
The MR has been provided and it worked well for the upstream embed module version 8.x-1.8
Unfortunately, the maintainers of the embed module reverted the change which caused the issue in the first place and released version 8.x-1.9 - for that one, no patch is required any longer.
I suggest this issue should be closed as won't fix, just to make sure that nobody continues to use the fix which is now outdated.
- ๐จ๐ฆCanada Liam Morland Ontario, CA ๐จ๐ฆ
A change like this will be needed for compatibility with
embed
2.0.x. - ๐ง๐ทBrazil carolpettirossi Campinas - SP
We upgraded from 1.7 to 1.9 and this bug happened. Should we use the MR? I'm confused since jurgenhaas says it's not required on 1.9
We've just upgraded to Drupal 10.3.3 and still get this error:
The website encountered an unexpected error. Try again later.
Error: Call to undefined method Drupal\embed\EmbedType\EmbedTypeBase::create() in Drupal\entity_embed\Plugin\EmbedType\Entity::create() (line 56 of modules/contrib/entity_embed/src/Plugin/EmbedType/Entity.php).
We have these requires:
"drupal/embed": "^1.7",
"drupal/entity_embed": "^1.6"Updating the code to:
$instance = new Static($configuration, $plugin_id, $plugin_definition);seems to fix the error.
- ๐ง๐ทBrazil julio_retkwa Balneรกrio Camboriรบ
Using Drupal 10.2.6
and comment #29 worked for me
I'm adding a patch for it
Thanks @lecabori
- ๐ฆ๐บAustralia mingsong ๐ฆ๐บ
The 'static' is a PHP keyword, not a class name. So in theory, patch #30 makes no difference from the latest version.
Can anyone confirm that the 8.x-1.6 working without the patch?
- ๐ซ๐ฎFinland kirkkala Helsinki
Works for us without the patch now. Running Drupal 10.3.6 and after updating embed to 8.x-1.9 I started having the errors mentioned in description.
Removed the patch #30 we had added in the past and got no issues now.
- ๐จ๐ฆCanada Liam Morland Ontario, CA ๐จ๐ฆ
Patch #30 shouldn't do anything anyway; see #32.
The solution in the merge request is correct.
create()
should always be paired with a__construct()
in the same class or use the parentcreate()
, as is done in the merge request.