Bug #84649

Opening the newContentElementWizard triggers Deprecation Error

Added by Daniel Goerz over 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
Start date:
2018-04-06
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

How to reproduce
1. Let deprecation errors through (don't handle E_USER_DEPRECATED with errorHandlerErrors)
2. Open the new content element wizard from the page module

You should see a deprectaion message.

It origins from the Method ContentCreationPagePositionMap->onClickInsertRecord(). Here the formerly public and now protected property R_URI is accessed and therefore the PublicPropertyDeprecationTrait triggers a deprecation error.

Possible solutions:
1. Add a public getter for R_URI
2. Pass the R_URI to the method call
3. Pass the R_URI to the class construction
(4. Do something smart)


Files


Related issues

Related to TYPO3 Core - Task #84307: Use ServerRequestInterface in ContentElement/NewContentElementControllerClosedMathias Brodala2018-03-15

Actions
#1

Updated by Daniel Goerz over 3 years ago

  • Related to Feature #81330: Provide a path to migrate internal class properties to protected added
#2

Updated by Joshua Westerheide over 3 years ago

Cant reproduce that on current master.

Also, the field \TYPO3\CMS\Backend\Tree\View\PagePositionMap::$R_URI is still public. But I don't know what is set to the $GLOBALS['SOBE'].

#3

Updated by Anja Leichsenring over 3 years ago

  • Related to deleted (Feature #81330: Provide a path to migrate internal class properties to protected)
#4

Updated by Anja Leichsenring over 3 years ago

there are three possible candidates to be in SOBE at the time of calling:

  • typo3/sysext/backend/Classes/Controller/EditDocumentController.php
  • typo3/sysext/backend/Classes/Controller/NewRecordController.php
  • typo3/sysext/backend/Classes/Controller/ContentElement/MoveElementController.php

it would be helpful to know which one triggers the deprecation.

#5

Updated by Anja Leichsenring over 3 years ago

  • Status changed from New to Needs Feedback
#6

Updated by Anja Leichsenring over 3 years ago

  • Related to Task #84285: Use ServerRequestInterface in ContentElement/MoveElementController added
#7

Updated by Anja Leichsenring over 3 years ago

  • Related to Task #84341: Use ServerRequestInterface in NewRecordController added
#8

Updated by Anja Leichsenring over 3 years ago

  • Related to Task #84195: Use ServerRequestInterface in EditDocumentController added
#9

Updated by Oliver Hader over 3 years ago

  • Target version deleted (9.2)
#10

Updated by Daniel Goerz over 3 years ago

$GLOBALS['SOBE'] contains an instance of TYPO3\CMS\Backend\Controller\ContentElement\NewContentElementController at this point of code execution and $R_URI is protected there.

To reproduce don't handle E_USER_DEPRECATED

I also added a screenshot

#12

Updated by Daniel Goerz over 3 years ago

I did not push a patch yet because I am not sure how to fix this properly.

#13

Updated by Daniel Goerz over 3 years ago

  • Description updated (diff)
#14

Updated by Daniel Goerz over 3 years ago

  • Related to deleted (Task #84285: Use ServerRequestInterface in ContentElement/MoveElementController)
#15

Updated by Daniel Goerz over 3 years ago

  • Related to deleted (Task #84341: Use ServerRequestInterface in NewRecordController)
#16

Updated by Daniel Goerz over 3 years ago

  • Related to deleted (Task #84195: Use ServerRequestInterface in EditDocumentController)
#17

Updated by Daniel Goerz over 3 years ago

  • Related to Task #84307: Use ServerRequestInterface in ContentElement/NewContentElementController added
#18

Updated by Daniel Goerz over 3 years ago

I think I finally found the correct related issue :)

#19

Updated by Oliver Hader over 3 years ago

  • Target version set to 9.2

Thx for digging deeper into this issue.

#20

Updated by Gerrit Code Review over 3 years ago

  • Status changed from Needs Feedback to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56606

#21

Updated by Susanne Moog over 3 years ago

Daniel Hinderink please test the patch, as far as I saw while checking that, the $_GET param "returnUrl" is actually set everywhere and may be used directly - but we have to make sure I didn't miss another place this gets called ;)

#22

Updated by Susanne Moog over 3 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#23

Updated by Benni Mack about 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF