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
Contributor

@mabolek this should fix issue #376

Copy link
Collaborator

@mabolek mabolek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor Author

@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
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
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
Copy link
Contributor Author

@mabolek I'll open another PR

@anjeylink anjeylink deleted the bugfix_376 branch January 21, 2020 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants