Bug #86853
closedSaving record with slug field fails in 9.5.1
0%
Description
Given is a record in an own extension with a slug field.
The TCA configuration is as follows:
'path_segment' => [
'label' => 'Path segment',
'exclude' => true,
'config' => [
'type' => 'slug',
'generatorOptions' => [
'fields' => ['title'],
'fieldSeparator' => '/',
'prefixParentPageSlug' => false,
],
'fallbackCharacter' => '-',
'eval' => 'uniqueInPid',
],
],
The generation of the slug is working due to the bugfix in #86809. But the saving of the record throws the exception:
Argument 2 passed to TYPO3\CMS\Core\DataHandling\SlugHelper::isUniqueInPid() must be an instance of TYPO3\CMS\Core\DataHandling\Model\RecordState, instance of TYPO3\CMS\Core\DataHandling\Model\RecordStateFactory given, called in /var/www/html/public/typo3/sysext/core/Classes/DataHandling/SlugHelper.php on line 337
I am using a multi-lingual single-page tree (I don't know if this is relevant).
I can reproduce the error also in the news extension.
It worked in 9.5.0, but not in 9.5.1 and 9.5.x-dev (as of time of writing).
Files
Updated by Oliver Hader about 6 years ago
- Status changed from New to Needs Feedback
I could not reproduce this behavior with recent master (commit c3f32cbb3de5d1d943e88ab8c6f80d5d21e8d877
).
Besides that, I'm wondering where RecordStateFactory
is coming from. The stack-trace you provided shows buildSlugForUniqueInSite
instead of isUniqueInPid
as mentioned in your report.
Updated by Chris Müller about 6 years ago
After a clean install of dev-master everything works as expected. It seems that my installation was not in a clean state. Sorry for the inconvenience the bug caused. It can be closed.
Updated by Georg Ringer about 6 years ago
- Status changed from Needs Feedback to Rejected
no need to say sorry and thanks for your fast feedback and testing on clean installation!