Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] The function errorAction() needs to exists in NewTenantController #1091

Merged
merged 6 commits into from
Nov 21, 2023

Conversation

beatrycze-volk
Copy link
Collaborator

Without this function the backend module doesn't work

Without this function the backend module doesn't work
@beatrycze-volk beatrycze-volk force-pushed the restore-erroraction branch 2 times, most recently from d662054 to a639749 Compare November 10, 2023 16:35
@sebastian-meyer sebastian-meyer added the 🐛 bug A non-security related bug. label Nov 10, 2023
@sebastian-meyer sebastian-meyer changed the title The function errorAction() needs to exists in NewTenantController [BUGFIX] The function errorAction() needs to exists in NewTenantController Nov 10, 2023
@sebastian-meyer
Copy link
Member

sebastian-meyer commented Nov 10, 2023

I don't understand why there is a problem at all. NewTenantController extends AbstractController which extends Extbase's ActionController which in turn implements ActionController::errorAction(). So NewTenantController should've inherited this method. How can this function be missing?

@beatrycze-volk
Copy link
Collaborator Author

I don't understand why there is a problem at all. NewTenantController extends AbstractController which extends Extbase's ActionController which in turn implements ActionController::errorAction(). So NewTenantController should've inherited this method. How can this function be missing?

I don't know but the fact is that without this function creation of the data in backend doesn't work. The error says that this function is missing. No other more detailed message was displayed.

@sebastian-meyer
Copy link
Member

sebastian-meyer commented Nov 17, 2023

OK, but then the method should return the correct result type. Does something like return parent::errorAction(); work? Otherwise we should at least return an empty response object to satisfy the interface.

@beatrycze-volk beatrycze-volk force-pushed the restore-erroraction branch 2 times, most recently from 5d756d6 to 297ff97 Compare November 21, 2023 11:33
@beatrycze-volk
Copy link
Collaborator Author

@sebastian-meyer
Copy link
Member

The only difference seems to be that in TYPO3v10 the result of getFlattenedValidationErrorMessage() is returned directly, while in TYPO3v11 it's wrapped in htmlResponse(). Maybe we can distinguish those cases as well? Of course the return type then would have to be string|ResponseInterface (in PHPDocs) or mixed (in method signature), since PHP<8 doesn't support union types.

@sebastian-meyer
Copy link
Member

Since Codacy and PHPStan are fine with the current state, I am as well. ;o)

@sebastian-meyer sebastian-meyer merged commit 9b4521b into kitodo:master Nov 21, 2023
6 checks passed
@beatrycze-volk beatrycze-volk deleted the restore-erroraction branch November 21, 2023 15:41
csidirop added a commit to csidirop/kitodo-presentation that referenced this pull request Dec 11, 2023
As explained here kitodo#1091 and here kitodo#1111

Signed-off-by: Christos Sidiropoulos <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug A non-security related bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants