jweiland-net / events2

With this TYPO3 extension you can organize one, multiple and recurring events.
GNU General Public License v2.0
18 stars 16 forks source link

Required argument "event" is not set for JWeiland\Events2\Controller\DayController->show. #417

Closed tzeier closed 1 year ago

tzeier commented 1 year ago

On the Show Detail page i get the following error:

" #1298012500 TYPO3\CMS\Extbase\Mvc\Controller\Exception\RequiredArgumentMissingException

Required argument "event" is not set for JWeiland\Events2\Controller\DayController->show."

How can I fix this?

(TYPO3 11.5.27, Events2 8.1.6)

sfroemkenjw commented 1 year ago

Hello @tzeier

have you configured your own template files? Please check, if link is still correct: https://github.com/jweiland-net/events2/blob/8.1.6/Resources/Private/Partials/Event/List.html#L28-L39

Have you configured the scheduler task to regenerate all these day records? Please configure a scheduler task with a recurring for at least 24 hours

Maybe something went totally wrong. Please execute CLI Command

vendor/bin/typo3 events2:rebuild

This will truncate day table and re-create days for each of your events

Stefan

tzeier commented 1 year ago

Hi Stefan

Yes, I've configuired my own template files based on the originals. In the meantime I found out, that the "read more"-Link on the list page was the problem.

Instead of `<f:link.action action="show" controller="Day" pluginName="{f:if(condition: settings.pidOfDetailPage, then: 'show', else: 'list')}" pageUid="{settings.pidOfDetailPage}" arguments="{timestamp: day.dayTimeAsTimestamp, event: day.event}" title="{f:translate(key: 'singleView')}: {day.event.title}"

{day.event.title}</f:link.action>`

I had <f:link.action action="show" controller="Day" pageUid="{settings.pidOfDetailPage}" arguments="{timestamp: '{day.dayTime -> f:format.date(format: \'U\')}', event: day.event}" title="{f:translate(key: 'singleView')}: {day.event.title}">{day.event.title}</f:link.action>

The parameter "pluginName" was missing. Did You add this in an Update or did i just forget to copy it to my tempalte file?

Anyway. After changing it to the new link format, it worked properly again.

Thanks for Your help anyway! =)

sfroemkenjw commented 1 year ago

Hello @tzeier

TYPO3 has deprecated the usage of SwitchableControllerActions. That's why we had to add a lot more Plugins to our extension. See also news extension: They have the same problem and created an own tab to the newContentElementWizard. The problem with all these new plugins is, that you have to take care of all links from one plugin to the others.

Nice to see that you already have found a solution for you

Stefan

tzeier commented 1 year ago

I see. Means, I'll have to go throgh all of my own template files and check for depreceated links... Thank you.