Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Solr configuration not found because the root page is not configured #3407

Closed
ochorocho opened this issue Nov 16, 2022 · 4 comments
Closed
Assignees
Labels
BACKPORTABLE The changes SHOULD be backported

Comments

@ochorocho
Copy link

Describe the bug

When editing e.g. a news record on a page where solr is not configured

Call to a member function getSolrConfiguration() on null

To Reproduce

  • Create a Mutli-Site setup. A site serves as "Content Storage" - so it is not actually used in the frontend (solr_enabled_read: false).
  • Create news records on the "Content Storage"-Site
  • Create a news record and try to save it.

Expected behavior

Do not update or index items on a page that is not configured to use solr.

Screenshots
grafik

Used versions:

  • TYPO3 Version: [e.g. 11.5.6]
  • Browser: Firefox
  • EXT:solr Version: 11.5.0
  • Used Apache Solr Version: 8.11.1
  • PHP Version: 7.4.30
  • MySQL Version: 5.7.38

Additional context
Add any other context about the problem here.

@stigfaerch
Copy link

stigfaerch commented Mar 31, 2023

I also experience the same thing when using the DataHandler in my own code to create content.
The patch in the pullrequest (github.com/ochorocho/ext-solr/pull/1) from @ochorocho fixed the problem for me.

@dkd-kaehm
Copy link
Collaborator

@ochorocho
The pull request must go against this repository not on your fork.

@dkd-kaehm
Copy link
Collaborator

@ochorocho
On the way, please add "Fixes: #3407" in the commits message body as well.

@dkd-kaehm dkd-kaehm added the BACKPORTABLE The changes SHOULD be backported label Apr 12, 2023
ochorocho added a commit to ochorocho/ext-solr that referenced this issue Apr 12, 2023
If no site is found (e.g. due to missing configuration) skip
the rest of the code.

Fixes: TYPO3-Solr#3407
@ochorocho
Copy link
Author

@dkd-kaehm 🤦 sorry for the mess.
Created the PR against this repository, added "Fixes" to the commit message.

dkd-kaehm pushed a commit to ochorocho/ext-solr that referenced this issue Apr 12, 2023
If no site is found (e.g. due to missing configuration) skip
the rest of the code.

Fixes: TYPO3-Solr#3407
christophlehmann added a commit to christophlehmann/ext-solr that referenced this issue Apr 13, 2023
dkd-friedrich pushed a commit to dkd-friedrich/ext-solr that referenced this issue Apr 14, 2023
dkd-friedrich pushed a commit that referenced this issue Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BACKPORTABLE The changes SHOULD be backported
Projects
None yet
4 participants