Project

General

Profile

Actions

Bug #86853

closed

Saving record with slug field fails in 9.5.1

Added by Chris Müller about 6 years ago. Updated about 6 years ago.

Status:
Rejected
Priority:
Must have
Assignee:
-
Category:
Site Handling, Site Sets & Routing
Target version:
-
Start date:
2018-11-05
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

typo3_8aacc053fe.log (16.5 KB) typo3_8aacc053fe.log Exception trace Chris Müller, 2018-11-05 13:15
Actions #1

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.

Actions #2

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.

Actions #3

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!

Actions

Also available in: Atom PDF