Bug #84649

Opening the newContentElementWizard triggers Deprecation Error

Added by Daniel Goerz over 1 year ago. Updated about 1 year ago.

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

100%

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)

new-element-wizard-deprecation-message.png View (84.4 KB) Daniel Goerz, 2018-04-08 09:17


Related issues

Related to TYPO3 Core - Task #84307: Use ServerRequestInterface in ContentElement/NewContentElementController Closed 2018-03-15

Associated revisions

Revision eafb02ee (diff)
Added by Susanne Moog over 1 year ago

[BUGFIX] Do not use deprecated $R_URI

Resolves: #84649
Releases: master
Change-Id: I98ec184e4b2d15d04515ba121babb470ac832882
Reviewed-on: https://review.typo3.org/56606
Reviewed-by: Mathias Schreiber <>
Tested-by: Mathias Schreiber <>
Tested-by: TYPO3com <>
Reviewed-by: Benni Mack <>
Tested-by: Benni Mack <>

History

#1 Updated by Daniel Goerz over 1 year ago

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

#2 Updated by Joshua Westerheide over 1 year 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 1 year ago

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

#4 Updated by Anja Leichsenring over 1 year 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 1 year ago

  • Status changed from New to Needs Feedback

#6 Updated by Anja Leichsenring over 1 year ago

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

#7 Updated by Anja Leichsenring over 1 year ago

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

#8 Updated by Anja Leichsenring over 1 year ago

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

#9 Updated by Oliver Hader over 1 year ago

  • Target version deleted (9.2)

#10 Updated by Daniel Goerz over 1 year 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

#11 Updated by Daniel Goerz over 1 year ago

#12 Updated by Daniel Goerz over 1 year ago

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

#13 Updated by Daniel Goerz over 1 year ago

  • Description updated (diff)

#14 Updated by Daniel Goerz over 1 year ago

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

#15 Updated by Daniel Goerz over 1 year ago

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

#16 Updated by Daniel Goerz over 1 year ago

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

#17 Updated by Daniel Goerz over 1 year ago

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

#18 Updated by Daniel Goerz over 1 year ago

I think I finally found the correct related issue :)

#19 Updated by Oliver Hader over 1 year ago

  • Target version set to 9.2

Thx for digging deeper into this issue.

#20 Updated by Gerrit Code Review over 1 year 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 1 year ago

@Daniel 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 1 year ago

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

#23 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF