Dotclear

Ticket #700 (closed enhancement: worksforme)

Opened 17 years ago

Last modified 16 years ago

Comment approval notification

Reported by: reppep Owned by: olivier
Priority: normal Milestone: 2.2
Component: module:core Version: 2.1
Severity: normal Keywords:
Cc:

Description

Dotclear should have an option to send email when new comments are posted for approval.

Change History

comment:1 Changed 17 years ago by zeiram

Already available via  the emailNotification plugin.

comment:2 follow-up: ↓ 4 Changed 17 years ago by Moe

Does emailNotification write in the email if the comment needs an approval ?

You should create a new ticket in the Lab for Email Notification :  http://lab.dotclear.org/wiki/plugin/emailNotification

comment:3 follow-up: ↓ 5 Changed 17 years ago by reppep

Sorry, I forgot I had enabled this, but had to disable it because it doesn't work -- every time I submit a comment with the plug-in enabled, the poster sees this error instead of returning to the post and no email is sent.

Fatal error: Call to undefined method mail::b64header() in /home/web/dotclear2/plugins/plugins-lab/emailNotification/behaviors.php on line 93

comment:4 in reply to: ↑ 2 Changed 17 years ago by zeiram

Replying to Moe:

Does emailNotification write in the email if the comment needs an approval ?

Yes. That's how I've been using it for years. The only comments you don't get an email for are those marked as spam.

comment:5 in reply to: ↑ 3 Changed 17 years ago by zeiram

Replying to reppep:

Sorry, I forgot I had enabled this, but had to disable it because it doesn't work -- every time I submit a comment with the plug-in enabled, the poster sees this error instead of returning to the post and no email is sent.

Fatal error: Call to undefined method mail::b64header() in /home/web/dotclear2/plugins/plugins-lab/emailNotification/behaviors.php on line 93

Are you sure you installed the latest version (1.0.2)? Because I think I remember a bug like this in an older version. "b46header" should be written as "B64Header".

comment:6 Changed 17 years ago by reppep

I just did a "svn up" on all my plugins from the Lab, and I have 1.0.2, but it didn't update emailNotification, so I had 1.0.2 already. The thing I don't understand is that the error refers to lowercase mail::b64header(), while the relevant lines from behaviors.php are capitalized:

                                'X-Blog-Id: '.mail::B64Header($core->blog->id),
                                'X-Blog-Name: '.mail::B64Header($core->blog->name),
                                'X-Blog-Url: '.mail::B64Header($core->blog->url)
                        );

                        $subject = '['.$core->blog->name.'] '.sprintf(__('"%s" - New comment'),$rs->post_title);
                        $subject = mail::B64Header($subject);

Do I have to do something to reload the plugin? Not that I can see any changes to pick up, but it's worth a try.

comment:7 Changed 16 years ago by reppep

I haven't heard anything on this in a while, but comment notifications are still broken for me. Has there been any progress? Is there something I should try?

This is my #1 issue -- people post comments about 3x (average) since they never see them show up or get a notification that they're in an approval queue.

comment:8 Changed 16 years ago by xave

Reppep, since you use SVN, can you verify that your Clearbricks components are up to date? (especially mail/class.mail.php)

Also, could you try to replace B64Header on line 93 by anything else with a mixed case, just to rule out any lowercasing when the error message is printed?

comment:9 Changed 16 years ago by reppep

I updated.

pepper@inspector:/home/web/dotclear2$ svn update . plugins/plugins-lab/emailNotification/behaviors.php inc/clearbricks/mail/class.mail.php

Fetching external item into 'inc/clearbricks/common' External at revision 215.

Fetching external item into 'inc/clearbricks/dblayer' External at revision 215.

Fetching external item into 'inc/clearbricks/dbschema' External at revision 215.

Fetching external item into 'inc/clearbricks/filemanager' External at revision 215.

Fetching external item into 'inc/clearbricks/html.filter' External at revision 215.

Fetching external item into 'inc/clearbricks/html.validator' External at revision 215.

Fetching external item into 'inc/clearbricks/image' External at revision 215.

Fetching external item into 'inc/clearbricks/mail' External at revision 215.

Fetching external item into 'inc/clearbricks/net' External at revision 215.

Fetching external item into 'inc/clearbricks/net.http' External at revision 215.

Fetching external item into 'inc/clearbricks/net.http.feed' External at revision 215.

Fetching external item into 'inc/clearbricks/net.xmlrpc' External at revision 215.

Fetching external item into 'inc/clearbricks/pager' External at revision 215.

Fetching external item into 'inc/clearbricks/rest' External at revision 215.

Fetching external item into 'inc/clearbricks/session.db' External at revision 215.

Fetching external item into 'inc/clearbricks/template' External at revision 215.

Fetching external item into 'inc/clearbricks/text.wiki2xhtml' External at revision 215.

Fetching external item into 'inc/clearbricks/url.handler' External at revision 215.

Fetching external item into 'inc/clearbricks/zip' External at revision 215.

At revision 2810. At revision 1414. At revision 215.

pepper@inspector:/home/web/dotclear2$ grep -i b64 plugins/plugins-lab/emailNotification/behaviors.php

'X-Blog-Id: '.mail::B64Header($core->blog->id), 'X-Blog-Name: '.mail::B64Header($core->blog->name), 'X-Blog-Url: '.mail::B64Header($core->blog->url)

$subject = mail::B64Header($subject);

Changed to:

pepper@inspector:/home/web/dotclear2/plugins/plugins-lab/emailNotification$ grep -i b64 behaviors.php

'X-Blog-Id: '.mail::B64HeaderHIGHlow($core->blog->id), 'X-Blog-Name: '.mail::B64HeaderHIGHlow2($core->blog->name), 'X-Blog-Url: '.mail::B64HeaderHIGHlow3($core->blog->url)

$subject = mail::B64HeaderHIGHlow4($subject);

And yes, it's being lowercased somewhere -- the error was "Fatal error: Call to undefined method mail::b64headerhighlow() in /home/web/dotclear2/plugins/plugins-lab/emailNotification/behaviors.php on line 93".

comment:10 Changed 16 years ago by Moe

There is no "B64HeaderHIGHlow" in this file :  http://lab.dotclear.org/browser/plugins/emailNotification/behaviors.php

It seems that there's a problem with SVN, you should delete the emailNotification and then export from SVN again.

comment:11 Changed 16 years ago by reppep

xave asked me to mix the case so we could see if the call was being lower-case somehow. I added HIGHlow (and numbers) to the B64Header entries, which confirms that it was a lower-cased call from that file.

comment:12 Changed 16 years ago by Moe

I'm really sorry, I missed xave's comment.

comment:13 Changed 16 years ago by reppep

I tried lowercasing but still no joy -- is there an argument quantity mismatch?? behaviors.php appears to be specifying a single value, while the definition seems to need 2.

pepper@inspector:~/dotclear2$ grep -i 64header inc/clearbricks/mail/class.mail.php plugins/plugins-lab/emailNotification/behaviors.php 
inc/clearbricks/mail/class.mail.php:	public static function b64header($str,$charset='UTF-8')
plugins/plugins-lab/emailNotification/behaviors.php:				'X-Blog-Id: '.mail::b64header($core->blog->id),
plugins/plugins-lab/emailNotification/behaviors.php:				'X-Blog-Name: '.mail::b64header($core->blog->name),
plugins/plugins-lab/emailNotification/behaviors.php:				'X-Blog-Url: '.mail::b64header($core->blog->url)
plugins/plugins-lab/emailNotification/behaviors.php:			$subject = mail::b64header($subject);

But I still get:

Fatal error: Call to undefined method mail::b64header() in /home/web/dotclear2/plugins/plugins-lab/emailNotification/behaviors.php on line 93

comment:14 Changed 16 years ago by xave

  • Status changed from new to closed
  • Resolution set to worksforme

Ok, so we know that the lowercasing is irrelevant, as it is just the way the error message is displayed.

The second argument to the function is not mandatory, so that's not the problem either.

So we're back where we started.

I wonder if the other uses of the mail functions work for you. Did you try to ask for a new password ?

As the problem seems to be specific to your setup (no one else reported it) and comes from a plugin that is on the Lab, I close this ticket, but it does not mean cannot continue to discuss it.

comment:15 Changed 16 years ago by reppep

Olivier is the owner of the emailNotification plugin. He says he's no longer working on DC or the plugin -- does that mean it's dead, or is someone else going to pick it up?

comment:16 Changed 16 years ago by xave

This plugin is one of those distributed with the default install, it's certainly not dead.

comment:17 Changed 16 years ago by reppep

If it's broken and no-one's maintaining it, I have less confidence in emailNotification than you. ;)

comment:18 Changed 16 years ago by xave

This plugin is still maintained, as every other default plugin. There is just nothing to maintain for now: Seen from our side, as It is used daily by thousands of blogs and nobody ever reported a problem with this plugin but you, we do not consider it broken, merely non compatible with your installation.

That is not to say that we won't update it if we find how to handle your specific case, be we just cannot debug a problem we fail to reproduce. It means that we really rely on the information you can give us to close the case, and I still do not know if others mail functions work for you.

comment:19 Changed 16 years ago by Tomtom33

I'm pretty sure where the problem is.

reppep, do you have installed the plugin autoBackup? Because Dotclear's mail class is replace by autoBackup's mail class. I already fixed this issue on Lab's SVN ( http://lab.dotclear.org/changeset/1340).

comment:20 Changed 16 years ago by reppep

Tomtom33,

Thanks! I updated autoBackup, verified that change, and now get comment notifications.

Note: See TracTickets for help on using tickets.

Sites map