-
Notifications
You must be signed in to change notification settings - Fork 45
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 ] Reading of collections from database doesn't work #1318
base: master
Are you sure you want to change the base?
Conversation
@@ -460,7 +460,7 @@ private function parseCollections(int $i, $value, array &$metadata) : void | |||
foreach ($value as $entry) { | |||
$collection = $this->collectionRepository->findOneByIndexName($entry); | |||
if ($collection) { | |||
$metadata[$i]['collection'][$j] = $collection->getLabel() ? : ''; | |||
$metadata[$i]['collection'] = $collection->getLabel() ? : ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case only the last read collection will be displayed to the user. Document can be part of more than one collection and each of them should be displayed in metadata list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without the adjustments only the first letter of the label is inserted, the rest is then the remaining part of the index identifier of the collection, this is probably not intended. It may be necessary to make a further correction if there are several collections, but the existing version is incorrect in any case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't merge a fix which doesn't actually fix the problem except for a single case. ;o)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The real error should be fixed. This only hides the real problem and when the real problem will be corrected this will not work anymore.
Related to #1317