[TASK] Rename escapeJsValue and make it context specific

The stdWrap property escapeJsValue actually encodes the
content and should thus be called
encodeForJavaScriptValue. Also the value must be
enclosed in quotes to prevent it from being used outside
the target context of string values in JavaScript.

Releases: 6.2
Resolves: #57107
Documentation: #57108
Change-Id: Id5f850d36a87d71ca80eb58e3359ddacdd5b655e
Reviewed-on: https://review.typo3.org/28571
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
[BUGFIX] Show clipboard if it contains elements

On empty pages no page content is rendered at all. This patch brings the
clipboard back, if it contains elements so you can check those on the
empty pages. Besides the drawFooterHook is shown again on empty pages.
this isn't set in the core itself and extension authors should be able
to choose if the content should be visible on empty pages.

Resolves: #57062
Releases: 6.2
Change-Id: Ie7bd6fda730e801b285d7876a1eff39c3ba1eff0
Reviewed-on: https://review.typo3.org/28603
Reviewed-by: Stefan Froemken
Tested-by: Stefan Froemken
Reviewed-by: Frans Saris
Tested-by: Frans Saris
[BUGFIX] Invalid HTML for the top toolbar in Backend

Additional attributes must be concatenated with a leading blank
space in order to get valid HTML content.

Fixes: #57127
Releases: 6.2
Change-Id: Iac0cf3033af37efd8e1a8efeb777083503166c5c
Reviewed-on: https://review.typo3.org/28587
Reviewed-by: Andreas Fernandez
Tested-by: Andreas Fernandez
Reviewed-by: Eric Chavaillaz
Tested-by: Eric Chavaillaz
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
[BUGFIX] First install lists directory errors

For a first installer the directory structure is empty and the
first step will try to create it. We do not need to show these
as errors to the user, only if the root directory cannot be
written.

To achieve this we raise "Warnings" instead (which are
not shown in first step). To keep the Folder Structure menu
item on the left menu in the Install Tool showing a red badge
for non existing directories, we change this to also include
Warnings.

Resolves: #57152
Releases: 6.2
Change-Id: Idd628ecdf946f9befdb7fefd7a9bb7bccc175c2b
Reviewed-on: https://review.typo3.org/28605
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Wouter Wolters
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
[BUGFIX] Mitigate race condition on cache flush

When file caches are flushed, the cache directory
is also deleted.

Now when a second request comes in and creates
the caches it happens that the cache directory of
a given cache is still there for this cache when
calling setCache in the SimpleFileBackend,
but is deleted by the first request afterwards.

Now the cache directory for the second request
does not exist and setting cache entries will fail.

Mitigate this by immediately recreating
the cache directory.

Resolves: #57136
Releases: 6.2
Change-Id: I3c4c5c63c6c754447549285d9718798272f9e585
Reviewed-on: https://review.typo3.org/28594
Reviewed-by: Ernesto Baschny
Reviewed-by: Thomas Maroschik
Reviewed-by: Pascal Dürsteler
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[CLEANUP] Cleanup code style in PageLayoutView

* Cleanup code style
* Fix code issues like forgotten return values

Resolves: #53539
Releases: 6.2
Change-Id: Iec21bbb118d15e46bb464389d6a7bf3661b007a5
Reviewed-on: https://review.typo3.org/25295
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Pascal Dürsteler
Tested-by: Pascal Dürsteler
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[BUGFIX] Test follow-up to #57152

Fix a failing unit test after change c23414d5a73

Change-Id: I427663a1a528b24a0e63d2fc9ed2a6371902a4f4
Resolves: #57159
Related: #57152
Releases: 6.2
Reviewed-on: https://review.typo3.org/28611
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
[BUGFIX] Form Wizard styling fix (UL/OL)

Resolves: #57126
Related: #55810
Releases: 6.2
Change-Id: Iea0e324b6942ec90a8da387a28ff0e7d926d63f8
Reviewed-on: https://review.typo3.org/28585
Reviewed-by: Marcin Sągol
Tested-by: Marcin Sągol
Reviewed-by: Pascal Dürsteler
Tested-by: Pascal Dürsteler
Tested-by: Christian Kuhn
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[TASK] Allow FrontendContentAdapter to be disabled

The FrontendContentAdapter transforms tt_content and pages records
within cObject to the format which they have been stored in in pre
6.x installations, so probably existing legacy TypoScript config
can deal with the same data.

This patchset introduces an AllConfiguration flag allowing to disable
that service. For new installations the service is disabled by default,
upgrading installations have the service enabled.

Resolves: #54979
Releases: 6.2
Change-Id: I254f5c170c3e6a9f5ee214c0fe0e7a58e080cf34
Reviewed-on: https://review.typo3.org/26807
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Alexander Stehlik
Tested-by: Alexander Stehlik
Reviewed-by: Stefan Neufeind
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
[!!!][SECURITY] Allow first install only with FIRST_INSTALL file

It was previously possible to access the install tool
by using a specially crafted URL, which caused
the install tool enable file check to fail.

As there was no easy solution to solve this issue,
we now introduce the need to create a file on first
install.

So in the installation directory the following must
be present:

d typo3
f index.php
f FIRST_INSTALL

After the installation the file will be removed.

Resolves: #55387
Releases: 6.2
Change-Id: I583581f18b939ba032950451bab17ac20131683b
Reviewed-on: https://review.typo3.org/28612
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[WIP][FEATURE] Skip access check for content_from_pid

This patch introduces a new config option called
config.content_from_pid_skipAccessCheck.

If this option is TRUE no access check will be performed for the
page from which the contents should be displayed.

Resolves: #57079
Change-Id: Ib2bf94674b136c09424a5adf7b8000bb5d6ba634
[BUGFIX] Use last result line of identify command

In GraphicalFunctions::imageMagickIdentify() the last line returned by
the executed command will be used as result.

This prevents the system from using possible error messages printed
before the actual result for further processing.

Resolves: #56574
Releases: 6.2
Change-Id: Ic179e0b68c7fa9a4f0f4b2342cb381c54fb740b9
[TASK] Unify data for jump URL hash generation

The jump URL generation is unified and moved to a new JumpUrlUtility
class. All methods in the ContentObjectRenderer are now using the same
method for creating jump URLs.

The handling of file and directory names with special characters is
improved and FAL file records with special characters in their file names
will also be URL encoded.

Additionally Unit Tests are added to verify the jump URL function.

Resolves: #52156
Releases: 6.2
Change-Id: I7d2d8cec005aae56a118850071ca669ef9740c9d
[BUGFIX] Correct order of key / field deletion

Prevent a SQL error when deleting a key and the field belonging
to the key in the install tool at the same time.

Therefore the order for deleting keys and fields is changed from
field first and key second to key first and field second.

Resolves: #50450
Releases: 6.2
Change-Id: I30aff6ea6c2bf01dec6197eec8fd3aa7306cfcbb
[BUGFIX] Prevent exclude field mixup in FromEngine

Use a local variable for storing the excluded fields in the
FormEngine to prevent the configuration from being overwritten
by the inline form element renderer.

Fixes: #47359
Releases: 6.2, 6.1, 6.0, 4.7, 4.5
Change-Id: I5a7a2de16d767f854b4d3f89d599deec28266092
[TASK] Reusable getCategoryFieldsForTable itemsProcFunc

Allow the usage of the method
\TYPO3\CMS\Core\Category\CategoryRegistry->getCategoryFieldsForTable
that can be used as itemsProcFunc for select fields in the TCA in
multiple context by introducing a new categorizedTable configuration key
in the config section of a column in the TCA.

This configuration key can either consist of a single string containing
the name of the table or a configuration array to define additional
conditions that need to be true so that a configured table is used.

Resolves: #53045
Releases: 6.2
Change-Id: I128cbeb6747a8f83e68cdaaaafbc3ab5901353d4
[BUGFIX] Type check fix in linkhandler link type

To determine if a link should by handled by the linkhandler link type
in the linkvalidator the "type" entry in the $value array will be
checked instead of the $type variable which is always empty.

Resolves: #38639
Releases: 6.2
Change-Id: I8183bfca0e4662518063f0d3ec9ba6bab0ff58bf
[FEATURE] Provide TSConfig to link checkers

The currently active TSConfig for the linkvalidator will be passed
to the link checker instances if they implement the required
setTSConfig() method.

Resolves: #54518
Releases: 6.2
Change-Id: I59d1de5fb3f818d340f499260589edf9a45d3148
[FEATURE] Report links to disabled linkhandler records

A new TSConfig setting is introduced to mod.linkvalidator that is called
linkhandler.reportHiddenRecords.

If this setting is enabled an error will be triggerd in the linkhandler
link checker of the linkvalidator Extension if a linked record is not
enabled.

Resolves: #54519
Releases: 6.2
Change-Id: Ib95cff1f9bdc67b0636cf38e6d9f33a8cbbdff75
[BUGFIX] No invalid TSConfig usage in linkvalidator

To display the linkvalidator error messages for linkhandler link types
the name of the linked table is read from the TCA instead from Page
TSConfig from a hardcoded page UID 1.

Resolves: #54523
Releases: 6.2
Change-Id: I165813a03cd4574c20981e35a9e53cfdeacfc421