in2code-de / in2publish_core

in2publish Community Version
https://www.in2code.de/produkte/content-publisher/
GNU General Public License v3.0
40 stars 23 forks source link

[BUGFIX] Add rootRecord translations in ShallowRecordFinder #108

Closed YKWeyer closed 9 months ago

YKWeyer commented 1 year ago

Fixes https://github.com/in2code-de/in2publish_core/issues/107

I tested it successfully with added translations, updated fields in the translation and with removed translations.

These code bits are mostly based onto the existing logic in ShallowRecordFinder::addChildPagesRecursively. Fetching the pages rows by property transOrigPointerField of the identifier of the rootRecord should always return all corresponding translations. The transOrigPointerField one is made at the very beginning of my addition, outside of the static function. I assumed the languageField check would have been redundant, since we're targeting records with transOrigPointerField > 0, so I removed it as well. Let me know if you think we might run into edge cases.

vertexvaar commented 9 months ago

See #107 for explanation.