Project

General

Profile

Actions

Bug #84649

closed

Opening the newContentElementWizard triggers Deprecation Error

Added by Daniel Goerz over 6 years ago. Updated about 6 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 1 (0 open1 closed)

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

Actions
Actions #1

Updated by Daniel Goerz over 6 years ago

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

Updated by J W over 6 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'].

Actions #3

Updated by Anja Leichsenring over 6 years ago

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

Updated by Anja Leichsenring over 6 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.

Actions #5

Updated by Anja Leichsenring over 6 years ago

  • Status changed from New to Needs Feedback
Actions #6

Updated by Anja Leichsenring over 6 years ago

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

Updated by Anja Leichsenring over 6 years ago

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

Updated by Anja Leichsenring over 6 years ago

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

Updated by Oliver Hader over 6 years ago

  • Target version deleted (9.2)
Actions #10

Updated by Daniel Goerz over 6 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

Actions #12

Updated by Daniel Goerz over 6 years ago

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

Actions #13

Updated by Daniel Goerz over 6 years ago

  • Description updated (diff)
Actions #14

Updated by Daniel Goerz over 6 years ago

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

Updated by Daniel Goerz over 6 years ago

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

Updated by Daniel Goerz over 6 years ago

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

Updated by Daniel Goerz over 6 years ago

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

Updated by Daniel Goerz over 6 years ago

I think I finally found the correct related issue :)

Actions #19

Updated by Oliver Hader over 6 years ago

  • Target version set to 9.2

Thx for digging deeper into this issue.

Actions #20

Updated by Gerrit Code Review over 6 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

Actions #21

Updated by Susanne Moog over 6 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 ;)

Actions #22

Updated by Susanne Moog over 6 years ago

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

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF