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 ] Reading of collections from database doesn't work #1318

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Classes/Controller/MetadataController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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() ? : '';
Copy link
Collaborator

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.

Copy link
Collaborator Author

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.

Copy link
Member

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)

Copy link
Collaborator

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.

$j++;
}
}
Expand Down