Help - Search - Members - Calendar
Full Version: Help - Mt:entryauthorusername
Movable Type Community Forum > Other Product Discussion > Bugs and Odd Behavior
blg002
Im very new to MT (first time I've dealt with the interface), and have been tasked at work to move a blog to a new server. This included a switch from cf to php - and an upgrade of MT. Some of the tags were deprecated and I have been able to easily find the alternative in the MT Appendices but this one has me confused.

Error:
Publish error in template 'Archives: Author': Error in <mt:Authors> tag: Error in <mt:Entries> tag: No such user '<mt:EntryAuthorUsername />'

Offending Code:

<MTAuthors permissions="post">
<a name="<mt:AuthorName /></a>
<h1 class="author-divider"><MTAuthorNickname></h1>
<mt:Entries author="<mt:EntryAuthorUsername />">
<$MTEntryTrackbackData$>

<MTDateHeader><h2 class="date-header"><$MTEntryDate format="%x"$></h2></MTDateHeader>
<a id="a<$MTEntryID pad="1"$>"></a>
<div class="entry" id="entry-<$MTEntryID$>">
<h1 class="title"><a href="<$MTEntryPermalink$>"><$MTEntryTitle smarty_pants="1"$></a></h1>

<div class="entry-content">
<div class="entry-body">
<MTFirstNWords n="10" append="...">
<$MTEntryBody smarty_pants="1"$>
</MTFirstNWords>
<MTEntryIfExtended>
<p class="entry-more-link">
<a href="<$MTEntryPermalink$>#more">Continue reading "<$MTEntryTitle$>" »</a>
</p>
</MTEntryIfExtended>
<p class="entry-footer"></p>

</div>
</div>
</div>
</mt:Entries>

</MTAuthors>

Thanks for any help
blg002
.
david
Please do not post the same topic multiple times, or in different forums.

Duplicate topics merged.
Su-
The tag isn't the problem, and it does still exist. You're not being told there's no such tag, but that there's no such author as that tag, which is presumably correct.
The problem is this:
CODE
<mt:Entries author="<mt:EntryAuthorUsername />">


If you want to use a template tag as an argument to another tag, you need to store it in a variable first and then use that. See the docs on variable interpolation for an example.
blg002
If anyone is interested in the future changing the code to this seemed to work

CODE
<MTEntries author=$MTEntryAuthorUsername$>
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.