Ticket: 234236 MTEntryAuthorURL returns null

ticketへのリンク

以下、ticketの複写

じっと眺めなおすと、結構私の英文が乱れてます。これって結構向こうからはバカに見えてしまうのでしょうね、ぐっすん


Support Ticket Details:


  • Subject: <$MTEntryAuthorURL$> returns null
  • Category: Bug
  • Status: Resolved/Closed

Ticket Transcript:


On Aug 21, 2006 10:19:38 PM, you (Koichi) said:

I have invited several guest authors. In order to identify which guest author by his/her TypePad or TypeKey ID in a template module, I added <$MTEntryAuthorURL$> in the module to expect an URL such as "http://profile.typekey.com/(guest author's ID)/" to be returned.

But <$MTEntryAuthorURL$> returns null to my customized "entry-individual" module.

Is there any way to get TypePad or TypeKey ID of entry's author?

On Aug 22, 2006 5:32:09 AM, TypePad Customer Support said:

Hi Koichi,

Thanks for the note.

The MTEntryAuthorURL tag will return the URL for the author, but only if the "Web Address (URL)" textbox under Control Panel > Profile is filled in.

You should have your guest authors fill in this textbox with their TypeKey URL for this information to be returned.

I hope this helps. Please let us know if you have any other questions.

Thanks,
Kymberlie

On Aug 22, 2006 6:53:19 AM, you (Koichi) said:

Hello Kymberlie,

Thank you for the reply.

I thought the MTEntryAuthorURL tag would return a url such as "http://profile.typekey.com/(guest author's ID)/" because the MTCommentURL tag retuns it. I understand that the value from the MTEntryAuthorURL can be different the one from the MTCommentURL tag.

I am looking for a way to get a TypePad or TypeKey ID in a customized "entry-individual" module.

I have tried to get it by the MTEntryAuthorUsername tag. But it also retuns null. Are there any settings I can do such that the MTEntryAuthorUsername tag retuns a TypePad or TypeKey ID ?

On Aug 22, 2006 12:11:13 PM, TypePad Customer Support said:

Hi,

There isn't a way to pull the TypeKey ID through tags. If you ask the Authors to place a link to the TypeKey Profile page in the "Web Address (URL)" field of the Author Profile, you can use the <$MTEntryAuthorURL$> tag.

More information is available here:
http://support.typepad.com/cgi-bin/typepad.cfg/php...

Please let us know if you have any other questions.

Thanks,
Jen


On Aug 22, 2006 4:19:35 PM, you (Koichi) said:


Thank you for the advice.

However I read that FAQ before raising a ticket. I also read this article:
http://www.sixapart.com/movabletype/docs/3.3/a_tem...

In this article, MTEntryAuthorUsername is "The username of the author".

What value can I expect from MTEntryAuthorUsername or what should MTEntryAuthorUsername be in the TypePad environment?

Koichi

On Aug 23, 2006 6:48:29 AM, TypePad Customer Support said:


Hi Koichi,

The username is the name used to login to the account. For example, the username for your account is "koichiwb".

More information on Author Tags in TypePad is available here:
http://support.typepad.com/cgi-bin/typepad.cfg/php...

Not all tags are used in both TypePad and Movable Type. Therefore, you will want to check the TypePad documentation for information about the tags.

Please let us know if you have any other questions.

Thanks,
Jen

On Aug 23, 2006 12:26:47 PM, you (Koichi) said:


Jen, thank you very much for your patient support.

Please allow me to ask two other questions regarding the problem that I had reported here.

1) What does it mean that username is null? This is what happened to me and I reported in my previous update n Aug 22, 2006 6:53:19 AM (maybe this is Japan Time) by writing "I have tried to get it by the MTEntryAuthorUsername tag. But it also reruns null."

2) As you suggested by your earlier response, I asked one of the guest authors of my site at TypePad to place a link to the TypeKey Profile page in the "Web Address (URL)" field of the Author Profile. But <$MTEntryAuthorURL$> tag returns nothing. Is there anything I can do or I have to ask him to solve this problem?

Please read the details bellow to help me.

  • TypeKey ID that I asked to set a link to his Profile page is businessman32.
  • His Profile Page URL is
http://profile.typekey.com/businessman32/

Attached is some pieces of my customized "entry-individual" module.
<div class="entry" id="entry-<$MTEntryID$>">
<MTWeblogPostIfShow field="post_title">
<h3 class="entry-header"><$MTEntryTitle$></h3>
<!-- MTEntryAuthorURL = "<$MTEntryAuthorURL$>" -->
<!-- MTEntryAuthor = "<$MTEntryAuthor$>" -->
<!-- MTEntryAuthorNickname = "<$MTEntryAuthorNickname$>" -->
<!-- MTEntryAuthorUsername = "<$MTEntryAuthorUsername$>" -->
</MTWeblogPostIfShow>

Here is what the TypePad system produced.
<div class="entry" id="entry-12321135">
<h3 class="entry-header">a test post</h3>
<!-- MTEntryAuthorURL = "" -->
<!-- MTEntryAuthor = "businessman32" -->
<!-- MTEntryAuthorNickname = "businessman32" -->
<!-- MTEntryAuthorUsername = "" -->

You can the whole HTML at
http://koichiwb.typepad.com/ogcv2r0/2006/08/a_test...

Please help me and my poor Mr.businessman32
Koichi

On Aug 24, 2006 2:03:03 AM, TypePad Customer Support said:


Hi Koichi,

When you receive a message that the username is null, it means that it does not exist or is incorrect. If you use the tags correctly, the system will know which user is posting the entry and will link to the correct URL. In my testing, I used this code in my post footer:

Posted by <a href="<$MTEntryAuthorURL$>"><$MTEntryAuthorNickname$></a>

To make sure this would work, I made sure my guest author profile had a URL in it. There's not a way to point to a specific URL but if your guest author has their TypeKey profile URL in Control Panel > Profile, this should work for you.

I hope that helps. Please let us know if you have any other questions.

Thanks,
Carla

On Aug 25, 2006 5:42:20 PM, you (Koichi) said:


Hello Carla,
I appreciate you did testing for my question. That helps me a lot. Your test shows that it works the way the TypePad documentation you told me in the previous updates describes about the tags. Unfortunately mine doesn't work that way.

So I think that there must be some distance between your testing and mine. In order to minimize the distance, I checked what I have done and I did the following changes and tried another testing myself.
1) I had renamed "entry-individual" module as "entry-individual-ogc". It could be something different from your testing, so I renamed it again to the original name as "entry-individual".
2) You tested the tags in the footer, but I tested the tags put between <MTWeblogPostIfShow field="post_title"> and </MTWeblogPostIfShow>. This could be another factor that makes difference, so I put the tags in the footer and copy &paste your "Posted by <a href="<$MTEntryAuthorURL$>"><$MTEntryAuthorNickname$></a>" like this:

<p class="entry-footer">
<!-- <$MTEntryPostFooter$> -->
Posted by <a href="<$MTEntryAuthorURL$>"><$MTEntryAuthorNickname$></a>
<!-- MTEntryAuthorURL = "<$MTEntryAuthorURL$>" -->
<!-- MTEntryAuthor = "<$MTEntryAuthor$>" -->
<!-- MTEntryAuthorNickname = "<$MTEntryAuthorNickname$>" -->
<!-- MTEntryAuthorUsername = "<$MTEntryAuthorUsername$>" -->
</p>

I tested again after the two changes above. But the TypePad still produces the result different from yours.

<p class="entry-footer">
<!-- <span class="post-footers">投稿者 businessman32 <a href="http://koichiwb.typepad.com/ogcv2r0/ogc20/index.ht...">テスト日誌< /a> </span> <span class="separator">|</span> <a class="permalink" href="http://koichiwb.typepad.com/ogcv2r0/2006/08/a_test..."> 個別ページ</a> -->
Posted by <a href="">businessman32</a>
<!-- MTEntryAuthorURL = "" -->
<!-- MTEntryAuthor = "businessman32" -->
<!-- MTEntryAuthorNickname = "businessman32" -->
<!-- MTEntryAuthorUsername = "" -->
</p>

(The full HTML source is available at http://koichiwb.typepad.com/ogcv2r0/2006/08/a_test...

The next thing that came to my mind is what if "businessman32" is an incorrect user as your last update suggested me. I don't think so. I sent him an invitation and I am sure he did accept it properly. But I think it could be something different from your test result.

So I posted an entry myself as "koichiwb" user. But the result was not so exciting.

<p class="entry-footer">
<!-- <span class="post-footers">投稿者 Koichi <a href="http://koichiwb.typepad.com/ogcv2r0/ogc20/index.ht...">テスト日誌< /a> </span> <span class="separator">|</span> <a class="permalink" href="http://koichiwb.typepad.com/ogcv2r0/2006/08/anothe..."> 個別ページ</a> -->
Posted by <a href="">Koichi</a>
<!-- MTEntryAuthorURL = "" -->

<!-- MTEntryAuthor = "Koichi" -->
<!-- MTEntryAuthorNickname = "Koichi" -->
<!-- MTEntryAuthorUsername = "" -->

</p>

(The full HTML source is available at http://koichiwb.typepad.com/ogcv2r0/2006/08/anothe...

Please allow me to ask another question:

What should I do next to minimize the distance between your testing and mine?

Koichi

On Aug 28, 2006 3:39:20 AM, TypePad Customer Support said:


Hi Koichi,

Thanks for the note. After making these changes, are you republishing your weblog so that it's using the most recent changes to your templates? To republish, go to Weblogs > Edit Design and click the Publish Blog button.

If you republish, does that help?

If not, could you copy your Main Index template and any template modules (their full code) into this ticket so we can try and reproduce the behaviour ourselves?

Thanks,
Kymberlie

On Aug 28, 2006 12:33:57 PM, you (Koichi) said:


Hello Kymberlie,
Thank you for your advice.

I did republish the site, but I have the same problem. So I copy my Main Index template and the related template modules:
1) Main Index template
2) head-index: <$MTInclude>ed by Main Index Template
3) head-common: <$MTInclude>ed by head-index
4) head-addon-ogc: <$MTInclude>ed by head-common
5) entry-list-sticky: <$MTInclude>ed by Main Index Template

Attached is their full code:

1) Main Index Template

<$MTInclude module="head-index"$>
<body class="layout-two-column-right">
<$MTWeblogIncludeModule module="body-header"$>
<div id="container">
<div id="container-inner" class="pkg">
<$MTWeblogIncludeModule module="container-header"$>
<$MTWeblogIncludeModule module="banner"$>
<div id="pagebody">
<div id="pagebody-inner" class="pkg">
<div id="alpha">
<div id="alpha-inner" class="pkg">
<$MTInclude module="entry-list-sticky"$>
</div>
</div>
<div id="beta">
<div id="beta-inner" class="pkg">
<!--#include virtual="/<$MTBlogDirname$>/sidebar.inc"-->
</div>
</div>
</div>
</div>
<$MTWeblogIncludeModule module="container-footer"$>
</div>
</div>
<$MTWeblogIncludeModule module="body-footer"$>
<$MTStatsScript$>
</body>
</html>

2) head-index

<$MTInclude module="head-common"$>
<title><$MTBlogName$></title>
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="<$MTCGIPath$><$MTRSDScript$>/<$MTBlogID$>" />

<MTUserIfShow field="foaf">
<link rel="meta" type="application/rdf+xml" title="FOAF" href="<$MTUserSiteURL$>foaf.rdf" />
</MTUserIfShow>
</head>

3) head-common

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitiona...">
<html xmlns="http://www.w3.org/1999/xhtml" id="sixapart-standard">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="http://www.typepad.com/" />
<MTBlogIfPrivate>
<meta name="robots" content="noindex,nofollow" />
</MTBlogIfPrivate>

<MTBlogIfCCLicense>
<$MTCCLicenseRDF$>
</MTBlogIfCCLicense>
<$MTWeblogIncludeModule module="head-extra"$>
<$MTInclude module="head-addon-ogc"$>
<link rel="stylesheet" href="<$MTBlogURL$>styles.css" type="text/css" />

<link rel="alternate" type="application/atom+xml" title="Atom" href="<$MTBlogURL$>atom.xml" />
<link rel="alternate" type="application/rss+xml" title="RSS" href="<$MTBlogURL$>index.rdf" />

4) head-addon-ogc

<!-- start of head-addon-ogc -->

<!--Infoseek Analyzer start-->
<script LANGUAGE="javascript">PgNo=22;</script>
<script src="http://js1.infoseek.co.jp/bin/05/00046.js"></script>
<noscript><a href="http://ax1.www.infoseek.co.jp/bin/go?0004605v" target="_blank">
<img src="http://ax1.www.infoseek.co.jp/bin/logo?0004605v" border=0></a></noscript>
<!--Infoseek Analyzer end-->

<!-- Google Maps API start-->
<script src="http://maps.google.co.jp/maps?file=api&v=2&..." type="text/javascript"></script>
<!-- Google Maps API end-->

<!-- OGC Functions start-->
<script src="http://koichiwb.typepad.com/ogcv2r0/javascript/ogc..." type="text/javascript"></script>
<script src="http://koichiwb.typepad.com/ogcv2r0/javascript/ogc..." type="text/javascript"></script>
<!-- OGC Functions end-->

<!-- end of head-addon-ogc -->

5) entry-list-sticky

<!-- entries -->
<MTBlogIfHasSticky>
<MTBlogStickyEntry>
<div class="entry-featured entry" id="entry-<$MTEntryID$>">
<MTWeblogPostIfShow field="post_title">
<h3 class="entry-header"><$MTEntryTitle$></h3>
</MTWeblogPostIfShow>
<div class="entry-content">
<div class="entry-body">
<$MTEntryBody$>
</div>
<MTEntryIfExtended>
<p class="entry-more-link">
<a href="<$MTEntryPermalink$>#more"><$MTTrans phrase="Continue reading"$> "<$MTEntryTitle$>" »</a>
</p>
</MTEntryIfExtended>
<$MTWeblogIncludeModule module="technorati-tags"$>
<MTFeedflareIfEnabled>
<script src="<$MTFeedflareUrl$><$MTEntryPermalink$>" type="text/javascript"></script>
</MTFeedflareIfEnabled>
</div>
<p class="entry-footer">
<img id="img-<$MTEntryID$>" width="32" height="32" src=""/>
<script type="text/javascript">
ogcShowIcon("img-<$MTEntryID$>","<$MTEntryAuthor$>");
</script>
<$MTEntryPostFooter$>
<!-- Posted by <a href="<$MTEntryAuthorURL$>"><$MTEntryAuthorNickname$></a> -->
<!-- MTEntryAuthorURL = "<$MTEntryAuthorURL$>" -->
<!-- MTEntryAuthor = "<$MTEntryAuthor$>" -->
<!-- MTEntryAuthorNickname = "<$MTEntryAuthorNickname$>" -->
<!-- MTEntryAuthorUsername = "<$MTEntryAuthorUsername$>" -->

<MTEntryIfAllowComments>
| <a href="<$MTEntryPermalink$>#comments"><$MTTrans phrase="Comments"$> (<$MTEntryCommentCount$>)</a>
</MTEntryIfAllowComments>
<MTEntryIfAllowPings>
| <a href="<$MTEntryPermalink$>#trackback"><$MTTrans phrase="TrackBack"$> (<$MTEntryTrackbackCount$>)</a>
</MTEntryIfAllowPings>
</p>
</div>
</MTBlogStickyEntry>
</MTBlogIfHasSticky>
<MTEntries>
<MTEntryIsSticky>
<MTElse>
<MTWeblogPostIfShow field="date_header">
<MTDateHeader><h2 class="date-header"><$MTEntryDate format_weblog_date="1"$></h2></MTDateHeader>
</MTWeblogPostIfShow>
<div class="entry" id="entry-<$MTEntryID$>">
<MTWeblogPostIfShow field="post_title">
<h3 class="entry-header"><$MTEntryTitle$></h3>
</MTWeblogPostIfShow>
<div class="entry-content">
<div class="entry-body">
<$MTEntryBody$>
</div>
<MTEntryIfExtended>
<p class="entry-more-link">
<a href="<$MTEntryPermalink$>#more"><$MTTrans phrase="Continue reading"$> "<$MTEntryTitle$>" »</a>
</p>
</MTEntryIfExtended>
<$MTWeblogIncludeModule module="technorati-tags"$>
<MTFeedflareIfEnabled>
<script src="<$MTFeedflareUrl$><$MTEntryPermalink$>" type="text/javascript"></script>
</MTFeedflareIfEnabled>
</div>
<p class="entry-footer">
<img id="img-<$MTEntryID$>" width="32" height="32" src=""/>
<script type="text/javascript">
ogcShowIcon("img-<$MTEntryID$>","<$MTEntryAuthor$>");
</script>
<$MTEntryPostFooter$>
<!-- Posted by <a href="<$MTEntryAuthorURL$>"><$MTEntryAuthorNickname$></a> -->
<!-- MTEntryAuthorURL = "<$MTEntryAuthorURL$>" -->
<!-- MTEntryAuthor = "<$MTEntryAuthor$>" -->
<!-- MTEntryAuthorNickname = "<$MTEntryAuthorNickname$>" -->
<!-- MTEntryAuthorUsername = "<$MTEntryAuthorUsername$>" -->

<MTEntryIfAllowComments>
| <a href="<$MTEntryPermalink$>#comments"><$MTTrans phrase="Comments"$> (<$MTEntryCommentCount$>)</a>
</MTEntryIfAllowComments>
<MTEntryIfAllowPings>
| <a href="<$MTEntryPermalink$>#trackback"><$MTTrans phrase="TrackBack"$> (<$MTEntryTrackbackCount$>)</a>
</MTEntryIfAllowPings>
</p>
</div>
</MTElse>
</MTEntryIsSticky>
</MTEntries>


Best regards,
Koichi

On Aug 29, 2006 3:05:51 AM, TypePad Customer Support said:


Hi Koichi,

Thanks for supplying this code; it was very helpful.

I think what's throwing this off is that you have the following in your code:

<p class="entry-footer">
<img id="img-<$MTEntryID$>" width="32" height="32" src=""/>
<script type="text/javascript">
ogcShowIcon("img-<$MTEntryID$>","<$MTEntryAuthor$>");
</script>
<$MTEntryPostFooter$>
<!-- Posted by <a href="<$MTEntryAuthorURL$>"><$MTEntryAuthorNickname$></a> -->
<!-- MTEntryAuthorURL = "<$MTEntryAuthorURL$>" -->
<!-- MTEntryAuthor = "<$MTEntryAuthor$>" -->
<!-- MTEntryAuthorNickname = "<$MTEntryAuthorNickname$>" -->
<!-- MTEntryAuthorUsername = "<$MTEntryAuthorUsername$>" -->

If you remove <$MTEntryPostFooter$> and uncooment the next line so that this is what you're using instead:

<p class="entry-footer">
<img id="img-<$MTEntryID$>" width="32" height="32" src=""/>
<script type="text/javascript">
ogcShowIcon("img-<$MTEntryID$>","<$MTEntryAuthor$>");
</script>
Posted by <a href="<$MTEntryAuthorURL$>"><$MTEntryAuthor$></a>
<!-- MTEntryAuthorURL = "<$MTEntryAuthorURL$>" -->
<!-- MTEntryAuthor = "<$MTEntryAuthor$>" -->
<!-- MTEntryAuthorNickname = "<$MTEntryAuthorNickname$>" -->
<!-- MTEntryAuthorUsername = "<$MTEntryAuthorUsername$>" -->

does that work better?

Please note that you would need to replace both instances of this in your module. Also, in order for this to work, each author would need to make sure that the Nickname textbox is filled in under Control Panel > Profile. If this information is not filled in, then there isn't anything that can be returned.

Thanks,
Kymberlie

On Aug 29, 2006 11:40:13 AM, you (Koichi) said:


Kymberlie,
Thanks for the investigation. I will ask all my guest authors to make sure that they set up their profiles properly.

After that I will try to change my modules as you suggested.

When I encounter a problem, I will open a new ticket.

I think I have had enough information about what I should do by this ticket. So please close this ticket.

Thank you very much for your and your team's support. I am very satisified with it.

Koichi
2006年08月29日(火) 11:42:15 Modified by koichiwb




スマートフォン版で見る