V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
xiaolvmu
V2EX  ›  问与答

网站有一个小问题

  •  
  •   xiaolvmu · 2014-12-21 11:42:38 +08:00 via Android · 2837 次点击
    这是一个创建于 3432 天前的主题,其中的信息可能已经有所发展或是发生改变。
    https://techllage.com/index.php/
    点击最下面的View More,页面里面什么东西都没有了。再刷新一下,都出来了。这是什么原因呢?
    在Esotalk论坛系统中,下一页对应的搜索是#limit:250。但是搜索这个也不行。还是需要刷新一下内容才可以出来。根据测试,#limit一个6以上的数,回车,就出不来链接,需要刷新才行。
    这是为什么呢?想搜索又不知道怎么简短地表达。
    6 条回复    2014-12-23 12:04:14 +08:00
    aaaa007cn
        1
    aaaa007cn  
       2014-12-21 16:56:25 +08:00   ❤️ 1
    点击 View More 后只有 POST 请求
    返回的是 json
    应该有相关处理
    比如填充内容或者继续请求页面内容或者 30x 到 GET
    但是没有?

    刷新的话则是 GET
    所以有内容

    不了解 Esotalk
    不知道这是本来就有的问题还是你的设置、修改有问题
    xiaolvmu
        2
    xiaolvmu  
    OP
       2014-12-21 19:09:06 +08:00 via Android
    @aaaa007cn 这个应该不是原有的问题。官方搭建的技术支持论坛就没有这个问题~
    谢谢你,我继续研究下
    aaaa007cn
        3
    aaaa007cn  
       2014-12-21 20:22:03 +08:00   ❤️ 1
    对比了一下官方支持论坛和这个论坛
    这个论坛的 /?p=conversations/index.ajax/all 看起来是返回了空白的内容,只有 600 字节
    而在官方论坛 POST 这个地址后会返回包含帖子列表的 json,有 200k+
    xiaolvmu
        4
    xiaolvmu  
    OP
       2014-12-22 00:05:13 +08:00 via Android
    @aaaa007cn 谢谢你!!可能是post请求出了问题!我第二次段考完就修复下#^_^#
    xiaolvmu
        5
    xiaolvmu  
    OP
       2014-12-22 00:06:57 +08:00 via Android
    @aaaa007cn 我从模板文件找起,看一看它到底调用了什么
    xiaolvmu
        6
    xiaolvmu  
    OP
       2014-12-23 12:04:14 +08:00
    实在不会弄了,求解答~
    /core/views/conversations/results.php:
    <?php
    // Copyright 2011 Toby Zerner, Simon Zerner
    // This file is part of esoTalk. Please see the included license file for usage information.

    if (!defined("IN_ESOTALK")) exit;

    /**
    * Conversation results. Displays a message if there are no results, or a conversation list and
    * footer if there are.
    *
    * @package esoTalk
    */

    // If there are no conversations, show a message.
    if (!$data["results"]): ?>
    <div class='area noResults help'>
    <h4><?php echo T("message.noSearchResults"); ?></h4>
    <ul>
    <li><?php echo T("message.reduceNumberOfGambits"); ?></li>
    <?php if (!ET::$session->user): ?><li><?php echo T("message.logInToSeeAllConversations"); ?></li><?php endif; ?>
    <li><?php echo T("message.fulltextKeywordWarning"); ?></li>
    </ul>
    </div>

    <?php
    // If there are conversations, however, show them!
    else:
    ?>
    <?php $this->renderView("conversations/list", $data); ?>
    <?php endif; ?>

    /core/views/conversations/results.php:
    <?php
    // Copyright 2011 Toby Zerner, Simon Zerner
    // This file is part of esoTalk. Please see the included license file for usage information.

    if (!defined("IN_ESOTALK")) exit;

    /**
    * Displays the conversation list - a table with each conversation as a row.
    *
    * @package esoTalk
    */
    ?>
    <ul class='list conversationList'>

    <?php
    // Loop through the conversations and output a table row for each one.
    foreach ($data["results"] as $conversation):
    $this->renderView("conversations/conversation", $data + array("conversation" => $conversation));
    endforeach;

    ?>

    <?php if ($data["showViewMoreLink"]): ?>
    <li class='viewMore'>
    <a href='<?php
    $searchWithoutLimit = ET::searchModel()->removeGambit($data["searchString"], 'return strpos($term, strtolower(T("gambit.limit:"))) === 0;');
    echo URL("conversations/".$data["channelSlug"]."?search=".urlencode($searchWithoutLimit.($searchWithoutLimit ? " + " : "")."#".T("gambit.limit:").($data["limit"] + C("esoTalk.search.limitIncrement")))); ?>'><?php echo T("View more"); ?></a>
    </li>
    <?php endif; ?>

    </ul>

    貌似没什么错......
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3375 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 12:30 · PVG 20:30 · LAX 05:30 · JFK 08:30
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.