Help - Search - Members - Calendar
Full Version: possible MTEntries bug
Movable Type Community Forum > Other Product Discussion > Bugs and Odd Behavior
Miscellany
Hi - i'm in the middle of developing a site for the Vassar College weekly student newspaper with MT3 and I've come across a very frustrating behavior within MTEntries which might qualify as a full-blown bug.

the site i'm describing below can be found here:
http://misc.vassar.edu

I'm using "MTEntries category="*category name*" lastn="1""

to specify the latest entry in each of 7 or 8 categories, laid out in a grid on the main page. all was going well until i deleted out my test entries and some of the actual ones crept in, as several of them also had secondary categories assigned.

as may be visible on the site now, these entries proceed to appear TWICE, or rather the entry's excerpt appears twice, because it's been assigned to two categories, and there doesn't seem to be a way to limit them from appearing like that.

the problem is that the ENTRY itself is only appearing once, at least as far as i can tell, but it's visible twice, once for the category in each of the MTEntries section and once for the second category.

Does this make sense? I've been staring at this for like 2 hours now and I can't really figure out any way around it, using plugins or not, and I'm calling out for help.
shelley
QUOTE (Miscellany @ Jan 6 2005, 01:04 AM)
the problem is that the ENTRY itself is only appearing once, at least as far as i can tell, but it's visible twice, once for the category in each of the MTEntries section and once for the second category.

I'm not quite clear on what you mean by this.
Miscellany
Sorry, Shelley - it's a little confusing. What I mean is that the text of the post is dupicated and appears twice because, i guess, my method of listig by category. But because it's from the same posting, the entry itself is sort of only showing up once.

Take a look. We're still in production, so the articles on the home page are in flux, but the last few times I've checked up on it, there have been one or two examples.
shelley
Let's take an example: I see "Sports Test" listed twice, once under "Column" and once under "Sports". I assume it is listed twice because it has been assigned to both of those categories, and is the most recent entry for each of them. Is this true or not?

As far as "sort of only showing up once", I guess I'm still just not comprehending exactly what you mean by that. Either "Sports Test" is showing up twice or it's showing up once, I'm not understanding how both could be the case. huh.gif

What is the behavior you were hoping to see instead?
Miscellany
Shelley - that's exactly the problem. I'm looking for a solution would allow me to have entries like "Sports Test" show up only once, as it's the latest entry in the Sports category, and the Column category isn't a criterion for display. It just happens to sort of also be showing up, because Sports brings that entry in and the Column category attaches itself.
William Jackson
I would love to see the MT code that generates that grid.
Miscellany
wm,

the grid is actually generated using the css float property and an apparently not so good implementation of movabletype's mtentries code. i'd be more than happy to share it once it hits final release, which as maybe you can tell i'm not too close to yet.

i'm still sort of trying to figure out if this is a bug in movabletype (i haven't yet upgraded to 3.14, i should probably try that) or in my code. i'd be happy to post more complete code if anyone thinks that would help figure it out.
William Jackson
QUOTE (Miscellany @ Jan 10 2005, 02:35 PM)
i'd be happy to post more complete code if anyone thinks that would help figure it out.

That's what I meant. smile.gif We all make silly mistakes in our coding at times, and it often takes another pair of eyes to see what we cannot.
Miscellany
Right - of course. Anyway, here's the code for each of the "teasers".

CODE
<div id="teaser">
<MTEntries category="news" lastn="1"><MTEntryCategories>
<a href="<$MTArchiveLink$>" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('<$MTCategoryLabel$>','','images/marker_<$MTCategoryLabel$>-over.png',1)"><img src="images/marker_<$MTCategoryLabel$>.png" alt="<$MTCategoryLabel$>" name="<$MTCategoryLabel$>" border="0"></a>
<h1><a href="<$MTEntryPermalink$>"><$MTEntryTitle$></h1></a>
<$MTEntryExcerpt$><MTEntryIfExtended>
<p class="extended"><a href="<$MTEntryPermalink>" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('nefull','','images/full_article-over.gif',1)"><img src="images/full_article.gif" alt="full article" name="nefull" border="0"></a></p>
</MTEntryIfExtended>
</MTEntryCategories>
</MTEntries>
</div>


sorrry about the kludgy dreamweaver rollover javascript. anyone got any ideas?
William Jackson
If you remove the MTEntryCategories and /MTEntryCategories, and replace each occurence of MTCategoryLabel with MTEntryCategory, then only the primary category will be listed, and the entry will only be listed once.
Miscellany
wm - worked like a charm. i cannot say how much aggravation this saves me. i appreciate this a lot.

ian
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.