表达式引擎 3 - 条目标记 - page_uri 空

Expression Engine 3 - Entries Tag - page_uri empty

编辑:

我正在重写我的问题,以便正确解释所有内容,所以开始吧。

我们使用的是 ExpressionEngine 3.1.0,并且最近更新到 3.1.2 - 几乎是在可用时就更新了。

自从这样做以来,我们 运行 遇到了 {page_uri}{page_url} 标签的真正错误。 pages module 已安装,我们添加了一个利用它的新闻项目。所有必填字段均已填写,因此不会出现错误。

我们遇到的问题是 {page_uri}{page_url} 标签中绝对没有输出任何内容,也找不到原因。我们的循环,包括测试代码,如下:

{exp:channel:entries channel="news" limit="1" dynamic="no"}
    (1){url_title_path='news'}(2){page_uri}(3){page_url}(4){permalink}
    <div class="item-double news">
        <div class="social-wall-logo"><img src="/assets/local/img/news_icon.png" alt="News" /></div>
        <div class="social-wall-heading">News</div>
        <div class="social-wall-content">{title}</div>
        <div class="social-wall-view-more"><a href="{url_title_path='news'}{page_uri}{page_url}"><img src="/assets/local/img/view_btn.png" alt="View" /></a></div>
    </div>
{/exp:channel:entries}

频道是正确的,{url_title_path} 确实输出了标题,但这不是输出 URI 和所有其他标签(如 {title})的正确输出方式。

我们在这个错误上花了大约 2 个小时,想不出也找不到我们做错了什么。但是,如果你能看到不对劲的地方,请说出来,哈哈!

感谢您的关注,

安迪

来自the documentation

If you have the Pages Module installed and if you have associated a static page with a channel entry (via the “Pages” section of the Publish tab), this is the page uri for the page.

可能您没有达到文档中提到的要求?

如果这不能解决您的问题,请更新您的问题以详细说明这些设置...

来自 EllisLab 的 Derek 对错误报告发表了评论并指出:

In /system/ee/legacy/core/Config.php change line 47 from:

$this->config = get_config(); to:

$this->config =& get_config();

https://support.ellislab.com/bugs/detail/21558/pages-page_uri-doesnt-work

我刚刚试过了,现在可以正常使用了。应该是即将发布的版本的一部分,由于问题的性质,我认为它会在几天内发布,如果不是更早的话。