TYPO3-Solr / ext-solr

A TYPO3 extension that integrates the Apache Solr search server with TYPO3 CMS. dkd Internet Service GmbH is developing the extension. Community contributions are welcome. See CONTRIBUTING.md for details.
GNU General Public License v3.0
137 stars 250 forks source link

Indexing of pages failes: Could not create a valid URL to get frontend data ... #3301

Closed intertain closed 2 years ago

intertain commented 2 years ago

Hi, I have a problem indexing pages in Backend. Indexing of news is working.

TYPO3 11.5.12 PHP 8.1 (too high? It worked with PHP 8.0 on DEV Server )

`1311080805: RuntimeException: Could not create a valid URL to get frontend data while trying to index a page. Created URL: (...)/kontakt-formular in /var/www/(...)/typo3conf/ext/solr/Classes/Domain/Index/PageIndexer/Helper/UriBuilder/AbstractUriStrategy.php:111 Stack trace:

0 /var/www/rw_bodensee_p/releases/0/public/typo3conf/ext/solr/Classes/IndexQueue/PageIndexer.php(253): ApacheSolrForTypo3\Solr\Domain\Index\PageIndexer\Helper\UriBuilder\AbstractUriStrategy->getPageIndexingUriFromPageItemAndLanguageId()`

Any idea?

dmitryd commented 2 years ago

It usually means that your site configuration is not good enough for solr. For example, this is wrong for solr:

base: example.com

or this:

base: '//example.com/'

or this:

base: '/'

or this:

base: 'https://example.com'

You need a FQDN with a slash in the end:

base: 'https://example.com/'

Same for baseVariants.

By the way, you should not ask here, you should ask in the Slack support channel: https://typo3.slack.com/archives/C02FF05Q4

intertain commented 2 years ago

You where right, that solved it. Thanks a lot.