Skip to content

ContentBlocksDataProcessor throws error if used in menus on translated pages #439

@viu-x

Description

@viu-x

Describe the bug
If you want to use the ContentBlocksDataProcessor on a menu like it throws the following error if you visit a translated page. It does not matter if it is normal page type or a custom one created through content blocks.

TYPO3\CMS\Core\Domain\Record\ComputedProperties::__construct(): Argument #4 ($translationSource) must 
be of type ?TYPO3\CMS\Core\Domain\Page, array given, called in 
/var/www/html/vendor/typo3/cmscore/Classes/Domain/RecordFactory.php on line 208

To Reproduce

  1. Create a translated page
  2. Create a menu with data processor
page = PAGE
page {
    10 = FLUIDTEMPLATE
    10 {
        dataProcessing {
            40 = menu
            40 {
                levels = 3
                includeSpacer = 1
                as = navigationMain
                dataProcessing.10 = content-blocks
            }
        }
        // ...
    }
}
  1. Visit the translated page
  2. See error message above

Expected behavior
The data processor behaves exactly like on the default language.

TYPO3 Version
13.4.18

Content Blocks Version:
Latest

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions