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] init NewContentElementController with id and language uid #388

Closed
wants to merge 1 commit into from

Conversation

@anjeylink
Copy link
Collaborator

anjeylink commented Dec 24, 2019

@mabolek this should fix issue #376

@anjeylink anjeylink requested a review from mabolek Dec 24, 2019
Copy link
Collaborator

mabolek left a comment

I think this PR is trying to fix a bug in the TYPO3 core. I have opened an issue in Forge and will return to this once I have more information from the core devs.
https://forge.typo3.org/issues/90067

I would like to avoid using an XCLASS to fix this.

@anjeylink

This comment has been minimized.

Copy link
Collaborator Author

anjeylink commented Jan 8, 2020

@mabolek I agree that XCLASS is not a good solution.

Anyway I don't think it's a bug of TYPO3, since "NewContentElementController" was designed to work in BE with "id" parameter and extension is using it on FE where new routing for URLs is used.

@mabolek

This comment has been minimized.

Copy link
Collaborator

mabolek commented Jan 8, 2020

@anjeylink Editing should work in the frontend as well as the backend, and loading the wrong PageTS could have implications elsewhere too. Let's anyway wait for the response to the Forge ticket.

@mabolek

This comment has been minimized.

Copy link
Collaborator

mabolek commented Jan 20, 2020

@anjeylink Here's a way to solve the issue without an XCLASS:

$myRequest = $GLOBALS['TYPO3_REQUEST']->withQueryParams(['id' => $tsfe->id]);
$controller = GeneralUtility::makeInstance(NewContentElementController::class);
$controller->init($myRequest);
$controller->wizardArray();

(Thanks to @bmack for the code example.)

@anjeylink anjeylink closed this Jan 21, 2020
@anjeylink

This comment has been minimized.

Copy link
Collaborator Author

anjeylink commented Jan 21, 2020

@mabolek I'll open another PR

@anjeylink anjeylink deleted the bugfix_376 branch Jan 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.