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

Deprecation: #54152 - Deprecate arguments of BackendUtility::getPagesTSconfig #948

Closed
sabbelasichon opened this issue Nov 4, 2019 · 1 comment · Fixed by #1621
Closed

Comments

@sabbelasichon
Copy link
Owner

Deprecation: #54152 - Deprecate arguments of BackendUtility::getPagesTSconfig

https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/9.0/Deprecation-54152-DeprecateArgumentsOfBackendUtilityGetPagesTSconfig.html

.. include:: ../../Includes.txt

=============================================================================

Deprecation: #54152 - Deprecate arguments of BackendUtility::getPagesTSconfig

=============================================================================

See :issue:54152

Description

===========

:php:BackendUtility::getPagesTSconfig($id, $rootLine = null, $returnPartArray = false) allowed the following arguments:

  • :php:$id: This argument was and still is required. It's the id of the page the TSconfig is fetched for

  • :php:$rootLine: This argument was optional and allowed to use that method with a custom rootline. That argument is deprecated now.

  • :php:$returnPartArray: This argument was optional and allowed to return the TSconfig non parsed. That argument is deprecated now.

Impact

======

Calling :php:BackendUtility::getPagesTSconfig with $rootline and/or $returnPartArray being different than their

default value, will write a deprecation log entry and will stop working in TYPO3 v10.

Affected Installations

======================

All installations that call :php:BackendUtility::getPagesTSconfig with :php:$rootline and/or :php:$returnPartArray being

different than their default value.

Migration

=========

Calling :php:BackendUtility::getPagesTSconfig with just the :php:id argument still behaves the way it does.

It's the most common use case and there's no migraton needed.

If you called :php:BackendUtility::getPagesTSconfig with :php:$returnPartArray being :php:true in the past,

you should now call BackendUtility::getRawPagesTSconfig. You will get the non parsed TSconfig, just like before.

If you called :php:BackendUtility::getPagesTSconfig providing a custom rootline via :php:$rootline in the past,

you should now call :php:BackendUtility::getRawPagesTSconfig($id, $rootLine = null) with your custom rootline

and parse the returned TSconfig yourself, just like :php:BackendUtility::getPagesTSconfig does.

.. index:: Backend, TSConfig, PHP-API, NotScanned

@sabbelasichon
Copy link
Owner Author

The part with the custom rootline will not be fixed. The part with the returnPartArray can be fixed at least if the parameter can be resolved to true.

sabbelasichon added a commit that referenced this issue Nov 20, 2020
- Can only transform calls where rootline is null

Resolves: #948
sabbelasichon added a commit that referenced this issue Nov 20, 2020
- Can only transform calls where rootline is null

Resolves: #948
sabbelasichon added a commit that referenced this issue Nov 20, 2020
- Can only transform calls where rootline is null

Resolves: #948
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant