Problem/Motivation

I have set "Include updated posts".

With the latest 2.0 dev the body content is duplicated if New content has been added and existing content has been updated:

Recent new or updated pages - 2 new posts
1. aaatest. Read more2. bbbtest. Read more

Recent new or updated pages - 2 new posts
1. aaatest. Read more2. bbbtest. Read more

Also, notice above the line break after "Read more" has vanished and all content is appearing as one long line in the email.

Previous versions:
Recent new or updated pages - 2 new posts
1. aaatest. Read more
2. bbbtest. Read more

No duplication.

notify.module has the following line inserted twice (the previous versions didn't):
175: $message['body'][] = Markup::create($params['content']);
176: $message['body'][] = Markup::create($params['content']);

I don't know if that is what is causing the repeat.

Thanks

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#6 3226378-6.patch469 byteslarisse
#3 image.png30.36 KBlarisse
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

CBEEM created an issue. See original summary.

CBEEM’s picture

In my case I removed line 176:
// $message['body'][] = Markup::create($params['content']);

Seems to work.

I also put in a line break.

Now I get this:
Recent new or updated pages - 2 new posts

1. ccctest. Read more
2. dddtest. Read more

Before these changes I got this:
Recent new or updated pages - 2 new posts

1. ccctest. Read more2. dddtest. Read more

Recent new or updated pages - 2 new posts

1. ccctest. Read more2. dddtest. Read more

Thx

larisse’s picture

FileSize
30.36 KB

Hi @CBEEM!

I'm not able to reproduce this error.

Are you using the latest version of the 2.0.x-dev branch?
I check the lines that you comment, but it's different, like you can see in the image.

CBEEM’s picture

I thought I was, but I just checked and the extra line is not in my latest download.
I have so many different versions of this now I'm getting confused.

I have no idea where the extra line came from, but removing it fixes the issue.

Thanks :)

CBEEM’s picture

I realised that I had dragged the Notify module into Votingapi with FTP, so I had 2 active versions competing on the production site. One had the duplicated line in it. Oops.

I got rid of the second one.

I have the latest dev up in the correct place but am still receiving the emails in one long line:
1. ccctest. Read more2. dddtest. Read more

This gets hard to read when there are multiple nodes added/edited.

Thanks :)

larisse’s picture

Status: Active » Needs review
FileSize
469 bytes

Hi @CBEEM!

I able to reproduce your issue. I think this patch fix this. Can you test, please?

gisle’s picture

larisse,
thanks for the patch.

I'll await a review from CBEEM before proceeding.

CBEEM’s picture

Yes that worked, thank you :)

larisse’s picture

Status: Needs review » Reviewed & tested by the community

Thank @CBEEM!

  • larisse authored ed381fb on 2.0.x
    Issue #3226378 by larisse: Fixed missing newline
    
gisle’s picture

Title: Email body content duplicated » Missing newline between nodes in email sent
Status: Reviewed & tested by the community » Fixed

Committed. Sorry about the delay.

Status: Fixed » Closed (fixed)

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