[BUGFIX] "Illegal mix of collations" in Upgrade Wizard

When directly comparing CAST(... AS CHAR) with a CHAR field (including
VARCHAR and TEXT) whose collation isn't the same as that of the database
connection, MySQL gives an error like this:

> Illegal mix of collations (utf8_general_ci,IMPLICIT) and
> (utf8_unicode_ci,IMPLICIT) for operation '<>'

Wrapping the right side of the comparison in CAST(... AS CHAR) as well
keeps the data unchanged while ensuring that both sides have the same
collation.

Change-Id: Icaec66412d6b6441ae30065ffb92565991e9a1e4
Resolves: #36754
Releases: 6.3, 6.2
Reviewed-on: http://review.typo3.org/32198
Reviewed-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
Tested-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
[BUGFIX] Avoid DB error on writing to log

The writeLog() function of the ErrorHandler tries to log the IP that
caused the error. On CLI there is no IP hence a NULL value is being
tried to insert into the DB, where the DB field is NOT NULL.

Fix this by casting the IP to a string.

Resolves: #61051
Releases: 6.3, 6.2
Change-Id: Id46e97468bf825307258e907811d5f2c77c62161
Reviewed-on: http://review.typo3.org/32257
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
[BUGFIX] Make sure all new files are indexed

If the FAL indexer scheduler task finds a index record with
same content hash as a new found file the file isn't added to the
index if it isn't marked as missing.

This patch changes the indexer so that new files with same
content hash are added when no index record is found for a missing
file with same content hash.

Resolves: #60764
Releases: 6.3, 6.2
Change-Id: Ifb7f9e6f48ba327c958a7aa0e0b71f0575cabdf7
Reviewed-on: http://review.typo3.org/32269
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
Revert "[BUGFIX] Unified maxitems default value for group fields"

Unexpected behaviour. Default of maxitems in now 1 by default
which doesn't work if you need more items. Previously this
was possible. Revert this to have the old working
behaviour again.

Releases: 6.3,6.2
Resolves: #60263
Reverts: #55731
This reverts commit c578d47617f803c9ea167d88000e63a92c13fa93.

Change-Id: Ice5357aecb1969f11c6821cb81824d2d68200717
Reviewed-on: http://review.typo3.org/32284
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
[TASK] Change fetch of maximum version using LEFT JOIN

Currently, the method fetchMaximalVersionsForAllExtensions uses a
subselect to determine the highest available version. This solution is
rather inefficient and incomptabile to DBAL. The query is replaced by
a LEFT JOIN.

Resolves: #60857
Releases: 6.2, 6.3
Change-Id: I7ae3c523259bf260c41080aee269f6df33edb408
Reviewed-on: http://review.typo3.org/32288
Reviewed-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
Tested-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
[BUGFIX] Collect correct information on elements in page

In the page module information on neighboring content elements is
collected while building the page layout. This information must
be remembered for other elements on the page instead of generated
new when rendering each element. This makes sure the move buttons and
edit buttons have the correct URLs.

Resolves: #60199
Releases: 6.3, 6.2, 6.1, 6.0, 4.7, 4.5
Change-Id: I9fec256b145fe8aba229d8b026fba73871942347
Reviewed-on: http://review.typo3.org/32326
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
[BUGFIX] QueryGenerator getTreeList negative ids

When persistence.recursive is configured when using a command controller no
records can be retrieved because the storagePid is negated in the
AbstractConfigurationManager, while claiming all implementations of getTreeList
support negative ids. Using abs() on the id when it is negative fixes this.
Also see the ContentObjectRenderer implementation of getTreeList

Change-Id: I7732290126a83a79204b8224d52a3cd878360e64
Resolves: #60697
Releases: 6.3, 6.2
Reviewed-on: http://review.typo3.org/32331
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
[BUGFIX] Fix call to undefined function when importing t3x

When importing a t3x file that contains files the function
"getFiles" of the object TYPO3\CMS\Core\Resource\Folder is called
which does not exist.

Resolves: #60474
Releases: 6.3, 6.2
Change-Id: Ibc392bced57a85ad6eae333406ff507af7faefd4
Reviewed-on: http://review.typo3.org/32332
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
[BUGFIX] Remove non accessible pages from browse menu

This patch enables the browse menu to skip inaccessible items
for prev and next links.

It makes use of the filterMenuPages method, which is already
applied to any kind of menu. Since it has not been applied
to the sections of the browse menu type, which are actually
menus themselves, inaccessible pages made browsing unusable.

This applies to missing translations as well.

Change-Id: I8779731139785dea72b078567912c96e3ad5c7ca
Resolves: #58792
Releases: 6.3, 6.2
Reviewed-on: http://review.typo3.org/32333
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
[BUGFIX] EM using bad indexes

The extensionmanager uses bad indexes. It is better
to move col repository to the the end of the indexes.

Resolves: #59809
Releases: 6.3,6.2
Change-Id: I0bb8d5cdfc8591bb35485b204ad5e8dafd1b4d16
Reviewed-on: http://review.typo3.org/32334
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
[BUGFIX] Make context menus work with modules

To make it possible to use the module dispatcher
with a click menu item, it is necessary to add
the CSRF token to the URL of the called click menu
functionality.

Resolves: #60635
Releases: 6.3, 6.2
Change-Id: I0b378c3ba4c22f25b10e39950d08568f608decdb
Reviewed-on: http://review.typo3.org/32338
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
[TASK] Missing stdWrap for select.recursive TypoScript property

Processing stdWrap for the select.recursive TypoScript property
has just been forgotten in the original issue #18822 during the
development of TYPO3 4.6.

Change-Id: I34f2ac45e5112fbcc2becf7936f486f0b53d361a
Resolves: #55707
Releases: 6.3, 6.2, 6.1
Reviewed-on: http://review.typo3.org/32209
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
[TASK] Disable notifications

Change-Id: I245db7b621ecd1d994b833da4a18fe1687a437d0
[BUGFIX] Extbase behaviour concerning workspaces

Issue #26732 introduced some behaviour into Extbase that cannot
work on the long-run. The usual behaviour of TYPO3 is "fetch
live, then overlay". Avoiding that chain might lead to
several side-effects.

This change integrates a new property "_versionedUid" than
contains the specific uid of the versioned record (this is
similar to the already existing _localizedUid property).
Besides that, changes of issue #26732 are reverted.

Functional frontend tests are enabled for live and workspace
for all IRRE ForeignField scenarios.

Resolves: #59107
Releases: 6.2
Change-Id: Idc46fb86830bc3d750972adade178cf9c618ece5
[BUGFIX] PageTree cannot select/expand hidden nodes

TYPO3.Backend.NavigationContainer.PageTree.select(64) does not
select the correct page, but tries to determine the correct node
levels, fakes the local node states and reloads the page tree.
One thing that might not be considered there is the fact that
pages are represented in hex-values with a leading "p", thus
the integer "64" with be converted to "p40" as node id.

To overcome this scenario and enable custom handling there,
a new generic method is introduced:
TYPO3.Backend.NavigationContainer.PageTree
	.invokePageId(pageId, callback, allResults);

The methods "selectPageId" and "expandPageId" show how this
is actually used.

Resolves: #60405
Releases: 6.3, 6.2
Change-Id: If24b1a0ec261e9bcf00d214bf10c4b4a0aa5bed5
[BUGFIX] Cannot use slot to modify grid data in workspace module

Using slots in GridDataService does not work since passing
arguments by reference does not work. Since TYPO3 CMS 6.2
it's possible that the SignalSlotDispatcher returns
(modified) arguments.

Resolves: #60926
Releases: master, 6.2
Change-Id: If7f3a782bf8870bfb158c566df01cf2311fce048
[TASK] Integrate collection selection behavior in workspace module

Since TYPO3 6.2 parent-child structures are visualized in
the workspace module. However, this representation lacks
the possibility to select all elements of that accordant
collection by one click.

A new event "holdclick" is integrated that is fired after
holding the mousedown event for 400ms. This event then
leads to have all records of the collection selected.

The regular mousedown (click) behavior still stays the same.

Resolves: #60010
Releases: 6.2, 6.3
Change-Id: I98d26f125428446157294866484f8be7106b0c51
[TASK] Possibility to disable grouping in workspace module

The workspace modules uses the ExtJS component GroupingStore
per default to group and nest version by page path. However,
this behavior get unhandy if all versions of all pages shall
be sorted by a particular column.

A new checkbox "group by path" shall be added to the top
columns menu to individually disable/enable this behavior.
Changes to that state are stored with the preferences of
a backend user for the accordant workspace.

Resolves: #60037
Releases: master, 6.2
Change-Id: I8e9a2f3f14870c90ea5988a0182a54b22762390e
[TASK] Refactor file references relations retrieval

The retrieval of file references in BackendUtility
is currently bound to the thumbCode() method but
is useful for other components as well.

Resolves: #60054
Releases: 6.2, 6.3
Change-Id: Id92bdeaed24d8924285a640f905ffd55db21da4d
[TASK] Add possibility to enable/disable record nesting

Releases: 6.2, 6.3
Change-Id: I548cb1944e2793abed8ac9e210345be95cf3c853