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

1771 6153

Last Topic: Preview Template - Where can I find it? by Dice on Feb 6, 2012

86 302

Last Topic: website entries by masoud on Oct 26, 2011

1428 5076

Last Topic: Stupid Question? How to make a static homepage by Jeremy on Feb 3, 2012

693 2907

Last Topic: database upgrade hangs - upgrading to 4.37 by CrankyProfessor on Feb 1, 2012

84 291

Last Topic: How to have some other characters in entry basename automatically written by Afshin Haghighatnia on Dec 22, 2011

173 737

Last Topic: About the MT version stated in HTML source by Alex E. Schneider on Feb 7, 2012

190 565

Last Topic: Analytics Reporting by michael webster on Feb 5, 2012

48 210

Last Topic: An idea and also a request by Afshin Haghighatnia on Jun 29, 2011

64 246

Last Topic: jQuery in MT 5.1 still at 1.4 - why? by perlmonkey on May 25, 2011

code.sixapart.com

137 478

Last Topic: Getting a thumbnail with xpath by Peter on Mar 13, 2011

221 710

Last Topic: Publish queue cache coherence issue by Istvan Kallai on Jan 27, 2012