Gossamer Forum
Home : Products : Gossamer List : Discussion :

Bug in the check box subscription

Quote Reply
Bug in the check box subscription
Finally new Glist is out...
I've found a bug however. When you use the check box multiple subscription you don't get:
- email check control (you can enter even asd@asd----fdg)
- custom redirection URLs for subscription, removal, etc.

If you select both checkboxes (I have two Lists) you get the above problems. If you select just one Glist works normally.
Max
The one with Mac OS X Server 10.4 :)
Quote Reply
Re: [maxpico] Bug in the check box subscription In reply to
Hi,

>>- email check control (you can enter even asd@asd----fdg)
It does check email address, but it will not go to error form if it's failed. You can change a bit around line #342 in User.pm if you want:

my $error = _check_subscriber($cgi->{email}, $id, $db_stl, $wild_cards);
next if ($error);

TO:

my $error = _check_subscriber($cgi->{email}, $id, $db_stl, $wild_cards);
return ('error_form.html', { msg => $error }) if ($error);

>>
- custom redirection URLs for subscription, removal, etc.

It will not redirect to custom redirection URL
if you subscribe to multiple lists because each list could have different URL.

TheStone.


B.
Quote Reply
Re: [TheStone] Bug in the check box subscription In reply to
In fact there should also be an option for common redirect pages! I mean all newsletter scripts around there have this feature actually working...
My two lists, for instance have the same redirect Urls and it's that way in the majority of setups. I remind you that this script costs...
This way the redirect Urls feature is completely useless with this (common) setup.

Btw, what are the templates that I should modify to avoid the Url redirecting (the pages displayed to the subscribers/unsubscribers)? I can't find them...
Max
The one with Mac OS X Server 10.4 :)

Last edited by:

maxpico: May 5, 2004, 10:12 AM
Quote Reply
Re: [maxpico] Bug in the check box subscription In reply to
In this case, you can add options belows into Data.pm:

url_subscribe_success => '....',
url_subscribe_failure => '....',
url_unsubscribe_success => '....',
url_unsubscribe_failure => '....',

And the change the User.pm like:

sub user_subscribe {
#-----------------------------------------------------------
# Subscribe a email address
#
my $url_success = $CFG->{url_subscribe_success} || "$CFG->{image_url}/page_subscribe_success.html";
my $url_failure = $CFG->{url_subscribe_failure} || "$CFG->{image_url}/page_subscribe_failure.html";

.....

sub user_unsubscribe {
#-----------------------------------------------------------
# Unsubscribe a email address
#
my $url_success = $CFG->{url_unsubscribe_success} || "$CFG->{image_url}/page_unsubscribe_success.html";
my $url_failure = $CFG->{url_unsubscribe_failure} || "$CFG->{image_url}/page_unsubscribe_failure.html";
....

Hope that helps.

TheStone.

B.
Quote Reply
Re: [TheStone] Bug in the check box subscription In reply to
and the Validate URL?
Max
The one with Mac OS X Server 10.4 :)
Quote Reply
Re: [maxpico] Bug in the check box subscription In reply to
No, you don't have to. It will redirect to custom URL.

TheStone.

B.
Quote Reply
Re: [TheStone] Bug in the check box subscription In reply to
Adding the lines to Data.pm caused Error 500 so I had got it working this way:
(example)
my $url_success = "http://www.mydomain.com/page_unsubscribe_success.html";
Max
The one with Mac OS X Server 10.4 :)