create new tag
, view all tags

SubscribePluginDev Discussion: Page for developer collaboration, enhancement requests, patches and improved versions on SubscribePlugin contributed by the TWikiCommunity.
• Please let us know what you think of this extension.
• For support, check the existing questions, or ask a new support question in the Support web!
• Please file bug reports in the SubscribePlugin bug database.

Development discussions on SubscribePlugin

-- CrawfordCurrie - 23 Apr 2007

Great, looks handy!

Not documented, but is it possible to have the button automatically change to Unsubscribe if the user has subscribed already?

-- ArthurClemens - 23 Apr 2007

Thank you Crawford for contributing this plugin!

For next release, some feedback:

  • I second Arthur's suggestion to show a "Subscribe" or "Unsubscribe" label, depending on the subscription status.
  • In "Plugin Installation Instructions" section,
    • add table with content of package
  • In "Plugin Info" section,
    • Add "initial version" row to Change History
    • Add TWiki Dependency, CPAN Dependencies, Other Dependencies, Perl Version and Benchmarks rows as defined in NewPluginTemplate

-- PeterThoeny - 24 Apr 2007

Just published new version with some fixes by Crawford and additional enhancements by MayerEugen.

-- LynnwoodBrown - 24 Apr 2007

Arthur, MayerEugen and main.LynnwoodBrown contributed the switch you wanted.

-- CrawfordCurrie - 25 Apr 2007

I just changed the plugin that way, that its always shows the button and no "message". Its mostly unusefull to show the long message at the point, where the button is.

The user can see, wheather the subscription works, just if the "button label changes"

-- MayerEugen - 25 Apr 2007

  • Grammar: subscribben?
  • The plugin topic does not mention dependency on MailerContrib

-- ArthurClemens - 25 Apr 2007

A very similar mechanism could be used to add topics to a "Favorites" list (in pattern this is =UserName=Leftbar). The way buttons are drawn, the messages are similar, the topic where data is written is different. It would be a pity to reinvent the wheel.

In both cases a "View my subscriptions" / "My favorites" page would be needed to review and manage items, for example "Check items to unsubscribe".

-- ArthurClemens - 25 Apr 2007

Could it also have a option to "Subscribe to all children" as well? That would be extremely useful.

-- PankajPant - 25 Apr 2007

To keep that kind of interface economic we could use a subscribe button with additional pull-out options.

Roughly something like this:

-- ArthurClemens - 25 Apr 2007

The buttons, subscribe / unsubscribe should be defined in some template. Maybe i work it out today...think i will change the plugin anyway.

What do you think about to put the message in the breadcrumb ( in brackets ) like the edit message?

-- MayerEugen - 26 Apr 2007

No, the message should be more visible. See for instance how I have done the messages for TagMePlugin (version in svn). We need a messaging solution, see proposal RelayAlertsToTopicTop.

-- ArthurClemens - 26 Apr 2007

For this kind of very short confirmation message, I still would prefer a simple alert box rather than placing the text anywhere in the topic.

-- LynnwoodBrown - 26 Apr 2007

An alert box requires an extra effort to close it.

-- ArthurClemens - 26 Apr 2007

I've installed using the installer but it gives the following error when it tries to load: Global symbol "$who" requires explicit package name at /twikiTest/lib/TWiki/Plugins/SubscribePlugin.pm line 63 (and line 75, 83, 93)

-- TomBriden - 01 May 2007

Tom - i have seen this problem. I'll upload an updated version. There are some other bugs remaining that I was hoping to get Mayer (or someone) to fix first.

Arthur: I agree that it takes a bit more effort (hitting return) but provides clear, positive feedback that they have subscribed. For this kind of action, that seems quite appropriate. Inserting text in the place where the link presents problems. First, it can mess up the formatting of the page. In my case, I had planned on putting a subscribe button in line with several other buttons. Having a sentence inserted in the location of the button doesn't work at all. Second, depending on the message and it's placement, the feedback may not be visible enough to the user, leaving them wondering if they have subscribed to the topic or not. So, to my mind, having a dropdown for this kind of message seems the more appropriate and flexible solution.

-- LynnwoodBrown - 01 May 2007

Lynnwood, did you have a look at TagMePlugin (svn)?

-- ArthurClemens - 01 May 2007

I noted this plugin is not showing up in the 4.1 plugin install page. It was because the appropriate form was not attached to the main page. I have add it but have not set the content appropriately. CC or others involved in this plugin please update as appropriate.

-- RickMach - 01 May 2007

I just tried installing the plugin on a new install of 4.1.2 and it fails with

| 01 May 2007 - 15:20 | TWiki::Plugins::SubscribePlugin could not be loaded.  Errors were:
Global symbol "$who" requires explicit package name at /var/www/twiki/lib/TWiki/Plugins/SubscribePlugin.pm line 63.
Global symbol "$who" requires explicit package name at /var/www/twiki/lib/TWiki/Plugins/SubscribePlugin.pm line 75.
Global symbol "$who" requires explicit package name at /var/www/twiki/lib/TWiki/Plugins/SubscribePlugin.pm line 83.
Global symbol "$who" requires explicit package name at /var/www/twiki/lib/TWiki/Plugins/SubscribePlugin.pm line 93.
Compilation failed in require at (eval 102) line 1.
BEGIN failed--compilation aborted at (eval 102) line 1.

I running under Apache 1.3 and mod_perl

-- RickMach - 01 May 2007

Looks like this issue has been resolved in the subversion version already. Any reason not to update the plugin package that is released?

-- RickMach - 01 May 2007

-- ArthurClemens - 01 May 2007

I've uploaded a new version that has fixed the problems Rich and Tom mention above. This version basically works as advertized. Unfortunately, the format and formatunsubscribe attributes are not working presently so I have filed a bug report on that (Bugs:Item4010) and removed those attributes from the docs until they work (hopefully soon).

-- LynnwoodBrown - 02 May 2007

After getting Sven's help in cleaning up the code on this plugin, it should be fully functional now. I've published the latest version.

-- LynnwoodBrown - 18 May 2007

I've just installed it and am running into a small issue. I am getting the following error every time I try to subscribe to a topic:

TWiki detected an internal error - please check your TWiki logs and webserver logs for more information.
fileparse(): need a valid pathname

Here's the error itself from the warn200706.txt file:

| 28 Jun 2007 - 13:07 | fileparse(): need a valid pathname at /opt/www/wiki/lib/TWiki/Store/RcsFile.pm line 112
 at /usr/local/lib/perl5/5.8.7/File/Basename.pm line 175
        File::Basename::fileparse('undef') called at /usr/local/lib/perl5/5.8.7/File/Basename.pm line 252
        File::Basename::dirname('undef') called at /opt/www/wiki/lib/TWiki/Store/RcsFile.pm line 112
        TWiki::Store::RcsFile::_mkPathTo('undef') called at /opt/www/wiki/lib/TWiki/Store/RcsFile.pm line 720
        TWiki::Store::RcsFile::_saveFile('TWiki::Store::RcsLite=HASH(0x3030f8c8)', 'undef', 'RichardHurt\x{a}1183050427') called at /opt/www/wiki/lib/TWiki/Store/RcsFile.pm line 609
        TWiki::Store::RcsFile::setLock('TWiki::Store::RcsLite=HASH(0x3030f8c8)', 1, 'RichardHurt') called at /opt/www/wiki/lib/TWiki/Store.pm line 1189
        TWiki::Store::lockTopic('TWiki::Store=HASH(0x300a1d70)', 'TWiki::User=HASH(0x309dfd44)', 'Sandbox', 'undef') called at /opt/www/wiki/lib/TWiki/Store.pm line 1011
        TWiki::Store::_noHandlersSave('TWiki::Store=HASH(0x300a1d70)', 'TWiki::User=HASH(0x309dfd44)', 'Sandbox', 'undef', '%MAKETEXT{"This is a subscription service to be automatically...', 'TWiki::Meta=HASH(0x30b7ab84)', 'HASH(0x30b7ab0c)') called at /opt/www/wiki/lib/TWiki/Store.pm line 806
        TWiki::Store::__ANON__() called at /opt/www/wiki/lib/CPAN/lib///Error.pm line 387
        eval {...} called at /opt/www/wiki/lib/CPAN/lib///Error.pm line 379
        Error::subs::try('CODE(0x30b7ab6c)', 'HASH(0x30b7ac50)') called at /opt/www/wiki/lib/TWiki/Store.pm line 809
        TWiki::Store::saveTopic('TWiki::Store=HASH(0x300a1d70)', 'TWiki::User=HASH(0x309dfd44)', 'Sandbox', 'undef', '%MAKETEXT{"This is a subscription service to be automatically...', 'undef', 'HASH(0x30b7ab0c)') called at /opt/www/wiki/lib/TWiki/Contrib/MailerContrib/WebNotify.pm line 75
        TWiki::Contrib::MailerContrib::WebNotify::writeWebNotify('TWiki::Contrib::MailerContrib::WebNotify=HASH(0x30b7a4a0)') called at /opt/www/wiki/lib/TWiki/Plugins/SubscribePlugin.pm line 166
        TWiki::Plugins::SubscribePlugin::_subscribe('Sandbox', 'WebPreferences', 'RichardHurt', 'RichardHurt', 0) called at /opt/www/wiki/lib/TWiki/Plugins/SubscribePlugin.pm line 56
        TWiki::Plugins::SubscribePlugin::_SUBSCRIBE('TWiki=HASH(0x3001d8c8)', 'TWiki::Attrs=HASH(0x30b5b20c)', 'WebPreferences', 'Sandbox') called at /opt/www/wiki/lib/TWiki/Func.pm line 1722
        TWiki::Func::__ANON__('TWiki=HASH(0x3001d8c8)', 'TWiki::Attrs=HASH(0x30b5b20c)', 'WebPreferences', 'Sandbox') called at /opt/www/wiki/lib/TWiki.pm line 2245
        TWiki::_expandTagOnTopicRendering('TWiki=HASH(0x3001d8c8)', 'SUBSCRIBE', 'undef', 'WebPreferences', 'Sandbox') called at /opt/www/wiki/lib/TWiki.pm line 2164
        TWiki::_processTags('TWiki=HASH(0x3001d8c8)', '---+!! <nop>%WEB% Web Preferences\x{a}\x{a}The following settings are...', 'CODE(0x305da330)', 16, 'WebPreferences', 'Sandbox') called at /opt/www/wiki/lib/TWiki.pm line 2090
        TWiki::_expandAllTags('TWiki=HASH(0x3001d8c8)', 'SCALAR(0x305e9968)', 'WebPreferences', 'Sandbox') called at /opt/www/wiki/lib/TWiki.pm line 2433
        TWiki::handleCommonTags('TWiki=HASH(0x3001d8c8)', '---+!! <nop>%WEB% Web Preferences\x{a}\x{a}The following settings are...', 'Sandbox', 'WebPreferences') called at /opt/www/wiki/lib/TWiki/UI/View.pm line 320
        TWiki::UI::View::_prepare('---+!! <nop>%WEB% Web Preferences\x{a}\x{a}The following settings are...', 'TWiki=HASH(0x3001d8c8)', 'Sandbox', 'WebPreferences', 'TWiki::Meta=HASH(0x30a4b1e8)', 0) called at /opt/www/wiki/lib/TWiki/UI/View.pm line 304
        TWiki::UI::View::view('TWiki=HASH(0x3001d8c8)') called at /opt/www/wiki/lib/TWiki/UI.pm line 97
        TWiki::UI::__ANON__() called at /opt/www/wiki/lib/CPAN/lib///Error.pm line 387
        eval {...} called at /opt/www/wiki/lib/CPAN/lib///Error.pm line 379
        Error::subs::try('CODE(0x30a43a94)', 'HASH(0x30a7d854)') called at /opt/www/wiki/lib/TWiki/UI.pm line 146
        TWiki::UI::run('CODE(0x3006dbb4)') called

-- RichardHurt - 29 Jun 2007

I have a problem: on the WebNotify page, I had myself listed with a '*' so that I'd be notified on every page change. Then, I went to another page and tested the subscribe/unsubscribe feature of this plugin. The problem: the WebNotify page gets a duplicate copy of its content, every time I hit the unsubscribe button, and the unsubscribe button isn't changing back to 'subscribe'. When I went to the WebNotify page, it had gotten huge (about 5 copies of the normal text), and there were entries of the form:

at the very bottom. I cleaned it all up with vi, but it will happen again if I use the unsubscribe button on the page called ProtocolPage.

-- CharlesHowes - 03 Jul 2007


This seems to be a problem with latest SubscribePlugin + MailerContrib that ships with TWiki 4.1.2 (the actual subscribe-unsubscribe code belongs to MailerContrib). I had the same issue here; solved by upgrading to the latest MailerContrib.


-- AlexandreTrofimov - 22 Aug 2007

I'm having trouble with subscribing to topic is webs other than Main. In these webs, WebNotify gets modified with the $wikiname and not $wikiusername (without the web name):

* MyName: ThisTopic

And it should be

* Main.MyName: ThisTopic

This way, I get no email notification. When I manually edit WebNotify, adding the web name to the wikiname, I get the email notifications.

What is wrong wiht my setup?



-- RafaelLotufo - 06 Dec 2007

Please ask support questions in the Support web.

-- CrawfordCurrie - 07 Dec 2007

Crawford, I would like to ask you to review TWikiLogos#Right_to_use_Trademarked_Artwork and to remove the small TWiki logo from the big logo. I consider it important that TWiki has consistent branding.

-- PeterThoeny - 17 Feb 2008

Sure Peter, no problem. Will do.

-- CrawfordCurrie - 20 Feb 2008

I've found a bug but because of DNS server problems at work I can't access the Bugs database (but I can access twiki.org ...?) so before I forget about it here it is and it's fix.

Using TWiki 4.1.1 and the SubscribePlugin version 13787 - 18 May 2007 (mind you, even the latest version from 20 Feb 2008 is still version 13787 in the source code and it still has the same bit of problem code). When you define the level of children topics you want to subscribe to in the WebNotify topic (e.g. MyTopic (3)) the Subscribe Plugin fails when it uses the MailerContrib isSubscribedTo function because it doesn't pass a $db variable and thus the getParent function is undefined. In the SubscribePlugin.pm file in the first else statement of _getbutton, somewhere after the #checking if the user has subscribed for that topic already comment but before the if ( $subscriber-> isSubscribedTo... you have to add

require TWiki::Contrib::MailerContrib::UpData;
my $db = new TWiki::Contrib::MailerContrib::Updata( $session, $web );
and then the above if statement becomes
if ( $subscriber->isSubscribedTo($stopics, $db) ) {

Hope that makes sense, sorry the lack of a patch file.

-- DavidPatterson - 31 Mar 2008

Thanks David, tracked as TWikibug:Item5488

-- CrawfordCurrie - 31 Mar 2008

Is it possible to set a default for the format of subscription you want, i.e. change summary or full topic?

-- GarySprague - 05 Apr 2008

Wouldn't it be more consistent to use MartinKaufmann instead of MartinKaufmann in the WebNotify topic? Apparently, MailerContrib is able to work with both but it would look nicer without the question marks.

I also attached a patch which introduces a for the button text to enable translations.

-- MartinKaufmann - 15 May 2008

I merged David's patch. Martin, sorry, but could you please add a bug item for any patch you add. I rarely visit this topic.

-- CrawfordCurrie - 25 May 2008

Had an issue with an internal failure, with it failing to find method new of TWiki::Contrib::MailerContrib::Updata

In the line:

my $db = new TWiki::Contrib::MailerContrib::Updata( $session, $web );

changed Updata to UpData and it began working fine.

-- ChrisJacobson - 27 May 2008

Anyone tried 16848 on 4.2.2? "Unsubscribe" links do nothing for me - you return to the topic, it still says "Unsubscribe", and the subscription is still listed in WebNotify. I'm running a clean 4.2.2 on FC9.

Maybe a problem with MailerContrib?

-- AaronFuleki - 10 Sep 2008

There is a problem with MailerContrib in the way it handles "unsubscriptions". I think it is fixed in svn, I don't know if it is released yet. I'm running an old version of MailerContrib in production, so I think this is something new.

-- RafaelAlvarez - 10 Sep 2008

I just installed SubscribePlugin on our 4.2.0 instance (MailerContrib 22 Jan 2008), and unsubbing works fine, so I think you're right Rafael. Did you find a bug number? Maybe we can encourage folks to get that into the next release, as it's broken for me in MailerContrib 03 Aug 2008, which is current as of this post.

-- AaronFuleki - 10 Sep 2008

It works on MailerContrib from 23 Jun 2007 (14249). I just found Bugs:Item5949, which explains the problem in more detail. There is no bugs filed against MailerContrib, so feel free to create one.

-- RafaelAlvarez - 10 Sep 2008

I have got the latest Version of the Plugin an MailerContrib and it is not working. in bugs:Item5949 LynnwoodBrown says it would be fixed - but i can not find any bugfix to install. How do i get the SubscribePlugin working again?

-- MathiasReiche - 08 Oct 2008

RafaelLotufo asked about WIKINAME vs WIKIUSERNAME. This is not a support questiopn (nothing is wrong with your setup). This is a bug (I believe).

-- VickiBrown - 16 Oct 2008

I've updated MailerContrib and SubscribePlugin to enable child subscriptions, and lists of topics - you need to update both at the same time.

I'm not really sure what issues above still exist, please raise bugs in the twiki bugs system.

-- SvenDowideit - 18 Oct 2008

Confluence has the features: start/stop watching this space/page. How do I add that features (using icons (and text) to indicate subscription status) to my skin?

-- FranzJosefGigler - 22 Oct 2008

When I download attached links I get rev 13787, which doesn't work with rev 17630 of MailerContrib.

-- TimHeilig - 02 Apr 2009

Hi TimHeilig,

I am looking into this issue - expect me to fix this before weekend


-- SopanShewale - 03 Apr 2009

New WatchlistPlugin is now available. It covers the functionalities of the MailerContrib / SubscribePlugin and is much easier to use. The WatchlistPlugin will eventually replace the MailerContrib.

-- Peter Thoeny - 2013-03-04

Topic attachments
I Attachment History Action Size Date Who Comment
PNGpng Options_button.png r1 manage 8.8 K 2007-04-25 - 20:25 ArthurClemens Behavior of subscribe options button
Unknown file formatpatch SubscribePlugin-Maketext.patch r1 manage 0.6 K 2008-05-15 - 06:56 MartinKaufmann Patch to add for subscribe button
PNGpng create_new_tag_feedback.png r1 manage 122.1 K 2007-05-01 - 23:45 ArthurClemens Example feedback from TagMePlugin
PNGpng delete_tag_feedback.png r1 manage 107.0 K 2007-05-01 - 23:45 ArthurClemens Example feedback (delete) from TagMePlugin
Edit | Attach | Watch | Print version | History: r45 < r44 < r43 < r42 < r41 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r45 - 2013-03-04 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.