最新消息:20190717 VPS服务器:Vultr新加坡,WordPress主题:大前端D8,统一介绍入口:关于

【记录】试图通过WLW错误日志:Failed to download template Framed: System.Exception: Unable to locate blog post elements using most recent post,来找到为何WLW无法更新主题的原因

WLW crifan 1139浏览 0评论

关于wlw无法更新wordpress的主题的问题,

之前已经折腾过了:

【未解决】wlw工作不正常(编辑帖子时无主题,即无预览,发帖延迟),想要通过彻底删除原先账户,恢复正常

【记录】试图尝试一步步改动retina和禁用插件,看看能否解决WLW中WordPress主题预览失效的问题 -> 未成功

但是都没搞定,

现在接着尝试,通过去WLW错误日志的信息中,能否一步步找到错误根源并解决.


1.先找到当前的WLW中的而错误日志:

关于Windows Live Writer

显示日志文件

Windows Live Writer.log 文件

Windows Live Writer.log 文件

2. 重新去执行了一次更新账户,更新主题,整个过程的log如下:

WindowsLiveWriter,1.7900,None,00582,04-Oct-2012 16:58:20.970,"499 499",""
WindowsLiveWriter,1.7900,None,00583,04-Oct-2012 16:58:21.181,"Creating a readable ribbon istream for C:\Users\Administrator\AppData\Roaming\Windows Live Writer\Ribbon.dat",""
WindowsLiveWriter,1.7900,None,00584,04-Oct-2012 16:58:24.950,"Creating a writable ribbon istream for C:\Users\Administrator\AppData\Roaming\Windows Live Writer\Ribbon.dat",""
WindowsLiveWriter,1.7900,None,00585,04-Oct-2012 16:58:27.277,"Creating a writable ribbon istream for C:\Users\Administrator\AppData\Roaming\Windows Live Writer\Ribbon.dat",""
WindowsLiveWriter,1.7900,None,00586,04-Oct-2012 16:58:54.452,"XML-RPC request:
https://www.crifan.com/xmlrpc.php
<?xml version=""1.0"" encoding=""utf-8""?>
<methodCall>
 <methodName>wp.getTags</methodName>
 <params>
  <param>
   <value>
    <string>1</string>
   </value>
  </param>
  <param>
   <value>
    <string>crifan</string>
   </value>
  </param>
  <param>
   <value>[removed]</value>
  </param>
 </params>
</methodCall>",""
WindowsLiveWriter,1.7900,None,00587,04-Oct-2012 16:58:54.452,"== BEGIN WebException =====================",""
WindowsLiveWriter,1.7900,None,00588,04-Oct-2012 16:58:54.452,"Status: ProtocolError",""
WindowsLiveWriter,1.7900,None,00589,04-Oct-2012 16:58:54.452,"System.Net.WebException: 远程服务器返回错误: (500) 内部服务器错误。
   在 System.Net.HttpWebRequest.GetResponse()
   在 WindowsLive.Writer.CoreServices.HttpRequestHelper.SendRequest(String requestUri, HttpRequestFilter filter)
   在 WindowsLive.Writer.CoreServices.XmlRpcClient.CallMethod(String methodName, XmlRpcValue[] parameters)
   在 WindowsLive.Writer.BlogClient.Clients.XmlRpcBlogClient.CallMethod(String methodName, XmlRpcValue[] parameters)",""
WindowsLiveWriter,1.7900,None,00590,04-Oct-2012 16:58:54.452,"HTTP/1.1 500 Internal Server Error
Vary: Accept-Encoding
Connection: close
Content-Length: 0
Content-Type: text/html
Date: Thu, 04 Oct 2012 08:58:48 GMT
Server: Apache


",""
WindowsLiveWriter,1.7900,None,00591,04-Oct-2012 16:58:54.452,"== END WebException =======================",""
WindowsLiveWriter,1.7900,Fail,00592,04-Oct-2012 16:58:54.454,"Exception occurred attempting to download keywords for weblog https://www.crifan.com/: WindowsLive.Writer.Extensibility.BlogClient.BlogClientHttpErrorException: 服务器错误 - 服务器报告以下网址出错:

https://www.crifan.com/xmlrpc.php

500 Internal Server Error
   在 WindowsLive.Writer.BlogClient.Clients.XmlRpcBlogClient.CallMethod(String methodName, XmlRpcValue[] parameters)
   在 WindowsLive.Writer.BlogClient.Clients.MetaweblogClient.WordPressGetKeywords(String blogId)
   在 WindowsLive.Writer.BlogClient.Clients.MetaweblogClient.GetKeywords(String blogId)
   在 WindowsLive.Writer.BlogClient.Detection.BlogSettingsDetector.SafeDownloadKeywords()","   在 System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
   在 System.Environment.get_StackTrace()
   在 WindowsLive.Writer.CoreServices.Diagnostics.LogFileTraceListener.Fail(String message)
   在 System.Diagnostics.TraceInternal.Fail(String message)
   在 System.Diagnostics.Trace.Fail(String message)
   在 WindowsLive.Writer.BlogClient.Detection.BlogSettingsDetector.ReportException(String context, Exception ex)
   在 WindowsLive.Writer.BlogClient.Detection.BlogSettingsDetector.SafeDownloadKeywords()
   在 WindowsLive.Writer.BlogClient.Detection.BlogSettingsDetector.DetectSettings(IProgressHost progressHost)
   在 WindowsLive.Writer.BlogClient.Detection.BlogServiceDetectorBase.DetectWeblogSettings(IProgressHost progressHost)
   在 WindowsLive.Writer.CoreServices.Progress.ProgressWorker.DoWork()
   在 WindowsLive.Writer.CoreServices.Progress.MultipartAsyncOperation.DoWork()
   在 WindowsLive.Writer.CoreServices.AsyncOperation.InternalStart()
   在 System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   在 System.Threading.ThreadHelper.ThreadStart()"
WindowsLiveWriter,1.7900,None,00593,04-Oct-2012 16:59:04.930,"Failed to download template Framed: System.Exception: Unable to locate blog post elements using most recent post
   在 System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   在 System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.ParseWebpageIntoEditingTemplate_OnUIThread(Control uiContext, BlogPostRegionLocatorStrategy regionLocator, IProgressHost progress)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.GetBlogTemplateFiles(IProgressHost progress, BlogPostRegionLocatorStrategy regionLocatorStrategy, BlogEditingTemplateStrategy[] templateStrategies, BlogEditingTemplateType[] templateTypes)",""
WindowsLiveWriter,1.7900,None,00594,04-Oct-2012 16:59:06.057,"Failed to download template Webpage: System.Exception: Unable to locate blog post elements using most recent post
   在 System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   在 System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.ParseWebpageIntoEditingTemplate_OnUIThread(Control uiContext, BlogPostRegionLocatorStrategy regionLocator, IProgressHost progress)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.GetBlogTemplateFiles(IProgressHost progress, BlogPostRegionLocatorStrategy regionLocatorStrategy, BlogEditingTemplateStrategy[] templateStrategies, BlogEditingTemplateType[] templateTypes)",""
WindowsLiveWriter,1.7900,None,00595,04-Oct-2012 16:59:20.789,"Failed to download template Framed: System.ArgumentException: 值不在预期的范围内。
   在 System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   在 System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.ParseWebpageIntoEditingTemplate_OnUIThread(Control uiContext, BlogPostRegionLocatorStrategy regionLocator, IProgressHost progress)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.GetBlogTemplateFiles(IProgressHost progress, BlogPostRegionLocatorStrategy regionLocatorStrategy, BlogEditingTemplateStrategy[] templateStrategies, BlogEditingTemplateType[] templateTypes)",""
WindowsLiveWriter,1.7900,None,00596,04-Oct-2012 16:59:21.313,"Failed to download template Webpage: System.ArgumentException: 值不在预期的范围内。
   在 System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   在 System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.ParseWebpageIntoEditingTemplate_OnUIThread(Control uiContext, BlogPostRegionLocatorStrategy regionLocator, IProgressHost progress)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.GetBlogTemplateFiles(IProgressHost progress, BlogPostRegionLocatorStrategy regionLocatorStrategy, BlogEditingTemplateStrategy[] templateStrategies, BlogEditingTemplateType[] templateTypes)",""
WindowsLiveWriter,1.7900,None,00597,04-Oct-2012 16:59:25.338,"UpdateSemanticHtmlPreviewAsyncOperation started for blog(80db6764-f075-450e-bc07-c51bfa45a635)",""
WindowsLiveWriter,1.7900,None,00598,04-Oct-2012 16:59:25.526,"UpdateSemanticHtmlPreviewAsyncOperation started for blog(80db6764-f075-450e-bc07-c51bfa45a635)",""

然后就是去分析.

但是看到其中有https://www.crifan.com/xmlrpc.php,所以打算,还是先去试试,把之前

retina\header.php中的那句:

<link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://www.crifan.com/xmlrpc.php?rsd" />

去掉之后,看看再次更新的log如何.

不过好像log是类似的:

WindowsLiveWriter,1.7900,None,00614,04-Oct-2012 17:05:57.716,"Creating a readable ribbon istream for C:\Users\Administrator\AppData\Roaming\Windows Live Writer\Ribbon.dat",""
WindowsLiveWriter,1.7900,None,00615,04-Oct-2012 17:06:00.381,"Creating a writable ribbon istream for C:\Users\Administrator\AppData\Roaming\Windows Live Writer\Ribbon.dat",""
WindowsLiveWriter,1.7900,None,00616,04-Oct-2012 17:06:01.554,"Creating a writable ribbon istream for C:\Users\Administrator\AppData\Roaming\Windows Live Writer\Ribbon.dat",""
WindowsLiveWriter,1.7900,None,00617,04-Oct-2012 17:06:24.963,"XML-RPC request:
https://www.crifan.com/xmlrpc.php
<?xml version=""1.0"" encoding=""utf-8""?>
<methodCall>
 <methodName>wp.getTags</methodName>
 <params>
  <param>
   <value>
    <string>1</string>
   </value>
  </param>
  <param>
   <value>
    <string>crifan</string>
   </value>
  </param>
  <param>
   <value>[removed]</value>
  </param>
 </params>
</methodCall>",""
WindowsLiveWriter,1.7900,None,00618,04-Oct-2012 17:06:24.963,"== BEGIN WebException =====================",""
WindowsLiveWriter,1.7900,None,00619,04-Oct-2012 17:06:24.963,"Status: ProtocolError",""
WindowsLiveWriter,1.7900,None,00620,04-Oct-2012 17:06:24.963,"System.Net.WebException: 远程服务器返回错误: (500) 内部服务器错误。
   在 System.Net.HttpWebRequest.GetResponse()
   在 WindowsLive.Writer.CoreServices.HttpRequestHelper.SendRequest(String requestUri, HttpRequestFilter filter)
   在 WindowsLive.Writer.CoreServices.XmlRpcClient.CallMethod(String methodName, XmlRpcValue[] parameters)
   在 WindowsLive.Writer.BlogClient.Clients.XmlRpcBlogClient.CallMethod(String methodName, XmlRpcValue[] parameters)",""
WindowsLiveWriter,1.7900,None,00621,04-Oct-2012 17:06:24.963,"HTTP/1.1 500 Internal Server Error
Vary: Accept-Encoding
Connection: close
Content-Length: 0
Content-Type: text/html
Date: Thu, 04 Oct 2012 09:06:17 GMT
Server: Apache


",""
WindowsLiveWriter,1.7900,None,00622,04-Oct-2012 17:06:24.963,"== END WebException =======================",""
WindowsLiveWriter,1.7900,Fail,00623,04-Oct-2012 17:06:24.965,"Exception occurred attempting to download keywords for weblog https://www.crifan.com/: WindowsLive.Writer.Extensibility.BlogClient.BlogClientHttpErrorException: 服务器错误 - 服务器报告以下网址出错:

https://www.crifan.com/xmlrpc.php

500 Internal Server Error
   在 WindowsLive.Writer.BlogClient.Clients.XmlRpcBlogClient.CallMethod(String methodName, XmlRpcValue[] parameters)
   在 WindowsLive.Writer.BlogClient.Clients.MetaweblogClient.WordPressGetKeywords(String blogId)
   在 WindowsLive.Writer.BlogClient.Clients.MetaweblogClient.GetKeywords(String blogId)
   在 WindowsLive.Writer.BlogClient.Detection.BlogSettingsDetector.SafeDownloadKeywords()","   在 System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
   在 System.Environment.get_StackTrace()
   在 WindowsLive.Writer.CoreServices.Diagnostics.LogFileTraceListener.Fail(String message)
   在 System.Diagnostics.TraceInternal.Fail(String message)
   在 System.Diagnostics.Trace.Fail(String message)
   在 WindowsLive.Writer.BlogClient.Detection.BlogSettingsDetector.ReportException(String context, Exception ex)
   在 WindowsLive.Writer.BlogClient.Detection.BlogSettingsDetector.SafeDownloadKeywords()
   在 WindowsLive.Writer.BlogClient.Detection.BlogSettingsDetector.DetectSettings(IProgressHost progressHost)
   在 WindowsLive.Writer.BlogClient.Detection.BlogServiceDetectorBase.DetectWeblogSettings(IProgressHost progressHost)
   在 WindowsLive.Writer.CoreServices.Progress.ProgressWorker.DoWork()
   在 WindowsLive.Writer.CoreServices.Progress.MultipartAsyncOperation.DoWork()
   在 WindowsLive.Writer.CoreServices.AsyncOperation.InternalStart()
   在 System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   在 System.Threading.ThreadHelper.ThreadStart()"
WindowsLiveWriter,1.7900,None,00624,04-Oct-2012 17:06:30.785,"Failed to download template Framed: System.Exception: Unable to locate blog post elements using most recent post
   在 System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   在 System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.ParseWebpageIntoEditingTemplate_OnUIThread(Control uiContext, BlogPostRegionLocatorStrategy regionLocator, IProgressHost progress)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.GetBlogTemplateFiles(IProgressHost progress, BlogPostRegionLocatorStrategy regionLocatorStrategy, BlogEditingTemplateStrategy[] templateStrategies, BlogEditingTemplateType[] templateTypes)",""
WindowsLiveWriter,1.7900,None,00625,04-Oct-2012 17:06:31.915,"Failed to download template Webpage: System.Exception: Unable to locate blog post elements using most recent post
   在 System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   在 System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.ParseWebpageIntoEditingTemplate_OnUIThread(Control uiContext, BlogPostRegionLocatorStrategy regionLocator, IProgressHost progress)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.GetBlogTemplateFiles(IProgressHost progress, BlogPostRegionLocatorStrategy regionLocatorStrategy, BlogEditingTemplateStrategy[] templateStrategies, BlogEditingTemplateType[] templateTypes)",""
WindowsLiveWriter,1.7900,None,00626,04-Oct-2012 17:07:46.532,"Failed to download template Framed: System.ArgumentException: 值不在预期的范围内。
   在 System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   在 System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.ParseWebpageIntoEditingTemplate_OnUIThread(Control uiContext, BlogPostRegionLocatorStrategy regionLocator, IProgressHost progress)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.GetBlogTemplateFiles(IProgressHost progress, BlogPostRegionLocatorStrategy regionLocatorStrategy, BlogEditingTemplateStrategy[] templateStrategies, BlogEditingTemplateType[] templateTypes)",""
WindowsLiveWriter,1.7900,None,00627,04-Oct-2012 17:07:51.322,"Failed to download template Webpage: System.ArgumentException: 值不在预期的范围内。
   在 System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   在 System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.ParseWebpageIntoEditingTemplate_OnUIThread(Control uiContext, BlogPostRegionLocatorStrategy regionLocator, IProgressHost progress)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.GetBlogTemplateFiles(IProgressHost progress, BlogPostRegionLocatorStrategy regionLocatorStrategy, BlogEditingTemplateStrategy[] templateStrategies, BlogEditingTemplateType[] templateTypes)",""
WindowsLiveWriter,1.7900,None,00628,04-Oct-2012 17:08:00.056,"UpdateSemanticHtmlPreviewAsyncOperation started for blog(80db6764-f075-450e-bc07-c51bfa45a635)",""
WindowsLiveWriter,1.7900,None,00629,04-Oct-2012 17:08:00.190,"Creating a readable ribbon istream for C:\Users\Administrator\AppData\Roaming\Windows Live Writer\Ribbon.dat",""
WindowsLiveWriter,1.7900,None,00630,04-Oct-2012 17:08:00.231,"UpdateSemanticHtmlPreviewAsyncOperation started for blog(80db6764-f075-450e-bc07-c51bfa45a635)",""
WindowsLiveWriter,1.7900,None,00631,04-Oct-2012 17:08:02.094,"Creating a writable ribbon istream for C:\Users\Administrator\AppData\Roaming\Windows Live Writer\Ribbon.dat",""

然后就是分析此log了.

 

3.之前看到:

Live Writer is unable to update my blog template

现在参考其说的,好像涉及到permalink,所以去试试,把本地wordpress中的permalink,设置为在线的wordpress一样,都设置为“文章名”:

固定链接 文章名

然后wlw中再去更新本地wordpress的主题,看看是否正常。

结果还是正常的。

4.后来以为上述是不支持wp.getTags呢,结果去找了半天,看到网上N年前就已经加了此patch了:

XML-RPC needs a method to expose a list of all the post tags

->

Ticket #7744: xmlrpc.php.diff

对于源码中的:

‘wp.getTags’ => ‘this:wp_getTags’,

专门去找了下,当前的wordpress,在:

wp-includes\class-wp-xmlrpc-server.php

中,已经是有了相关的代码的。

 

并且可以看到,其对应的上述:

<?xml version=""1.0"" encoding=""utf-8""?>
<methodCall>
 <methodName>wp.getTags</methodName>
 <params>
  <param>
   <value>
    <string>1</string>
   </value>
  </param>
  <param>
   <value>
    <string>crifan</string>
   </value>
  </param>
  <param>
   <value>[removed]</value>
  </param>
 </params>
</methodCall>

中的三个参数,根据代码:

	function wp_getTags( $args ) {
		$this->escape( $args );

		$blog_id		= (int) $args[0];
		$username		= $args[1];
		$password		= $args[2];

分别表示是blog_id,和用户名和密码。

 

5.后来去手动更新了在线wordpress的主题:

更新主题

相应的log如下:

WindowsLiveWriter,1.7900,None,00679,04-Oct-2012 17:36:03.865,"Failed to download template Framed: System.Exception: Unable to locate blog post elements using most recent post
   在 System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   在 System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.ParseWebpageIntoEditingTemplate_OnUIThread(Control uiContext, BlogPostRegionLocatorStrategy regionLocator, IProgressHost progress)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.GetBlogTemplateFiles(IProgressHost progress, BlogPostRegionLocatorStrategy regionLocatorStrategy, BlogEditingTemplateStrategy[] templateStrategies, BlogEditingTemplateType[] templateTypes)",""
WindowsLiveWriter,1.7900,None,00680,04-Oct-2012 17:36:08.946,"Failed to download template Webpage: System.Exception: Unable to locate blog post elements using most recent post
   在 System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   在 System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.ParseWebpageIntoEditingTemplate_OnUIThread(Control uiContext, BlogPostRegionLocatorStrategy regionLocator, IProgressHost progress)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.GetBlogTemplateFiles(IProgressHost progress, BlogPostRegionLocatorStrategy regionLocatorStrategy, BlogEditingTemplateStrategy[] templateStrategies, BlogEditingTemplateType[] templateTypes)",""
WindowsLiveWriter,1.7900,None,00681,04-Oct-2012 17:36:25.154,"Failed to download template Framed: System.ArgumentException: 值不在预期的范围内。
   在 System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   在 System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.ParseWebpageIntoEditingTemplate_OnUIThread(Control uiContext, BlogPostRegionLocatorStrategy regionLocator, IProgressHost progress)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.GetBlogTemplateFiles(IProgressHost progress, BlogPostRegionLocatorStrategy regionLocatorStrategy, BlogEditingTemplateStrategy[] templateStrategies, BlogEditingTemplateType[] templateTypes)",""
WindowsLiveWriter,1.7900,None,00682,04-Oct-2012 17:36:25.381,"Failed to download template Webpage: System.ArgumentException: 值不在预期的范围内。
   在 System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   在 System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.ParseWebpageIntoEditingTemplate_OnUIThread(Control uiContext, BlogPostRegionLocatorStrategy regionLocator, IProgressHost progress)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.GetBlogTemplateFiles(IProgressHost progress, BlogPostRegionLocatorStrategy regionLocatorStrategy, BlogEditingTemplateStrategy[] templateStrategies, BlogEditingTemplateType[] templateTypes)",""
WindowsLiveWriter,1.7900,None,00683,04-Oct-2012 17:36:30.049,"UpdateSemanticHtmlPreviewAsyncOperation started for blog(80db6764-f075-450e-bc07-c51bfa45a635)",""
WindowsLiveWriter,1.7900,None,00684,04-Oct-2012 17:36:30.259,"Creating a readable ribbon istream for C:\Users\Administrator\AppData\Roaming\Windows Live Writer\Ribbon.dat",""
WindowsLiveWriter,1.7900,None,00685,04-Oct-2012 17:36:30.339,"UpdateSemanticHtmlPreviewAsyncOperation started for blog(80db6764-f075-450e-bc07-c51bfa45a635)",""
WindowsLiveWriter,1.7900,None,00686,04-Oct-2012 17:36:33.313,"Creating a writable ribbon istream for C:\Users\Administrator\AppData\Roaming\Windows Live Writer\Ribbon.dat",""

看起来,还是关键的是

Failed to download template Framed: System.Exception: Unable to locate blog post elements using most recent post

的错误啊。

 

6.其中,关于上述的

Failed to download template Framed: System.Exception: Unable to locate blog post elements using most recent post

的错误,之前就找到了很多帖子,但是后来发现,其实那些中文的帖子,都是翻译这个的:

Windows Live Writer Not Detecting WordPress Blog Template

但是只说了现象,没有给出解决办法,所以对于此处问题,没有参考价值。

7.后来是,继续看了上面的

wp-includes\class-wp-xmlrpc-server.php

中的wp_getTags函数。

发现一个奇怪的现象。

其中会判断用户名和密码,是否正常,正常的话,接着就是去调用:

do_action( ‘xmlrpc_call’, ‘wp.getKeywords’ );

即调用wp.getKeywords,但是很奇怪的,至少当前文件class-wp-xmlrpc-server.php中,是没有这个函数的。

所以,对应的看到之前的wlw中的log,显示的是

WindowsLiveWriter,1.7900,Fail,00623,04-Oct-2012 17:06:24.965,"Exception occurred attempting to download keywords for weblog https://www.crifan.com/: WindowsLive.Writer.Extensibility.BlogClient.BlogClientHttpErrorException: 服务器错误 – 服务器报告以下网址出错:

即,下载关键字出错,所以看起来也是理所当然的。

但是问题在于:

  • wordpress发展到现在了,不太可能缺少这么明显的一个函数wp.getKeywords
  • 此处更新在线的wordpress是出现此错误了,但是更新本地wordpress时,并没有出现这个错误的。

先不管这个问题。

8.突然发现另外一个时期。

本地wordpress的默认分类是“未分类”:

本地时 未分类

而在线的wordpress是“默认分类”:

在线的是 默认分类

不知道是不是这个原因引起的。

因为依稀记得,好像有人说过,可能是由于分类所导致wlw发测试帖子,测试主题效果,如果分类错误,可能会导致出错的。

所以就去找找。

然后看到了本地的“未分类”:

未分类 uncategorized tag_ID=1

而在线的分类中”默认分类“却看到的是:

tag_ID=17 default_category

即tag_ID是17,而不是1,

而对应的tag_ID=1的是:

uncategorized tag_ID=1

所以,尝试设置在线的wordpress的分类为tag_ID=1的Uncategorized:

设置在线的默认分类为 Uncategorized

结果wlw还是正常在线wordpress的更新主题。

9.另外再次试了试,对于本地wordpress的主题,更新正常的话,log是:

WindowsLiveWriter,1.7900,None,00762,04-Oct-2012 18:04:08.078,"Creating a readable ribbon istream for C:\Users\Administrator\AppData\Roaming\Windows Live Writer\Ribbon.dat",""
WindowsLiveWriter,1.7900,None,00763,04-Oct-2012 18:04:09.190,"Creating a writable ribbon istream for C:\Users\Administrator\AppData\Roaming\Windows Live Writer\Ribbon.dat",""
WindowsLiveWriter,1.7900,None,00764,04-Oct-2012 18:04:11.520,"Creating a writable ribbon istream for C:\Users\Administrator\AppData\Roaming\Windows Live Writer\Ribbon.dat",""
WindowsLiveWriter,1.7900,None,00765,04-Oct-2012 18:04:12.797,"Creating a writable ribbon istream for C:\Users\Administrator\AppData\Roaming\Windows Live Writer\Ribbon.dat",""
WindowsLiveWriter,1.7900,None,00766,04-Oct-2012 18:04:31.413,"UpdateSemanticHtmlPreviewAsyncOperation started for blog(e5a6f1e2-5bb5-4906-a71a-ca125b7dbc06)",""
WindowsLiveWriter,1.7900,None,00767,04-Oct-2012 18:04:33.048,"Creating a writable ribbon istream for C:\Users\Administrator\AppData\Roaming\Windows Live Writer\Ribbon.dat",""

10.去启动了在线wordpress的

启用 Atom 发布协议。

启用Atom发布协议

结果wlw还是无法支持在线wordpress的主题。

11.后来搜"wlw wp.getKeywords"而找到:

Fix Windows Live Writer Error – The response to the wp.getTags method received from the blog server was invalid.

看到其解释说,对于wp.getTags,wordpress响应出错的话,则是因为,由于需要在线

Cause of Error:

When importing (of tags in our case) blog hosting server is required than usual, and memory limit (RAM) allocated execution scripts PHP This depasita. For this reason, the server rejects the connection or stop the importation. "Invalid response document returned from XmlRpc Server".

Solving Error:

As with error "metaWeblog.newPost", solution is all .htaccess. You will need to add a line to increase memory limit allocated account web hosting that is blog. To do this, adaugam in .htaccess line:

php_value memory_limit 256M

Value 256M a "memory_limit" sets Maximum size expressed Baiti that a script PHP can use. Limita "memory_limit" The default is set to 128M de fisierul php.this (config-ul PHP_INI_ALL server for PHP) on most servers reuleaza PHP 5.3.10. In the past, inainte of PHP 5.2.0 value was 8M, And with the release PHP 5.2.0, this value was set at 16M.

Before importing Tags in WLW You can increase this limit over 128M, but you must take into account the Web Server total memory. Directiva \"memory_limit" practically prevent erroneous writing a PHP script to consume all available memory on a server. It is recommended that after import to delete this line of .htaccess to return to the default value set by php.ini.

If you do not have access to settings change the value of "memory_limit", In this situation you will need to contact your provider to your blog hosteaza. For security and performance, furnizaorilor most of web hosting restrict access to accounts settings "sensitive" server.

所以,就参考其建议,去试试增大php的memory_limit。

找到在线wordpress网站根目录下的php.ini,然后将:

;memory_limit = 64M      ; Maximum amount of memory a script may consume (16MB)

改为:

memory_limit = 128M

结果,竟然还是不行,wlw还是无法正在下载主题,对应错误log为:

WindowsLiveWriter,1.7900,None,00820,04-Oct-2012 18:26:12.282,"Failed to download template Framed: System.Exception: Unable to locate blog post elements using most recent post
   在 System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   在 System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.ParseWebpageIntoEditingTemplate_OnUIThread(Control uiContext, BlogPostRegionLocatorStrategy regionLocator, IProgressHost progress)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.GetBlogTemplateFiles(IProgressHost progress, BlogPostRegionLocatorStrategy regionLocatorStrategy, BlogEditingTemplateStrategy[] templateStrategies, BlogEditingTemplateType[] templateTypes)",""
WindowsLiveWriter,1.7900,None,00821,04-Oct-2012 18:26:13.885,"Failed to download template Webpage: System.Exception: Unable to locate blog post elements using most recent post
   在 System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   在 System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.ParseWebpageIntoEditingTemplate_OnUIThread(Control uiContext, BlogPostRegionLocatorStrategy regionLocator, IProgressHost progress)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.GetBlogTemplateFiles(IProgressHost progress, BlogPostRegionLocatorStrategy regionLocatorStrategy, BlogEditingTemplateStrategy[] templateStrategies, BlogEditingTemplateType[] templateTypes)",""
WindowsLiveWriter,1.7900,None,00822,04-Oct-2012 18:26:31.083,"Failed to download template Framed: System.ArgumentException: 值不在预期的范围内。
   在 System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   在 System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.ParseWebpageIntoEditingTemplate_OnUIThread(Control uiContext, BlogPostRegionLocatorStrategy regionLocator, IProgressHost progress)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.GetBlogTemplateFiles(IProgressHost progress, BlogPostRegionLocatorStrategy regionLocatorStrategy, BlogEditingTemplateStrategy[] templateStrategies, BlogEditingTemplateType[] templateTypes)",""
WindowsLiveWriter,1.7900,None,00823,04-Oct-2012 18:26:33.084,"Failed to download template Webpage: System.ArgumentException: 值不在预期的范围内。
   在 System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   在 System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.ParseWebpageIntoEditingTemplate_OnUIThread(Control uiContext, BlogPostRegionLocatorStrategy regionLocator, IProgressHost progress)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.GetBlogTemplateFiles(IProgressHost progress, BlogPostRegionLocatorStrategy regionLocatorStrategy, BlogEditingTemplateStrategy[] templateStrategies, BlogEditingTemplateType[] templateTypes)",""
WindowsLiveWriter,1.7900,None,00824,04-Oct-2012 18:26:37.367,"UpdateSemanticHtmlPreviewAsyncOperation started for blog(80db6764-f075-450e-bc07-c51bfa45a635)",""
WindowsLiveWriter,1.7900,None,00825,04-Oct-2012 18:26:38.303,"Creating a readable ribbon istream for C:\Users\Administrator\AppData\Roaming\Windows Live Writer\Ribbon.dat",""
WindowsLiveWriter,1.7900,None,00826,04-Oct-2012 18:26:38.375,"UpdateSemanticHtmlPreviewAsyncOperation started for blog(80db6764-f075-450e-bc07-c51bfa45a635)",""
WindowsLiveWriter,1.7900,None,00827,04-Oct-2012 18:26:39.602,"Creating a writable ribbon istream for C:\Users\Administrator\AppData\Roaming\Windows Live Writer\Ribbon.dat",""

12.后来参考

How To: Fix invalid blogger.getUsersBlogs method response

去.htaccess中添加:

<Files xmlrpc.php>

SecFilterInheritance Off

</Files>

然后试试更新账户,结果更加错误了,直接显示:

选择日志类型

所以,这个方法也没用。

13。手动去在线wordpress中的wp_getTags中的wp.getKeywords调用去掉:

//do_action( ‘xmlrpc_call’, ‘wp.getKeywords’ );

看看什么效果。

结果好像还是不行啊。

14.后经测试,当看到这个界面:

能看到 下载日志主题 的窗口 说明已经出现了错误了

则此时已经发生错误了,log为:

WindowsLiveWriter,1.7864,None,00019,04-Oct-2012 19:59:06.783,"Failed to download template Framed: System.Exception: Unable to locate blog post elements using most recent post
   在 System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   在 System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.ParseWebpageIntoEditingTemplate_OnUIThread(Control uiContext, BlogPostRegionLocatorStrategy regionLocator, IProgressHost progress)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.GetBlogTemplateFiles(IProgressHost progress, BlogPostRegionLocatorStrategy regionLocatorStrategy, BlogEditingTemplateStrategy[] templateStrategies, BlogEditingTemplateType[] templateTypes)",""
WindowsLiveWriter,1.7864,None,00020,04-Oct-2012 19:59:10.935,"Failed to download template Webpage: System.Exception: Unable to locate blog post elements using most recent post
   在 System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   在 System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.ParseWebpageIntoEditingTemplate_OnUIThread(Control uiContext, BlogPostRegionLocatorStrategy regionLocator, IProgressHost progress)
   在 WindowsLive.Writer.BlogClient.Detection.BlogEditingTemplateDetector.GetBlogTemplateFiles(IProgressHost progress, BlogPostRegionLocatorStrategy regionLocatorStrategy, BlogEditingTemplateStrategy[] templateStrategies, BlogEditingTemplateType[] templateTypes)",""

15.尝试到本地wordpress中的retina主题中,把相关的google code都设置的和在线的wordpress中的一样,结果也还是本地可以更新主题的。

16.实在不行,只有用狠招试试了。

去在线的wordpress上,把主题从retina改为默认的Twenty Eleven,然后看看效果。

结果证明,默认主题是可以的:

结果证明默认主题是可以的

看来,现在确定是Retina的问题了。

后来试了Liquorice主题也是可以的:

Liquorice主题也是可以的

 

17. 后来,搜ParseWebpageIntoEditingTemplate_OnUIThread,无意间找到这里:

attachment: Windows Live Writer.log (57.6 KB)

然后看了看是“Code Formatter Plugin for Windows Live Writer”的google code主页,

难道说是由于此插件,导致了不能下载主题?

所以,就尝试一下,把此插件去掉,看看效果。

结果,还是不行。

18.再下狠劲,把在线的retina都删除了,然后一点点测试,到底是更新了哪里的代码,导致wlw不能识别。

19.然后去重新下载一个retina,然后安装:

搜出retina 点击 现在安装

然后启用:

启用新的retina

 

然后再去用wlw去更新,看看全新的retina,是否可以正常识别。

结果是,全新的retina,也是不识别的。所以,看来还是在线的wordpress网站的配置,或者其他某个诡异某种原因,所导致的此问题的。

20. 那就继续尝试,看看能否找到之前的retina 0.1,看看是否有效果。

尝试了把原先retina地址中的0.2改为0.1:

http://wordpress.org/extend/themes/download/retina.0.1.zip

结果是可以下载的:

不过,后来导致发现,其和自己之前还保留的那个retina.0.1.zip,有点不太一样,

自己保留的之前的retina.0.1.zip,是574KB

而下载下来的这个retina.0.1.zip是56KB,而且解压也出现错误了。

所以,还是使用自己之前的那个retina.0.1.zip去试试吧。

把在线的wordpress中的retina删除掉,然后把本地的retina.0.1.zip解压后的上传上去。

然后刷新一下后台,就可以看到0.1版的retina了,然后去启用:

启动0.1版的retina

然后再用wlw测试试试。

结果竟然也还是不支持。

 

【总结】

目前的感觉,WLW无法正常支持Wordpress的Retina主题这个问题:

  • 要么是本身WLW对retina这个主题支持的不够全面
  • 要么是Retina本身做的兼容性不够好。
  • 抑或是wordpress的其他某些东西,比如某个插件,而导致了WLW无法正常下载retina这个主题。

其中,第二种的可能性最大。

因为,对于当前的在线的wordpress的其他主题,比如twentyeleven,liquorice等,wlw都可以正常的支持的。唯独是retina不支持(0.1和0.2,和个人修改后的0.2,都不支持)。

转载请注明:在路上 » 【记录】试图通过WLW错误日志:Failed to download template Framed: System.Exception: Unable to locate blog post elements using most recent post,来找到为何WLW无法更新主题的原因

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

网友最新评论 (3)

  1. 我用wlw也是在本地无法预览线上的效果,一直再找原因
    米说7年前 (2013-01-24)回复
  2. 楼主啊,我的所有主题都不行,错误提示一样的,有没有好办法。
    伟胖子7年前 (2012-12-02)回复
    • 没有。 只能自己去多试试。 换成默认主题,然后使用wlw去更新主题,看看具体错在哪里了。 然后一点点调试跟踪,或许可以找到根本原因,然后再想办法解决。。
      crifan7年前 (2012-12-05)回复
73 queries in 0.239 seconds, using 19.03MB memory