[BUGFIX] pages.content_from_pid suggest wizard should not suggest itself 97/58597/4
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 09:53:40 +0000 (11:53 +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/58597
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Tested-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
typo3/sysext/core/Configuration/TCA/pages.php

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