user-pic

recently_commented_on no longer working?

Vote 0 Votes

I've just upgraded to 4.2 and the mt:Entries attribute recentlycommentedon doesn't seem to be working for me any more.

I have a test template like this:


But it outputs nothing, despite there being comments on the site recently (eg here http://www.pepysdiary.com/archive/1665/08/12/ )

Have I made some stupid mistake or can anyone else replicate this?

Also, am I imagining things, or did the value for recentlycommentedon used to be the number of entries to display, rather than "the number of days to use to limit the selection"? http://www.movabletype.org/documentation/appendices/tags/entries.html

Thanks.

Reported on Movable Type 4.2

6 Replies

| Add a Reply
  • My test template didn't show up (and I couldn't see an option to Preview my post). Here it is:




    Strange, works fine in a reply...

  • Pasted your snippet in exactly, and it works fine. Have you tried isolating it in its own index template and manually rebuilding it, just to see if something else might be interfering?

    The docs are wrong. Bug filed; I'll submit a patch this weekend if someone doesn't get to it first.

  • Many thanks for checking that for me Su, but I can't seem to fix the problem here.

    [Here's a sample page](http://www.gyford.com/temp/recent_comments_test.html) including the MT code I'm using in an index template, and a list of recent comments to show that more Entries should appear.

    Anything obvious I've done wrong there, or is there some other weirdness at play?

  • Many thanks for checking that for me Su, but I can't seem to fix the problem here.

    [Here's a sample page](http://www.gyford.com/temp/recent_comments_test.html) including the MT code I'm using in an index template, and a list of recent comments to show that more Entries should appear.

    Anything obvious I've done wrong there, or is there some other weirdness at play?

  • (Oops, sorry for duplicate... seems it's possible to go 'Back' to a previous page and submit the same comment again.)

  • The solution is to add limit="100" to the MTEntries tag, so something like:


    ...

    If 100 isn't enough, try a larger number. No idea why this works or is needed, but it does.

    Incidentally, this is only needed if the template is being published statically. If you're publishing the template dynamically, the limit modifer isn't required to get recently\_commented\_on working.

Add a Reply

If you need to share template code, replace all the "<" signs with "&lt;" or use this utility.

Forum Groups

1195 3842

Last Topic: Comment form customization by anisa on Feb 8, 2010

60 184

Last Topic: Dynamic Publishing - Blank Screen by Sivaram M on Dec 15, 2009

955 2985

Last Topic: MT5 - Cookie Problems by Dave Cross on Feb 9, 2010

68 213

Last Topic: How to add Custom Fields by gregoryttp on Feb 5, 2010

19 67

Last Topic: Custom main index page by Richard on Feb 7, 2010

42 169

Last Topic: I want to write my own wordpress plugin by Xarzu on Jan 31, 2010

11 21

Last Topic: Monthly Calendars Help Needed by joe leblanc on Jan 19, 2010

91 326

Last Topic: SpamLookup Keyword Filter 2.1 not work by b.n09 on Nov 17, 2009

52 178

Last Topic: Assets - No options by Chelle on Feb 5, 2010

code.sixapart.com

128 444

Last Topic: ActionStream with Movable Type 5.01 by Parneix on Jan 24, 2010

154 468

Last Topic: URGENT! Help needed w/ Virus by PhilContrino on Feb 1, 2010