Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#85 2007-01-03 22:02:28

benbruce
Plugin Author
Registered: 2006-01-13
Posts: 328
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

snkhan,

You’re saying that the article has <txp:permlink> in the excerpt field, but the newsletter form you’re mailing does not have <txp:excerpt /> or <txp:bab_pm_data display="excerpt" /> in it? And it’s still getting the error. And it only gets the error when that is present in the excerpt?

I’m not sure how that could be — unless the form is calling the excerpt somehow, it shouldn’t be throwing that error.

The processing thing might be a different issue, now. I’m not sure if they ARE related.

One thing that popped out at me was PHP 5. I’m not sure whether that would make a difference but it might break some things.

Thanks for all your effort trying to get this to work.

  • Ben

Offline

#86 2007-01-03 22:23:55

snkhan
Member
From: Leicester, UK.
Registered: 2004-07-20
Posts: 57
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

Hey Ben,

Yes, the newsletter form does not call the excerpt – which is why I was a little puzzled!

I isolated the problem being the permalink in the excerpt. I fixed this by using saccade’s plugin. You could try this in a demo version you may have to see whether this confirms my report.

Regarding the processing, IE7 correctly informs me that TP has finished sending the emails. Firefox, however, continues to refresh the page continuesly. It therefore rules out the PHP5 issue. However, could you help with the unsubscribe form – how to make it co-exist on the same page as the subscription form?

I thank you for being so generous with your time :-)

Offline

#87 2007-01-03 23:52:29

benbruce
Plugin Author
Registered: 2006-01-13
Posts: 328
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

snkhan,

I’m using Firefox and IE for my own testing, and never ran across that issue. But clearly there’s something checked [or unchecked] somewhere that is causing a problem. I’ll keep thinking on it.

Unsubscription:

I think the problem you’re running into is that you haven’t set required="no" on the rest of the ZCR form. Most of those ZCR tags default to required="yes" which is why, if your user only clicks the unsubscribe box and clicks “Submit,” they are getting “You didn’t fill out all the fields …” The email address is required for unsubscription, as that’s the unique identifier and what PM uses to delete the subscriber.

The only place this is an issue is if you have the “This is not spam” checkbox as a part of your form … doesn’t make sense if it’s not required. You could either remove that part of the form or just expect that people are going to enter their email address, check the box, hit “Submit” and then have to check the other box as well.

I think with some wrangling you’ll get what you want. The alternative is to build two separate forms.

  • Ben

Offline

#88 2007-01-04 01:11:23

snkhan
Member
From: Leicester, UK.
Registered: 2004-07-20
Posts: 57
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

Hi Ben,

What I meant to say is to get both the subscribe and unsubscribe forms to co-exist on the same page. At present, clicking on submit to unsubscribe yields an error on the subscribe form. I guess the processing script is checking the input of both forms instead of the one that has just been submitted.

Form in use
<txp:zem_contact to="" label="" copysender="no" >
<txp:zem_contact_text name="zemSubscriberName" label="Your Name" break=""/><br />
<txp:zem_contact_email name="zemSubscriberEmail" label="Your Email" break="" /><br />
<txp:zem_contact_select list="1" selected="1" name="zemSubscriberLists" label="Subscribe to" break="" /><br />
<label for="zemSubmit">Subscribe</label>
<txp:zem_contact_submit label="Send" /><br /><br />
</txp:zem_contact>

<txp:zem_contact to="" label="" copysender="no" >
<txp:zem_contact_text name="zemUnSubscribe" label="Email address" required="yes" /><br />
<label for="zemSubmit">Unsubscribe</label>
<txp:zem_contact_submit label="Send" />
</txp:zem_contact>

Also, how would I go about generating a unsubscribe successful page? This is for people who might reach the unsubscribe page without having the UID present in the URL. Conditionals would be nice, which could be included within the article itself (much like the <txp:bab_pm_unsubscribe /> tag. We might have sometime like this:

<h1>Unsubscribe from sitename</h1>

<!-- If the form has been submitted -->
<txp:bab_pm_if_unsubscribed>
<p>You have sucessfully been removed from the mailing database. Thank you for your interest.<p>
</txp:bab_pm_if_unsubscribed>

<!-- Otherwise show the unsubscribe form -->
<txp:bab_pm_if_not_unsubscribed>
<p>Use the form below to unsubscribe from our mailing list</p>
<txp:output_form form="unsubscribe" />
</txp:bab_pm_if_not_unsubscribed>

Unsure whether anything like this can be done! Thanks for your help so far :-)

Offline

#89 2007-01-04 21:54:43

Sak
Member
From: Seattle, WA
Registered: 2006-10-18
Posts: 30
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

Hey Ben,

I wanted to let you know of a new error message that I’m getting now when I use Postmaster.

Warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘’ at line 2 select *, unix_timestamp(Posted) as sPosted, unix_timestamp(LastMod) as sLastMod from textpattern where ID= in /users/home/sakeel/web/public/sak/textpattern/lib/txplib_db.php on line 84

There have been a few changes to my TXP setup since the last time I posted and used Postmaster, so I’m not sure if it’s something that I’ve done or not. Here’s the changes that I’ve made incase they help:

Replaced /include/txp_image.php with CVS version.
This was when I was working with Mary on some issues with uploading images. Probably unrelated.

Updated the following plugins:
zem_contact_reborn: 4.0.3.18
zem_contact_lang: 4.0.3.5
rss_unlimited_categories: 0.7.1

The rss_unlimited_categories plugin may be related, since installing it I had to run a couple SQL statements to copy my old article/category assignments to the new DB table that rss_unlimited_categories uses. Perhaps it has something to do with the new categories table not being read by Postmaster?

Anyway, it still sends a mail, but the mail is empty, with the exception of the unsubscribe link.

I’m using Postmaster v. 4.0.4.0.2


Thanks,
Sak.

Offline

#90 2007-01-05 11:52:10

kees-b
Member
From: middelburg, nl
Registered: 2004-03-03
Posts: 235
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

benbruce wrote:

Kees, thanks for the insight. Not sure what the problem could be.

Hi Ben

Could there be a relation between the size of the plugin text file and the installing problems? Allthough this does not explain why it will not install only on specific hosts and installs fine on many others. But, as is explaned in this thread, the maximum allowed size for a plugin txt file is rather limited.

kees

Offline

#91 2007-01-08 18:34:49

benbruce
Plugin Author
Registered: 2006-01-13
Posts: 328
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

Sak,

Any of those three plugins seem like reasonable culprits, although the multiple categories should only be an issue [you’re correct that PM won’t be reading those] if you’re CALLING the categories in your form. Not sure if you are or not. You could try disabling them one at a time to see which one is causing the problem.

kees-b,

The size issue is one I thought about a bit but then hadn’t heard any complaints about it [I thought] and so I didn’t think of it again. I had been considering pulling some information into a second plugin anyway so it might make sense to do it in any case. I’m sure my code could be cleaned up, too … :)

[I’m also moving the help section OUT of the plugin and onto my site so that it’s easier to navigate, more easily updated, commentable, etc.]

snkhan,

Reading the ZCR thread may help with “two forms on one page” — I’m pretty sure Ruud made this possible with the last release. I’m not sure how that’s done, though. The way I had it thought out in my head is to use a SINGLE form. You could still style it so they seem separated, but the only piece of information required to unsubscribe is the email address. Keeping them in one form and making any other items required="no" should do the trick.

However, thinking about your “generating a unsubscribe successful page” question, makes me argue for splitting up all the functions onto different pages. Simply make a separate page for unsubscribing from email, and write your “Success” message in that article [including the <txp:bab_pm_unsubscribe /> tag in there as well. Whenever someone arrives from the link in their email, they will see your message. Have a separate page for the unsubscribe form [which is where you will send people who arrive from your website], and separate page for subscription. It’s clean and not complicated, and if you do it right, shouldn’t be something your users even notice.

Finally, I am having the same “always refreshing” issue on Safari, and on Firefox on a Mac, but not on IE7 or on Firefox on a PC. If I manually click the refresh button, the “Finished” message appears. The mails are sending correctly [and in the right number], but I’m not sure yet why that is happening on some browsers but not others.

  • Ben

Last edited by benbruce (2007-01-08 18:44:15)

Offline

#92 2007-01-08 18:55:14

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

Yes, using multiple forms on a single page should be possible with ZCR 4.0.3.18. It works by adding an extra hidden input in the form which contains an MD5 hash that uniquely identifies the form being used. This all happens automagically, so as a ZCR user you don’t have to do anything special to make it work.

Offline

#93 2007-01-08 19:09:42

Sak
Member
From: Seattle, WA
Registered: 2006-10-18
Posts: 30
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

Hey Ben,

I went in this morning to have a go at your suggestions, and somehow managed to fix the problem.

The first thing I did was create a new mailing list called “testing.” It doesn’t seem possible for a person to belong to multiple mailing lists though. When I tried to add myself to the new “testing” mailing list, I got the following error message:

Warning: Duplicate entry ‘sak.102010@gmail.com’ for key 2 INSERT INTO bab_pm_subscribers values (‘’,‘Sakeel’,‘sak.102010@gmail.com’,‘testing’,’‘,’‘,’‘,’‘,’‘,’‘,’‘,’‘,’‘,’‘,’‘,’‘,‘bfe3d3dc38f743b04c7830c3f04e5280’) in /users/home/sakeel/web/public/sak/textpattern/lib/txplib_db.php on line 84

What I did next must have fixed the problem. I moved myself to the “testing” list, and sent an email. The first email that I sent through Postmaster to the “testing” list didn’t generate the error on the “sending” page that pops up, but still sent an empty email. This test was done with all of my other plugins still enabled, to see if the same error was still reproducable. No error message, but the empty email told me that something was still wrong.

I then moved everyone subscribed to the “default” list over to the “testing” list, and myself back to the “default” list to see if it was an issue with which list a subscriber belongs to. I sent a second email, and POOF it just worked. All plugins were still enabled, and the email came across just fine. So I moved everyone back over to the “default” list and all is well again.

Beats the snot outta me, but it seems to be playing well with others again. =)


Thanks,
Sak.

Offline

#94 2007-01-08 19:37:19

benbruce
Plugin Author
Registered: 2006-01-13
Posts: 328
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

Sak,

You’ve run into a subtlety of how PM works — there is a “unique identifier” for each subscriber, and that identifier is their email address. So you can’t subscribe someone who is already subscribed — it won’t let you. What that error message is saying is that you’re trying to enter a NEW subscriber with the same email address as a subscriber already entered. What you want is to UPDATE an existing subscriber, and currently there’s no way to do that with the form. To add someone to a list, you’ll need to do it manually through the edit subscriber page. Does that make sense?

This is something that will need to be updated as you might want to make a new list with 100 subscribers on it, and you’re not going to do each one manually [for now, though, a mysql statement would do the trick for larger numbers].

As for your fix, are you saying that the “default” list works fine, but the new list “testing” sends emails, but they are empty? Did the default list work fine BEFORE you made changes, then you made changes and it didn’t work, then you added a list and it worked? Sorry, just trying to get clear on what happened with you — try and capture the issue and add it to the help [for the next version].

  • Ben

Offline

#95 2007-01-08 20:16:48

Sak
Member
From: Seattle, WA
Registered: 2006-10-18
Posts: 30
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

Hey Ben,

Yeah, I figured that it might be a pain for larger lists to have to manually edit each subscriber. But for my test here I only have a few so it was easier.

So what happened is that the “default” list was sending empty emails originally when I made the first post here. When I created the “testing” list today, it also sent an empty email. It wasn’t until I moved all of the subscribers from the “default” list to the “testing” list, and back again, that everything worked fine. Here’s a step by step of the cure to this problem as I discovered it. Of course, the problem would have to come up again to verify if these steps fix the problem.

1. Create “testing” list
2. Move my email to “testing” list. Sending a post to the “testing” list generated empty email.
3. Moved all subscribers from “default” list to “testing” list.
4. Moved my email from “testing” list back to “default” list. Sending a post to the “default list generated good email.
5. Moved all subscribers from “testing” list back to “default” list.

One other thing to mention, that I forgot in my other post, was that the very first thing that I tried to do was use the “Test” option at the Article -> Write form. The “Test” email sent fine, had content, etc. So that’s when I thought it might be related to an actual subscriber list, and went through the steps above to createa a second list. Thinking back, I wonder if perhaps this may be somehow related to how the two different emails are generated? It reminded me of the old bug that caused header information to be shown to a subscriber email but not a Test email. Just a thought, if it helps.

EDIT: Right, I just tested again, and moving myself back to the “testing” list generates an empty email. But you’re right, the “default” list was sending empty emails until after moving the subscribers.

Last edited by Sak (2007-01-08 20:23:45)


Thanks,
Sak.

Offline

#96 2007-01-09 00:26:31

snkhan
Member
From: Leicester, UK.
Registered: 2004-07-20
Posts: 57
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

ruud wrote:

Yes, using multiple forms on a single page should be possible with ZCR 4.0.3.18. It works by adding an extra hidden input in the form which contains an MD5 hash that uniquely identifies the form being used. This all happens automagically, so as a ZCR user you don’t have to do anything special to make it work.

Thanks – I updated to the latest version and this was resolved. Thank you for your help :-) Ben, I’ll go with your suggestion of creating a custom unsubscribe section. Happy days!

Saj

Offline

Board footer

Powered by FluxBB