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

[BUGFIX] Ensure record exists before asserting if draft #3532

Merged
merged 1 commit into from
Apr 17, 2023

Conversation

dogawaf
Copy link
Contributor

@dogawaf dogawaf commented Mar 3, 2023

What this pr does

This fix an error in case a record was not found in the garbage collector process.

Fixes: #3531

@dogawaf
Copy link
Contributor Author

dogawaf commented Mar 3, 2023

The fix is maybe not the good one, as it can hide the real issue: why the record was not found?

@dkd-kaehm
Copy link
Collaborator

The fix is maybe not the good one, as it can hide the real issue: why the record was not found?

Did you find out why it was so on your system?

@koehnlein
Copy link
Contributor

I just added some information how to reproduce it in #3531:

It happens if a record is deleted. BackendUtility::getRecord() is executed with the uid of the deleted record and returns null

@dkd-friedrich
Copy link
Member

I'm also not exactly sure why an already deleted record gets processed by the RecordMonitor or the GarbageCollector, but as draft records will be ignored anyway it should be safe to fix this issue that way.

Copy link
Member

@dkd-friedrich dkd-friedrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dkd-friedrich
Copy link
Member

@dogawaf Thanks for providing a pr, I'll do a backport to 11.5.

dkd-friedrich pushed a commit to dkd-friedrich/ext-solr that referenced this pull request Apr 17, 2023
@dkd-friedrich dkd-friedrich merged commit 13f8288 into TYPO3-Solr:main Apr 17, 2023
dkd-friedrich pushed a commit that referenced this pull request Apr 17, 2023
@dkd-kaehm dkd-kaehm mentioned this pull request Oct 13, 2023
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] PHP 8 warning in Util::isDraftRecord
4 participants