cdaecke / md_newsfrontend

This TYPO3 extension enables feUsers to create news records in the frontend.
Other
3 stars 3 forks source link

Saving the editing of an existing news item not possible #26

Closed alprogro closed 11 months ago

alprogro commented 1 year ago

The extension is really great. Unfortunately, I am not able to save the editing of an existing news item. I get the error: Oops, an error occurred! My system: fresh typo3 11.5.28, bootstrap package 13.0.4, PHP 8.1, news 10.0.3, sr-feuser_register 11.5.4; Extension installation via Extension Manager. What I am doing wrong? Thanks very much

cdaecke commented 1 year ago

Please check the TYPO3 error log for more details.

alprogro commented 1 year ago

Thanks for the tip. There is a very long entry in the log:

[ALERT] request="af9faeaa09c55" component="TYPO3.CMS.Frontend.ContentObject.Exception.ProductionExceptionHandler": Oops, an error occurred! Code: 20230719064559b8581f90- Exception: PHP Warning: Undefined array key "delete" in /var/www/clients/client0/web21/web/gro11.5.28/typo3conf/ext/md_newsfrontend/Classes/Controller/NewsController.php line 228, in file /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/core/Classes/Error/ErrorHandler.php:137 - {"exception":"TYPO3\\CMS\\Core\\Error\\Exception: PHP Warning: Undefined array key \"delete\" in /var/www/clients/client0/web21/web/gro11.5.28/typo3conf/ext/md_newsfrontend/Classes/Controller/NewsController.php line 228 in /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/core/Classes/Error/ErrorHandler.php:137\nStack trace:\n#0 /var/www/clients/client0/web21/web/gro11.5.28/typo3conf/ext/md_newsfrontend/Classes/Controller/NewsController.php(228): TYPO3\\CMS\\Core\\Error\\ErrorHandler->handleError()\n#1 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php(575): Mediadreams\\MdNewsfrontend\\Controller\\NewsController->updateAction()\n#2 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php(492): TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ActionController->callActionMethod()\n#3 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/extbase/Classes/Mvc/Dispatcher.php(96): TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ActionController->processRequest()\n#4 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/extbase/Classes/Mvc/Web/FrontendRequestHandler.php(46): TYPO3\\CMS\\Extbase\\Mvc\\Dispatcher->dispatch()\n#5 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/extbase/Classes/Core/Bootstrap.php(165): TYPO3\\CMS\\Extbase\\Mvc\\Web\\FrontendRequestHandler->handleRequest()\n#6 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/extbase/Classes/Core/Bootstrap.php(148): TYPO3\\CMS\\Extbase\\Core\\Bootstrap->handleFrontendRequest()\n#7 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php(5409): TYPO3\\CMS\\Extbase\\Core\\Bootstrap->run()\n#8 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/frontend/Classes/ContentObject/UserContentObject.php(44): TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer->callUserFunction()\n#9 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php(801): TYPO3\\CMS\\Frontend\\ContentObject\\UserContentObject->render()\n#10 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php(737): TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer->render()\n#11 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php(2853): TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer->cObjGetSingle()\n#12 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php(2811): TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController->processNonCacheableContentPartsAndSubstituteContentMarkers()\n#13 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php(2780): TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController->recursivelyReplaceIntPlaceholdersInContent()\n#14 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/frontend/Classes/Http/RequestHandler.php(165): TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController->INTincScript()\n#15 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/core/Classes/Middleware/ResponsePropagation.php(34): TYPO3\\CMS\\Frontend\\Http\\RequestHandler->handle()\n#16 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(172): TYPO3\\CMS\\Core\\Middleware\\ResponsePropagation->process()\n#17 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/frontend/Classes/Middleware/OutputCompression.php(48): Psr\\Http\\Server\\RequestHandlerInterface@anonymous->handle()\n#18 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(172): TYPO3\\CMS\\Frontend\\Middleware\\OutputCompression->process()\n#19 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/adminpanel/Classes/Middleware/AdminPanelDataPersister.php(44): Psr\\Http\\Server\\RequestHandlerInterface@anonymous->handle()\n#20 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(172): TYPO3\\CMS\\Adminpanel\\Middleware\\AdminPanelDataPersister->process()\n#21 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/adminpanel/Classes/Middleware/AdminPanelRenderer.php(45): Psr\\Http\\Server\\RequestHandlerInterface@anonymous->handle()\n#22 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(172): TYPO3\\CMS\\Adminpanel\\Middleware\\AdminPanelRenderer->process()\n#23 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/frontend/Classes/Middleware/ContentLengthResponseHeader.php(45): Psr\\Http\\Server\\RequestHandlerInterface@anonymous->handle()\n#24 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(172): TYPO3\\CMS\\Frontend\\Middleware\\ContentLengthResponseHeader->process()\n#25 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/frontend/Classes/Middleware/ShortcutAndMountPointRedirect.php(79): Psr\\Http\\Server\\RequestHandlerInterface@anonymous->handle()\n#26 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(172): TYPO3\\CMS\\Frontend\\Middleware\\ShortcutAndMountPointRedirect->process()\n#27 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/frontend/Classes/Middleware/PrepareTypoScriptFrontendRendering.php(78): Psr\\Http\\Server\\RequestHandlerInterface@anonymous->handle()\n#28 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(172): TYPO3\\CMS\\Frontend\\Middleware\\PrepareTypoScriptFrontendRendering->process()\n#29 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/frontend/Classes/Middleware/TypoScriptFrontendInitialization.php(104): Psr\\Http\\Server\\RequestHandlerInterface@anonymous->handle()\n#30 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(172): TYPO3\\CMS\\Frontend\\Middleware\\TypoScriptFrontendInitialization->process()\n#31 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/frontend/Classes/Middleware/PageArgumentValidator.php(132): Psr\\Http\\Server\\RequestHandlerInterface@anonymous->handle()\n#32 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(172): TYPO3\\CMS\\Frontend\\Middleware\\PageArgumentValidator->process()\n#33 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/frontend/Classes/Middleware/PreviewSimulator.php(66): Psr\\Http\\Server\\RequestHandlerInterface@anonymous->handle()\n#34 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(172): TYPO3\\CMS\\Frontend\\Middleware\\PreviewSimulator->process()\n#35 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/adminpanel/Classes/Middleware/SqlLogging.php(58): Psr\\Http\\Server\\RequestHandlerInterface@anonymous->handle()\n#36 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(172): TYPO3\\CMS\\Adminpanel\\Middleware\\SqlLogging->process()\n#37 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/frontend/Classes/Middleware/PageResolver.php(106): Psr\\Http\\Server\\RequestHandlerInterface@anonymous->handle()\n#38 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(172): TYPO3\\CMS\\Frontend\\Middleware\\PageResolver->process()\n#39 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/frontend/Classes/Middleware/StaticRouteResolver.php(80): Psr\\Http\\Server\\RequestHandlerInterface@anonymous->handle()\n#40 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(172): TYPO3\\CMS\\Frontend\\Middleware\\StaticRouteResolver->process()\n#41 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/frontend/Classes/Middleware/SiteBaseRedirectResolver.php(94): Psr\\Http\\Server\\RequestHandlerInterface@anonymous->handle()\n#42 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(172): TYPO3\\CMS\\Frontend\\Middleware\\SiteBaseRedirectResolver->process()\n#43 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/redirects/Classes/Http/Middleware/RedirectHandler.php(85): Psr\\Http\\Server\\RequestHandlerInterface@anonymous->handle()\n#44 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(172): TYPO3\\CMS\\Redirects\\Http\\Middleware\\RedirectHandler->process()\n#45 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/adminpanel/Classes/Middleware/AdminPanelInitiator.php(55): Psr\\Http\\Server\\RequestHandlerInterface@anonymous->handle()\n#46 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(172): TYPO3\\CMS\\Adminpanel\\Middleware\\AdminPanelInitiator->process()\n#47 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/frontend/Classes/Middleware/FrontendUserAuthenticator.php(97): Psr\\Http\\Server\\RequestHandlerInterface@anonymous->handle()\n#48 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(172): TYPO3\\CMS\\Frontend\\Middleware\\FrontendUserAuthenticator->process()\n#49 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/frontend/Classes/Middleware/BackendUserAuthenticator.php(78): Psr\\Http\\Server\\RequestHandlerInterface@anonymous->handle()\n#50 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(172): TYPO3\\CMS\\Frontend\\Middleware\\BackendUserAuthenticator->process()\n#51 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/frontend/Classes/Middleware/MaintenanceMode.php(55): Psr\\Http\\Server\\RequestHandlerInterface@anonymous->handle()\n#52 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(172): TYPO3\\CMS\\Frontend\\Middleware\\MaintenanceMode->process()\n#53 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/frontend/Classes/Middleware/SiteResolver.php(65): Psr\\Http\\Server\\RequestHandlerInterface@anonymous->handle()\n#54 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(172): TYPO3\\CMS\\Frontend\\Middleware\\SiteResolver->process()\n#55 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/frontend/Classes/Middleware/EidHandler.php(64): Psr\\Http\\Server\\RequestHandlerInterface@anonymous->handle()\n#56 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(172): TYPO3\\CMS\\Frontend\\Middleware\\EidHandler->process()\n#57 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/core/Classes/Middleware/NormalizedParamsAttribute.php(45): Psr\\Http\\Server\\RequestHandlerInterface@anonymous->handle()\n#58 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(172): TYPO3\\CMS\\Core\\Middleware\\NormalizedParamsAttribute->process()\n#59 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/core/Classes/Middleware/VerifyHostHeader.php(55): Psr\\Http\\Server\\RequestHandlerInterface@anonymous->handle()\n#60 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(172): TYPO3\\CMS\\Core\\Middleware\\VerifyHostHeader->process()\n#61 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/frontend/Classes/Middleware/TimeTrackerInitialization.php(58): Psr\\Http\\Server\\RequestHandlerInterface@anonymous->handle()\n#62 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(172): TYPO3\\CMS\\Frontend\\Middleware\\TimeTrackerInitialization->process()\n#63 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php(78): Psr\\Http\\Server\\RequestHandlerInterface@anonymous->handle()\n#64 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/core/Classes/Http/AbstractApplication.php(86): TYPO3\\CMS\\Core\\Http\\MiddlewareDispatcher->handle()\n#65 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/frontend/Classes/Http/Application.php(69): TYPO3\\CMS\\Core\\Http\\AbstractApplication->handle()\n#66 /var/www/clients/client0/web21/web/gro11.5.28/typo3/sysext/core/Classes/Http/AbstractApplication.php(100): TYPO3\\CMS\\Frontend\\Http\\Application->handle()\n#67 /var/www/clients/client0/web21/web/gro11.5.28/index.php(20): TYPO3\\CMS\\Core\\Http\\AbstractApplication->run()\n#68 /var/www/clients/client0/web21/web/gro11.5.28/index.php(21): {closure}()\n#69 {main}","code":"20230719064559b8581f90"}

cdaecke commented 1 year ago

@alprogro I have just pushed a bugfix. Could you please double check, if the current master is working for you?

alprogro commented 1 year ago

Perfect, that works great! Unfortunately, I've only now discovered that the "Delete" button in the pop-up window is not responding. No entry in the log. I hope you can find a solution here too! Thanks alot!!

cdaecke commented 1 year ago

Sorry for the late reply!

Do you have jQuery included in your project? This is needed, in order to set the delete link in the modal.

See here:

https://github.com/cdaecke/md_newsfrontend/blob/23a23ab81427cbc0aa96e6be7b11c931575202c2/Resources/Private/Templates/News/List.html#L61-L71

You can adapt the template and replace the dependency to jQuery of course.