Download & Extend

Alert e-mail doesn't correctly show number of new posts

Project:Notify
Version:6.x-1.0
Component:Code
Category:bug report
Priority:normal
Assigned:matt2000
Status:closed (fixed)

Issue Summary

If there is new content, the e-mail says "Recent content - !count new posts." It shows the t() variable !count instead of the actual number.
I remedied by changing line 428 from:

. t('Recent content - !count', array('!count' => format_plural(count($nodes), '1 new post', '!count new posts'))) ."\n"

to

. t('Recent content - !count', array('!count' => format_plural(count($nodes), '1 new post', count($nodes) . ' new posts'))) ."\n"

Comments

#1

Assigned to:Anonymous» matt2000
Status:active» fixed

Thanks, fix committed.

#2

Status:fixed» active

I have the same problem but docs say to use a placeholder there: http://api.drupal.org/api/function/t/6 . I guess you're breaking translations. Must investigate more.

#3

Status:active» needs review

Ok, we need to use the @ decorator always here so it was a mistake to replace it with !.

Attached is a patch - I didn't test it, yet.

P.S. Please do not commit unreviewed changes/patches.

AttachmentSize
notify-6--1-316234.patch 2.13 KB

#4

Has anyone tested the patch against 5.x-2.2? I just upgraded and am getting the wrong count behavior too. Thanks.

#5

Version:6.x-1.x-dev» 6.x-1.0

I've just noticed that the new comment notification does not post counts correctly when emailing users:

------------------------------------------------------------------------------
Recent comments - !count new comments
------------------------------------------------------------------------------

!count new comments attached to Event posted by desiree: Baileys Cross Road Shelter Dinner 02.28.2009

etc....

[bold for emphasis]

Thanks in advance

#6

I'm having this issue: Recent comments - !count new comments and !count new comments attached ... are being sent to the email.
Any suggestions?

#7

subscribing

#8

On my D6 install, I manually applied the changes given in the above patch and they seem to be working just fine. We don't like to use patches if possible so it would be great if this patch made it into a future build

#9

Status:needs review» fixed

Looks good. Tested & Committed. Thanks jack.r.abbit for testing; Standart for the patch.

#10

How about also committing to DRUPAL-6--1 branch?

#11

Status:fixed» closed (fixed)

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

#12

Are we all talking about the Notify module? on June 23, 2009 the patch was committed, yet the version and date on the download indicates 6.x-1.0 2008-Dec-17
Also I am using the latest version and still see the !count text instead of a number. What am I doing wrong and how can we correct this issue?
in general, how can I apply the patch manually?

#13

Applying patches: http://drupal.org/node/60108

As this patch is really small you could also just open it in a text editor and find the necessary changes (look for + and -).

The real solution is to poke the module maintainer to commit the patch to the 6.x-1.x branch and then make a new release (6.x-1.1).

nobody click here