Hi,

A few months ago, we created a patch to replace EntityManagerInterface with EntityTypeManagerInterface because of EntityManagerInterface being deprecated. However, the parent _construct function in Core still uses the deprecated function (ContentEntityForm). Right now, using the replicate_ui seems to result in a Fatal error.

Should we roll back to the deprecated interface or do we have any other options?

Comments

LaravZ created an issue. See original summary.

ruslan piskarov’s picture

Hello @LaravZ.
I just have installed clear Drupal 8.4.2 and met the fatal error. So I made the rollback your commit https://www.drupal.org/node/2869271 on my localhost and now the module works. But since EntityManagerInterface is deprecated, it is temporary for me and not a good solution. I will provide a new patch for fixing this issue soon.
Thank you.

ruslan piskarov’s picture

bloomt’s picture

The website encountered an unexpected error. Please try again later.
TypeError: Argument 1 passed to Drupal\Core\Entity\ContentEntityForm::__construct() must implement interface Drupal\Core\Entity\EntityManagerInterface, instance of Drupal\Core\Entity\EntityTypeManager given, called in modules/contrib/replicate_ui/src/Form/ReplicateConfirmForm.php on line 34 in Drupal\Core\Entity\ContentEntityForm->__construct() (line 56 of core/lib/Drupal/Core/Entity/ContentEntityForm.php).

I get this error when trying to replicate my node, are these issues related?

laravz’s picture

@bloomt Probably yes. You might want to revert the module to a previous version.

sanduhrs’s picture

berdir’s picture

Priority: Major » Critical
Status: Active » Reviewed & tested by the community

Reuploading the patch here, this really needs to be reverted, it's not possible to avoid the deprecated usage at the moment. Patch is referenced above.

  • Berdir committed 29383ba on 8.x-1.x authored by sanduhrs
    Issue #2906160 by sanduhrs: Fatal error due to core still using...
berdir’s picture

Status: Reviewed & tested by the community » Fixed

Reverted and set the other issue to postponed. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.