Task #79515

Wrap doesRecordExist in new method

Added by Thomas Hohn over 2 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Start date:
2017-01-27
Due date:
% Done:

100%

TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
Sprint Focus:
Stabilization Sprint

Description

At several places in the Datahandler class a call to doesRecordExist is followed immediately
with at call to BackendUtility::getRecordWSOL which then fetches the record.
Instead we wrap the functionality from doesRecordExist into a new method that returns
the row - with all the permissions checks performed.
Instead of calling BackendUtility::getRecordWSOL we add a new method
recordInfoWithPermissionCheck which returns the row instead of just true/false if
the record exists and is accessible. Afterwards the row is processed with a new method
getRecordWSOLWithRow which processes the just newly processed row.

The makes the flow simpler and saves an saves an sql-query - which will give a performance
enhancement when copying big sub-trees in the TYPO3 backend.


Related issues

Related to TYPO3 Core - Bug #81747: Copying workspace version record fails Closed 2017-06-29

Associated revisions

Revision e22a32e7 (diff)
Added by Thomas Hohn over 2 years ago

[CLEANUP] Wrap doesRecordExist in new method

Wraps the functionality from doesRecordExist
in a new method recordInfoWithPermissionCheck.

The goal is a general cleanup and avoid unnecessary
calls to the database in the case where the actual
record is re-fetched from the database for processing
just after a doesRecordExist call.

Resolves: #79515
Releases: master, 8.7
Change-Id: I76d217a1690ee4b97e28b83f7591ebf8cba18e6e
Reviewed-on: https://review.typo3.org/51447
Tested-by: TYPO3com <>
Reviewed-by: Markus Klein <>
Tested-by: Markus Klein <>
Reviewed-by: Stefan Neufeind <>
Reviewed-by: Susanne Moog <>
Tested-by: Susanne Moog <>

Revision 36d5d336 (diff)
Added by Thomas Hohn over 2 years ago

[CLEANUP] Wrap doesRecordExist in new method

Wraps the functionality from doesRecordExist
in a new method recordInfoWithPermissionCheck.

The goal is a general cleanup and avoid unnecessary
calls to the database in the case where the actual
record is re-fetched from the database for processing
just after a doesRecordExist call.

Resolves: #79515
Releases: master, 8.7
Change-Id: I76d217a1690ee4b97e28b83f7591ebf8cba18e6e
Reviewed-on: https://review.typo3.org/53266
Reviewed-by: Thomas Hohn <>
Tested-by: TYPO3com <>
Reviewed-by: Markus Klein <>
Tested-by: Markus Klein <>

Revision dbe425f9 (diff)
Added by Oliver Hader over 2 years ago

[BUGFIX] Copying workspace version record fails

Copying workspace version records fails in Doctrine DBAL exception due to
using computed properties directly in the database - which do not exist.
This misbehavior has been introduced in issue #79515 which switched to
use BackendUtility:workspaceOL() without further sanitization.

Resolves: #81747
Releases: master, 8.7
Change-Id: Iabc67f9a7375d4246289e50205aac6dc8c750259
Reviewed-on: https://review.typo3.org/53357
Reviewed-by: Markus Klein <>
Tested-by: TYPO3com <>
Reviewed-by: Oliver Hader <>
Tested-by: Oliver Hader <>

Revision c162474a (diff)
Added by Oliver Hader over 2 years ago

[BUGFIX] Copying workspace version record fails

Copying workspace version records fails in Doctrine DBAL exception due to
using computed properties directly in the database - which do not exist.
This misbehavior has been introduced in issue #79515 which switched to
use BackendUtility:workspaceOL() without further sanitization.

Resolves: #81747
Releases: master, 8.7
Change-Id: Iabc67f9a7375d4246289e50205aac6dc8c750259
Reviewed-on: https://review.typo3.org/53357
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
Reviewed-on: https://review.typo3.org/53371

History

#1 Updated by Gerrit Code Review over 2 years ago

  • Status changed from New 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/51447

#2 Updated by Gerrit Code Review over 2 years ago

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

#3 Updated by Gerrit Code Review over 2 years ago

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

#4 Updated by Gerrit Code Review over 2 years ago

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

#5 Updated by Gerrit Code Review over 2 years ago

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

#6 Updated by Gerrit Code Review over 2 years ago

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

#7 Updated by Gerrit Code Review over 2 years ago

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

#8 Updated by Gerrit Code Review over 2 years ago

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

#9 Updated by Gerrit Code Review over 2 years ago

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

#10 Updated by Gerrit Code Review over 2 years ago

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

#11 Updated by Gerrit Code Review over 2 years ago

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

#12 Updated by Gerrit Code Review over 2 years ago

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

#13 Updated by Gerrit Code Review over 2 years ago

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

#14 Updated by Gerrit Code Review over 2 years ago

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

#15 Updated by Gerrit Code Review over 2 years ago

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

#16 Updated by Gerrit Code Review over 2 years ago

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

#17 Updated by Gerrit Code Review over 2 years ago

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

#18 Updated by Gerrit Code Review over 2 years ago

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

#19 Updated by Gerrit Code Review over 2 years ago

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

#20 Updated by Gerrit Code Review over 2 years ago

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

#21 Updated by Gerrit Code Review over 2 years ago

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

#22 Updated by Gerrit Code Review over 2 years ago

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

#23 Updated by Gerrit Code Review over 2 years ago

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

#24 Updated by Gerrit Code Review over 2 years ago

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

#25 Updated by Thomas Hohn over 2 years ago

  • Subject changed from SQL queries can be avoided in DataHandler::doesRecordExist to Wrap doesRecordExist in new method
  • Description updated (diff)
  • PHP Version set to 7.0

#26 Updated by Gerrit Code Review over 2 years ago

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

#27 Updated by Gerrit Code Review over 2 years ago

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

#28 Updated by Gerrit Code Review over 2 years ago

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

#29 Updated by Gerrit Code Review over 2 years ago

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

#30 Updated by Gerrit Code Review over 2 years ago

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

#31 Updated by Gerrit Code Review over 2 years ago

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

#32 Updated by Gerrit Code Review over 2 years ago

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

#33 Updated by Gerrit Code Review over 2 years ago

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

#34 Updated by Gerrit Code Review over 2 years ago

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

#35 Updated by Gerrit Code Review over 2 years ago

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

#36 Updated by Benni Mack over 2 years ago

  • Target version changed from 8.6 to 8 LTS

#37 Updated by Thomas Hohn over 2 years ago

  • Sprint Focus set to Stabilization Sprint

#38 Updated by Gerrit Code Review over 2 years ago

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

#39 Updated by Gerrit Code Review over 2 years ago

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

#40 Updated by Gerrit Code Review over 2 years ago

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

#41 Updated by Gerrit Code Review over 2 years ago

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

#42 Updated by Gerrit Code Review over 2 years ago

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

#43 Updated by Gerrit Code Review over 2 years ago

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

#44 Updated by Gerrit Code Review over 2 years ago

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

#45 Updated by Gerrit Code Review over 2 years ago

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

#46 Updated by Gerrit Code Review over 2 years ago

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

#47 Updated by Gerrit Code Review over 2 years ago

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

#48 Updated by Benni Mack over 2 years ago

  • Target version changed from 8 LTS to Candidate for patchlevel

#49 Updated by Gerrit Code Review over 2 years ago

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

#50 Updated by Gerrit Code Review over 2 years ago

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

#51 Updated by Gerrit Code Review over 2 years ago

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

#52 Updated by Kasper Ligaard over 2 years ago

The positive effect of fixing this is documented in https://docs.google.com/presentation/d/1Pcm8H2nJD_dyj9tqwkXkcKYbCRVCGGFFfk_gVnDhQ5g/edit#slide=id.g1cbe49000b_0_91, which was presented at the TYPO3 Code Sprint in late February 2017.

#53 Updated by Gerrit Code Review over 2 years ago

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

#54 Updated by Gerrit Code Review over 2 years ago

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

#55 Updated by Gerrit Code Review over 2 years ago

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

#56 Updated by Gerrit Code Review over 2 years ago

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

#57 Updated by Gerrit Code Review over 2 years ago

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

#58 Updated by Gerrit Code Review over 2 years ago

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

#59 Updated by Gerrit Code Review over 2 years ago

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

#60 Updated by Thomas Hohn over 2 years ago

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

#61 Updated by Gerrit Code Review over 2 years ago

  • Status changed from Resolved to Under Review

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

#62 Updated by Gerrit Code Review over 2 years ago

Patch set 2 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53266

#63 Updated by Gerrit Code Review over 2 years ago

Patch set 3 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53266

#64 Updated by Thomas Hohn over 2 years ago

  • Status changed from Under Review to Resolved

#65 Updated by Oliver Hader over 2 years ago

  • Related to Bug #81747: Copying workspace version record fails added

#66 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF