@@ -97,6 +97,24 @@ protected function getAvailableActions($actions)
97
97
return $ list ;
98
98
}
99
99
100
+ /**
101
+ * This module does not interact with the /schema/SearchForm endpoint
102
+ * and therefore all requests for these urls don't need any special treatement
103
+ *
104
+ * @return bool
105
+ */
106
+ protected function isSearchFormRequest (): bool
107
+ {
108
+ if (!Controller::has_curr ()) {
109
+ return false ;
110
+ }
111
+ $ curr = Controller::curr ();
112
+ if ($ curr ) {
113
+ return str_contains ($ curr ->getRequest ()->getURL (), '/schema/SearchForm ' );
114
+ }
115
+ return false ;
116
+ }
117
+
100
118
/**
101
119
* Called by CMSMain, typically in the CMS or in the SiteConfig admin
102
120
* CMSMain already uses getCMSActions so we are good to go with anything defined there
@@ -106,6 +124,11 @@ protected function getAvailableActions($actions)
106
124
*/
107
125
public function updateEditForm (Form $ form )
108
126
{
127
+ // Ignore search form requests
128
+ if ($ this ->isSearchFormRequest ()) {
129
+ return ;
130
+ }
131
+
109
132
$ actions = $ form ->Actions ();
110
133
111
134
// We create a Drop-Up menu afterwards because it may already exist in the $CMSActions
@@ -123,6 +146,11 @@ public function updateEditForm(Form $form)
123
146
*/
124
147
public function updateFormActions ($ actions )
125
148
{
149
+ // Ignore search form requests
150
+ if ($ this ->isSearchFormRequest ()) {
151
+ return ;
152
+ }
153
+
126
154
$ record = $ this ->owner ->getRecord ();
127
155
128
156
// We get the actions as defined on our record
0 commit comments