Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [archived] Postmaster -- A simple email-on-post / newsletter manager
gerhard01 wrote:
Copy & pasting the plugin from http://www.benbruce.com/txp/Postmaster_v4.0.4.0.2.php
leads to
Badly formed or empty plugin code
in my case (TXP 4.0.4). Ideas what I could do?
Thanks!
Hi ben,
Same error here on a dutch host (Linux 2.6.16.29-xen)! I also tested this with an exact clone of this txp 4.0.4 install on textdrive (FreeBSD 5.5-STABLE) and it did install correctly. So it looks like it is not installing on some hosts. Other plugins are installing fine on both.
kees
Last edited by kees-b (2006-12-31 15:47:09)
Offline
Re: [archived] Postmaster -- A simple email-on-post / newsletter manager
Hi Ben,
Thanks for all your hard work with this plugin. I am currently receiving the following error when clicking on test:
Notice: error_article_context in /home/7912/domains/algus.org.uk/html/members/textpattern/lib/txplib_misc.php on line 1821
Although the email is sent. Any ideas what might be causing this problem?
Saj
Offline
Re: [archived] Postmaster -- A simple email-on-post / newsletter manager
Also can’t seem to get the unsubscribe function to work. I have:
- Created a new section called subscribe. Uses page ‘subscribe’
- Created a new page ‘subscribe; with
<txp:article form="Unsubscribe" /> - Created a new form called ‘Unsubscribe’
<txp:if_article_list>
<h1>Subscribe to ALGUS eNews</h1>
<txp:output_form form="subscribe" />
</txp:if_article_list>
<txp:if_individual_article>
<h1><txp:title /></h1>
<txp:body />
</txp:if_individual_article>
- When clicking on the unsubscribe link on the email, the user is presented with a blank page, see the example
- Postmaster within the control panel has the following settings: (unsubscribe URL) http://www.algus.org.uk/members/index.php?id=12
Can anyone see anything which I might be doing wrong?
Offline
Re: [archived] Postmaster -- A simple email-on-post / newsletter manager
1. Is there a way to send an email to subscribers (via web input box) so that they receive an email alerting that someone added their address to the list? At the moment an email is only sent to the admin.
2. Is there a way to get rid of the select element in the example subscription form? Using an hidden field with list value do the trick? It seems so, but in the email sent to the admin, there is no list name.
Thank you for your great work!
Z-
Last edited by Zanza (2007-01-02 20:51:24)
Offline
Re: [archived] Postmaster -- A simple email-on-post / newsletter manager
Kees, thanks for the insight. Not sure what the problem could be.
snkhan, that “article_context” error means you are asking Textpattern to provide information (through a custom tag) that it can’t find (given the information it has). In your form, see if there are any TXP tags that can be replaced with the custom PM tag <txp:bab_pm_data> (a good clue is if you are receiving the email but, say, the body of the article is not appearing). Examples are <txp:title /> and <txp:body />. These should be written like <txp:bab_pm_data display="title"> and <txp:bab_pm_data display="body">. A good resource would be which TXP tags work correctly and which don’t.
I don’t have time right now to really dig down into your unsubscribe problem. A couple of things to test out:
- IS it working? The unsubscribe function is “silent” so if you click the unsubscribe link in the email and come to the page, where you should see a result is in the “list of subscribers” in TXP > Extensions > Postmaster — not on the page itself [the subscriber you just clicked the link from should have been removed from the list]. The function and what’s appearing on the page are two separate things.
- Try a simpler unsubscribe page [to test]. Create a new page whose function is simply to unsubscribe someone who came from that email.
Offline
Re: [archived] Postmaster -- A simple email-on-post / newsletter manager
Hi Ben,
Managed to sort out the problems relating to the unsubscription. Seems refreshing the page was still fetching the cached version of the article. A couple of Ctrl+F5 later and all is well.
Regarding the error, my Newsletter form is:
Dear <txp:bab_pm_data display="name" />,
We have recently published a new announcement on our website, <site> . The title of the article is "<txp:bab_pm_data display="title" />".
To read the full article visit
<txp:bab_pm_data display="link" />
You can obtain log in credentials by calling the office.
To unsubscribe from our mailing list please visit <txp:bab_pm_unsubscribeLink type="text" />.
Thank you,
—-
In addition, when sending out a complete mailing (currently consisting of two admin accounts) the send page always displays
Mailing ...
Please don't close this window until mailing is complete.
You will receive a written message here when mailing is complete.
The page continues to refresh, but no emails are sent out. Could this be related to the error message I am receiving above?
Last edited by snkhan (2007-01-02 23:07:44)
Offline
Re: [archived] Postmaster -- A simple email-on-post / newsletter manager
Zanza,
The attribute you are looking for is “copysender” — set that to yes and the subscribee should receive an email. Check the zem_contact_reborn documentation for more on that [and to doublecheck me].
Use this line to automatically enter a list for a new subscriber:
<input type="hidden" name="zemSubscriberLists" value="list_name" >
You could also do:
<input type="hidden" name="zemSubscriberLists" value="list_name list_name2 list_name3" >
That should be in the help but is not (yet).
snkhan,
Glad the unsubscription is worked out. Not sure what’s going on with your mailing errors (and they probably are related). Your form looks ok — is <site> shorthand? I think it should be <txp:sitename /> but … that doesn’t seem like it would cause the error. My suggestion is to set up a separate, extremely simple setup, and make sure the plugin is working there [or let me know if it HAS worked correctly]. If it’s not working there, we’ll be able to more easily pinpoint the bug.
- Ben
Last edited by benbruce (2007-01-03 02:02:27)
Offline
Re: [archived] Postmaster -- A simple email-on-post / newsletter manager
Hey Ben,
Thanks for your continued support. I’m confident that my form/section set up is correct, I just wrote <site> instead of my real site name. My subscription works like this:
Section subscribe. A couple of conditionals here so that subscribe form only shows up if no article selected (the only article posted within this section is the unsubscribe article). If you want I can create a temporary user/administrator for txp if you want to inspect the settings (unsure whether this helps, but I’m using TP with PHP5 on mediatemple’s grid server).
IS it possible to create a manual unsubscription form for those who will not be clicking from the email? I realised I can use <txp:zem_contact_text name="zemUnSubscribe" label="Unsubscribe" /> to unsubscribe. Is there a way of putting both the subsribe and unsubscribe form on the same page without getting any ‘You have not completed …’ errors?
Last edited by snkhan (2007-01-03 20:12:29)
Offline
Re: [archived] Postmaster -- A simple email-on-post / newsletter manager
Hmm, still getting the article_context errors. But I have managed to narrow down the cause of the problem. My article excepts use <txp:permlink>Read more »</txp:permlink> so that I can make my read more links appear inline. When this code is present within the excerpt field (even if it is not output within the newsletter form itself) the error is output.
Additionally, the postmaster processing page never returns a completed message, even if though there are only two subscribers. The completed message however, is returned only when sending a ‘Test’ message. (Edit#2 Must be a Firefox issue, as this error is not displayed in IE7. It might be linked to the fact that Firefox opens a new tab, which might be causing this behaviour)
Any other users experiencing a similar problem?
Saj
Last edited by snkhan (2007-01-03 20:16:28)
Offline
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
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
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
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
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
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