rupertgermann / tt_news

TYPO3 Extension - News (tt_news)
21 stars 37 forks source link

ArgumentCountError when saving new news entry in typo3 v 10.4.25 tt_news v10.0.0 #184

Closed halliballi123 closed 2 years ago

halliballi123 commented 2 years ago

Hallo

I have installed tt_news v10.0.0 in my TYPO3 installation. I upgraded from v9.5.30 to TYPO3 v10.4.25. When I create or edit news entries in list module and save the entries an exception is thrown.

(1/1) ArgumentCountError Too few arguments to function TYPO3\CMS\Core\Database\SoftReferenceIndex::__construct(), 0 passed in /var/www/mydomain/typo3_src-10.4.25/typo3/sysext/core/Classes/Utility/GeneralUtility.php on line 3480 and exactly 1 expected

in /var/www/mydomain/typo3_src-10.4.25/typo3/sysext/core/Classes/Database/SoftReferenceIndex.php line 101

 * @var string
 */
private $referenceTable = '';

public function __construct(EventDispatcherInterface $eventDispatcher)
{
    $this->eventDispatcher = $eventDispatcher;
}

As far as I can tell, this only happens, when I enter some text in field bodytext. I had a brief look at the source code.

 'bodytext' => [
    'label' => $locallang_general . 'LGL.text',
    'l10n_mode' => $l10n_mode,
    'config' => [
         'type' => 'text',
         'cols' => 30,
         'rows' => 5,
         //'softref' => 'rtehtmlarea_images,typolink_tag,images,email[subst],url',
         'enableRichtext' => true,
         'richtextConfiguration' => 'default',
        ]
    ],

When I comment line 167 in tt_news.php ('softref'=> ...) there is no exception thrown anymore. So I guess there must be something wrong with checking the softreferences in field bodytext. Thank you and regards.

halliballi123 commented 2 years ago

I am not sure if I am the only one having that problem but I found something that might help: https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/DependencyInjection/Index.html

regards

halliballi123 commented 2 years ago

I am very sorry, the problem was caused by an outdated version of rte_ckeditor_image