【问题标题】:Search result of News using SOLR Search giving http://{plugin.tx_news.settings.detailpid}/ instead of real URL in Typo3使用 SOLR 搜索新闻的搜索结果给出 http://{plugin.tx_news.settings.detailpid}/ 而不是 Typo3 中的真实 URL
【发布时间】:2017-09-06 09:37:14
【问题描述】:

我正在使用 TYPO3 7.6.10 和 solr 6.5.0

插件:TYPO3 6.1.0 的 Apache solr

搜索工作正常。我为 Pages 和 News 编制了索引,但是当我得到新闻结果时,它会在 URL 中给出 http://{plugin.tx_news.settings.detailpid}/ 而不是真实的 URL。

我在 TYPOSCRIPT 的常量中给出了plugin.tx_news.settings.detailPid = 1130

请打开以下链接查看第二个结果

http://www.fujifilm-mea.com/searchresult-page/?q=A+free+firmware+update+to+enhance+the+performance+of+the+FUJIFILM+X-Pro2+is+now+available+for+download&id=1263&L=0

【问题讨论】:

  • 设置常量后是否清除缓存并重新索引?
  • 是的@GeorgRinger

标签: solr typo3 tx-news


【解决方案1】:

plugin.tx_solr.index.queue.news.fields.url 中配置了什么?

至少在大小写上似乎存在差异(detailpid detailPid)

plugin.tx_news.settings.detailpid plugin.tx_news.settings.detailPid

【讨论】:

  • 可以调整大小写,因为它被解释为域,它不区分大小写并且在大多数情况下用于小字符。
  • 我想我还没有设置plugin.tx_solr.index.queue.news.fields.url。在哪里设置?请帮忙
  • 如果您安装了 ext:solr,您可以在模板中添加“搜索 - 新闻索引队列配置 (solr) [EXT:solr/Configuration/TypoScript/Examples/IndexQueueNews/]”。
  • 我也有同样的问题,请问有什么解决办法吗? @mtness:我试过了,但没有帮助
【解决方案2】:

在您的根设置中:

plugin.tx_solr.index.queue {
news = 1
news {
    table = tx_news_domain_model_news
    fields {
        abstract = teaser
        author = author
        authorEmail_stringS = author_email
        title = title
        content = SOLR_CONTENT
        content {
            cObject = COA
            cObject {
                10 = TEXT
                10 {
                    field = bodytext
                    noTrimWrap = || |
                }
            }
        }

        url = TEXT
        url {
            typolink.parameter = {$plugin.tx_news.settings.detailPid}
            typolink.additionalParams = &tx_news_pi1[controller]=News&tx_news_pi1[action]=detail&tx_news_pi1[news]={field:uid}&L={field:__solr_index_language}
            typolink.additionalParams.insertData = 1
            typolink.useCacheHash = 1
            typolink.returnLast = url
        }
    }
    attachments {
        fields = related_files
    }
}

}

在根常量中:

plugin.tx_news.settings.detailPid = 3   //change "3" with ID of your NewsSingle Page

清除所有缓存并初始化 Solr 连接并再次重新索引新闻

【讨论】:

    【解决方案3】:

    这不是一个有效的 TypoScript 常量: {plugin.tx_news.settings.detailpid}

    请检查您的 TypoScript 设置并将其更改为: {$plugin.tx_news.settings.detailpid}

    https://wiki.typo3.org/TypoScript_Constants

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-05-17
      • 2019-04-05
      相关资源
      最近更新 更多