[BUGFIX] pages.content_from_pid suggest wizard should not suggest itself 13/58613/2
authorJosef Glatz <josefglatz@gmail.com>
Tue, 9 Oct 2018 03:51:46 +0000 (05:51 +0200)
committerTymoteusz Motylewski <t.motylewski@gmail.com>
Thu, 11 Oct 2018 10:16:25 +0000 (12:16 +0200)
Make it impossible to select the page you are currently
working on within the suggest wizard result set.

In addition, the suggest has been improved to search also in the
following fields of page records:
* nav_title
* alias
* url

Releases: master, 8.7
Resolves: #86600
Related: #54867
Change-Id: Ifce04fc5f01b5585f2320901b56be8b9970d4762
Reviewed-on: https://review.typo3.org/58613
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Tested-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
typo3/sysext/core/Configuration/TCA/pages.php

index 1d1321b..ed02124 100644 (file)
@@ -545,6 +545,12 @@ return [
                 'size' => 1,
                 'maxitems' => 1,
                 'minitems' => 0,
+                'suggestOptions' => [
+                    'default' => [
+                        'additionalSearchFields' => 'nav_title, alias, url',
+                        'addWhere' => ' AND pages.uid != ###THIS_UID###'
+                    ]
+                ],
                 'default' => 0
             ]
         ],