In the latest version of Simplenews there is missing the GetEntity in the MailEntity.php file.

I have updated the Module Simplenews to version 8.x-2.x-dev 5 Oct 2019.

I always get the following error:
Call to undefined method Drupal\simplenews\Mail\MailEntity::getEntity() in Drupal\simplenews_stats\SimplenewsStatsMail->addImageTracker() (line 148 of modules/contrib/simplenews_stats/src/SimplenewsStatsMail.php)

Is there a solution to solve this problem?

Thanks

Kind regards Sisto Carta

CommentFileSizeAuthor
#6 3086487-6.patch1.6 KBflocondetoile
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sistocarta created an issue. See original summary.

Damien Laguerre’s picture

I've to make the module compatible with the V2 branch.

I'll take a look to fix this issue this week if I find the time.

Regards.

sistocarta’s picture

Thank u, for ur quick answer.

Really looking forward to it.

flocondetoile’s picture

Looks like replacing MailInterface::getEntity() by MailInterface::getIssue() should do the trick.
For reference, the change records published for the 2.x branch.
https://www.drupal.org/node/3062343

I wonder if a 2.x branch woudn't be better, to track the same branch of simplenews ?

flocondetoile’s picture

Also, from the simplenews alpha2 release notes.

  • The 2.x branch has non-back-compatible changes compare with 1.x. Please read the change notice.
  • This in an early alpha release and there will be more non-back-compatible changes

The 8.x-2.x branch of simplenews is in a big refactoring phase.

flocondetoile’s picture

FileSize
1.6 KB

I doubt that this is sufficient (I don't have test yet simplenews 8.x-2.x) but you could try this patch as a first step.

flocondetoile’s picture

Damien Laguerre’s picture

Assigned: sistocarta » Damien Laguerre
Status: Active » Fixed

I created a 2.x branch to follow the simplenews version. But for now, it's not a good idea to use the 2.x branch of simplenews in production.

I did tests with the latest 8.x-2.0-alpha2 (not the -dev) and everything works fine now.
Fortunately, the module uses a small part of the simplenews code.

Status: Fixed » Closed (fixed)

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