默认主题,把disqus的代码复制到comments.php后,打开任何文章页都提示find input author error,
折腾了半天发现只能通过关闭文章评论的方法才不出这个错误,请问这是什么原因呢。
然后,换了主题放disqus代码后,并没有这个错误。。想用默认主题,但不知道是哪个地方不对
模板问题,已自行解决。
请关闭主题
默认主题,把disqus的代码复制到comments.php后,打开任何文章页都提示find input author error,
折腾了半天发现只能通过关闭文章评论的方法才不出这个错误,请问这是什么原因呢。
然后,换了主题放disqus代码后,并没有这个错误。。想用默认主题,但不知道是哪个地方不对
DT27 写了:用默认主题试了各种替换方法都没有出现问题。
你是怎么改的,具体提示是什么样子。
改的代码跟错误提示都截图吧。
代码: 全选
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<div id="disqus_thread"></div>
<script>
/**
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables*/
/*
var disqus_config = function () {
this.page.url = '<?php $this->permalink() ?>';
this.page.identifier = '<?php $this->cid() ?>';
this.page.title = '<?php $this->title() ?>';
};
*/
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = 'https://xxx.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
用你的代码试过,没问题。。。 你看看是不是默认主题什么地方被你改了,官网从新下载,把现在的主题备份,用新默认主题试试。LJ 写了:DT27 写了:用默认主题试了各种替换方法都没有出现问题。
你是怎么改的,具体提示是什么样子。
改的代码跟错误提示都截图吧。
comments.php至于提示,你看这里也有一样的代码: 全选
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?> <div id="disqus_thread"></div> <script> /** * RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS. * LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables*/ /* var disqus_config = function () { this.page.url = '<?php $this->permalink() ?>'; this.page.identifier = '<?php $this->cid() ?>'; this.page.title = '<?php $this->title() ?>'; }; */ (function() { // DON'T EDIT BELOW THIS LINE var d = document, s = d.createElement('script'); s.src = 'https://xxx.disqus.com/embed.js'; s.setAttribute('data-timestamp', +new Date()); (d.head || d.body).appendChild(s); })(); </script> <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
https://segmentfault.com/q/1010000000602231
没用的,早试过了DT27 写了:用你的代码试过,没问题。。。 你看看是不是默认主题什么地方被你改了,官网从新下载,把现在的主题备份,用新默认主题试试。LJ 写了:DT27 写了:用默认主题试了各种替换方法都没有出现问题。
你是怎么改的,具体提示是什么样子。
改的代码跟错误提示都截图吧。
comments.php至于提示,你看这里也有一样的代码: 全选
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?> <div id="disqus_thread"></div> <script> /** * RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS. * LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables*/ /* var disqus_config = function () { this.page.url = '<?php $this->permalink() ?>'; this.page.identifier = '<?php $this->cid() ?>'; this.page.title = '<?php $this->title() ?>'; }; */ (function() { // DON'T EDIT BELOW THIS LINE var d = document, s = d.createElement('script'); s.src = 'https://xxx.disqus.com/embed.js'; s.setAttribute('data-timestamp', +new Date()); (d.head || d.body).appendChild(s); })(); </script> <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
https://segmentfault.com/q/1010000000602231
你现在的主题没问题。另外disqus我这里翻墙才能打开。LJ 写了:https://ipx.name
我看你一直没在线,我又换回没问题的主题了DT27 写了:你现在的主题没问题。另外disqus我这里翻墙才能打开。LJ 写了:https://ipx.name