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 253 forks source link

[BUG] TYPO3 9.5 indexer stores wrong URL when the site module is used #2309

Closed ax-ha closed 5 years ago

ax-ha commented 5 years ago

Describe the bug The indexer indexes content correctly into one of two given cores (core_de) but stores the wrong language (en) in the uri field. For example there is the url of the english page stored in the german core: /en/company/newsletter whereas the correct url would be /unternehmen/newsletter

The other fields like title, content... are stored correctly. (german in this case)

To Reproduce 1: Create a site with the following setup:

rootPageId: 2 base: / baseVariants: { }

languages:

title: Deutsch enabled: true languageId: '0' base: / typo3Language: de locale: de_DE.UTF-8 iso-639-1: de navigationTitle: Deutsch hreflang: de-DE direction: '' flag: de

title: English enabled: true languageId: '1' base: /en/ typo3Language: default locale: en_US.UTF-8 iso-639-1: en navigationTitle: English hreflang: en-US direction: '' fallbackType: strict fallbacks: '' flag: en-us-gb

2: Extend your sitepackage setup with the basic solr setup:

config.sys_language_overlay = 0 config.sys_language_mode = strict

3: Extend the constants typoscript file:

plugin.tx_solr { enabled = 1 solr { scheme = http host = typo9.ddev.local port = 8983 path = /solr/core_de/ } } [globalVar = GP:L = 1] plugin.tx_solr.solr.path = /solr/core_en/ [end]

  1. Create at least one test page with an english translation and start indexing

Expected behavior Both cores should be filled correctly with the correct URLs.

Used versions (please complete the following information):

Additional context The funny thing is that my news indexing is working like a charm in the same enviroment. Please bear with me if this is a configuration problem but the page and language behavior are working as expected. Thanks a lot for your help!

ax-ha commented 5 years ago

Same problems with Typo3 Version 9.5.8-dev

jackd248 commented 5 years ago

Got the same problem with TYPO3 v9.5.8 Any updates on this so far?

ax-ha commented 5 years ago

Yes, luckily I have some news! After starting from the scratch with the solr setup, everything worked as expected over here. I think the problem was that all cores had been created with the same data directory (dataDir). But every core should have an own one like: data/core_de/ and data/core_en

Hopefully this helps you a bit!

jackd248 commented 5 years ago

Thanks for your quick help. But unfortunately every core already has an own data directory. Maybe I also have to start from scratch with the setup ...

phso commented 5 years ago

any updates? same problem TYPO3 9.5.8 and Solr 7.6.0

timohund commented 5 years ago

Please try using dev-master

devmes commented 5 years ago

The problem occurs when the global language configuration is removed from Typoscript. As soon as I inserted it back into Typoscript the pages were indexed correctly.

Typoscript Configuration:

[globalVar = GP:L = 0]
config {
    sys_language_uid = 0
    language = de
}
[end]

[globalVar = GP:L = 1]
config {
    sys_language_uid = 1
    language = it
}
[end]
timohund commented 5 years ago

Should be solved with EXT:solr 10 and TYPO3 9.5.9, please re-open if you still have any issues