Project

General

Profile

Actions

Bug #82911

closed

TCA Subclasses doese not affect ObjectStorages

Added by Benjamin Rannow about 7 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2017-11-03
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.1
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:

Description


config.tx_extbase {
    persistence {
        classes {
            EXT\ExtA\Domain\Model\Facility {
                subclasses {
                    EXT\ExtB\Domain\Model\AdvancedFacility = EXT\ExtB\Domain\Model\AdvancedFacility
                }
            }

            EXT\ExtB\Domain\Model\AdvancedFacility {
                mapping {
                    tableName = tx_ext_domain_model_facility
                }
            }
        }
    }
}

config.tx_extbase {
    objects {
        EXT\ExtA\Domain\Model\Facility {
            className = EXT\ExtB\Domain\Model\AdvancedFacility
        }
    }
}

I try to subclass a Model over TCA (see above).
It works fine with repositories. Sadly ObjectStorages give me only the standard Facility not the AdvancedFacility.
I See in the Datamaps of the DataMapper the Subclass but it is completly ignored.

it was in a Schedule.

Actions #1

Updated by Benjamin Rannow about 7 years ago

  • Description updated (diff)
Actions #2

Updated by Benjamin Rannow about 7 years ago

  • Description updated (diff)
Actions #3

Updated by Benjamin Rannow about 7 years ago

  • Priority changed from Must have to -- undefined --
  • Complexity changed from medium to no-brainer

EDIT: NOTHING

Actions #4

Updated by Benjamin Rannow about 7 years ago

  • Priority changed from -- undefined -- to Should have

EDIT: it was Extbase bootstap, which is not called in Scheduler Mode

Fixed it with this in my Scheduler Task

        $bootstrap = GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Core\Bootstrap::class);
        $bootstrap->initialize([
            'extensionName' => 'EXTKEY',
            'pluginName' => 'PLUGINNAME',
            'vendorName' => 'VENDORNAME'
        ]);

Actions #5

Updated by Benni Mack over 5 years ago

  • Status changed from New to Closed

Thanks for the hint. Yes. that is/was a conceptual problem within Extbase CLI bootstrap, which is not reliably fixable on CLI (due to Configuration based on TypoScript which is bound to a Page ID). That's why we migrated to Symfony Console and deprecated Command Controller logic in v9, and removed it in v10.0. So your workaround works fine for your use-case but that's nothing we will fix in Core. However, we're building new ways to set up Extbase configuration in v10.0 so this will solve issues on CLI as well.

Actions

Also available in: Atom PDF