Open stegmatze opened 6 years ago
I will do a patch for this.
@sfsmfc is there a timeframe for a patch-release?
We used absolute links when rendering the result to solve this. For EXT:solr 6.x we did it like this:
plugin.tx_solr.search.results.fieldRenderingInstructions.url {
pages = TEXT
pages {
typolink {
parameter.field = uid
returnLast = url
forceAbsoluteUrl = 1
}
}
}
If you use the "right" realurl config and absolute urls, it should be worked.
Therefore I think no more solution is needed.
I had the same problem one day ago and came up with a custom PHP class which implements PageIndexerDataUrlModifier
and overrides the domain by using the RealUrl _DOMAINS|encode
configuration. This also avoids some HTTP redirects when indexing pages.
is there a solution for this issues, ? I can't get it to work.
@lgescobar mind sharing your solution here for others to use?
For me was a bad real url configuration (many thanks to sfsmfc ), here is my solution: TYPO3 SOLR Multi Domain Configuration with RealUrl https://git.landolsi.de/snippets/166 https://git.landolsi.de/snippets/167 https://git.landolsi.de/snippets/168
https://gist.github.com/alandolsi/18cd6271adefba8780e39e3d74afab82
@alandolsi thx for sharing this
That's the only thing I can share at the moment.
In ext_localconf.php
:
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['IndexQueuePageIndexer']['dataUrlModifier'] =
\ACME\SolrExtras\IndexQueue\PageIndexerDataUrlModifier::class;
Class:
<?php
namespace ACME\SolrExtras\IndexQueue;
class PageIndexerDataUrlModifier implements \ApacheSolrForTypo3\Solr\IndexQueue\PageIndexerDataUrlModifier
{
/**
* Modifies the given data url
*
* $urlData = [
* 'item' => $item,
* 'scheme' => $scheme,
* 'host' => $host,
* 'path' => $path,
* 'pageId' => $pageId,
* 'language' => $language
* ]
*
* @param string $pageUrl the current data url.
* @param array $urlData An array of url data
* @return string the final data url
*/
public function modifyDataUrl($pageUrl, array $urlData)
{
$encodeLangConfs = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['_DOMAINS']['encode'] ?? null;
return modifyUrl($pageUrl, $encodeLangConfs);
}
}
Hi there, I have a problem with multiple domains on the same root page. There are 5 languages with separate solr cores and separate domains. The languages/cores are configured like this: https://forge.typo3.org/projects/extension-solr/wiki/Multi_Language_Handling Indexing works fine except for the domains, solr only uses the first of the domain records on my root page, not the ones configured for the languages.
TYPO3 7.6.23 Solr 4.10.4 EXT:solr 5.1.1