Database search in 4.6

Skip to first unread message

Stephen Wynn

Sep 1, 2022, 12:37:43 PM9/1/22
to SubjectsPlus
We are migrating from 3.0 to 4.6, and found that the database search in subjects/databases.php no longer works.

Investigating, I found that the search box has changed its method from POST to GET, although databases.php still looks for search terms from POST data,

Investigating further, it looks like the change originates in the CompleteMe class, which changed its method from "post" to "get" between the two versions. What will I break if I just change the method in CompleteMe back to "post"?

Andrew Darby

Sep 2, 2022, 1:25:03 PM9/2/22
Hi Stephen,

Nice detective work!  Switching to POST seems to fix it.  I thought it might break the autocomplete, but it appears to be okay.  I'd check the various instances of the search throughout, and if you don't encounter any problems, let us know and we'll update that class.  (We didn't notice this at HQ because we use a different search on our own SP theme.)


You received this message because you are subscribed to the Google Groups "SubjectsPlus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Stephen Wynn

Sep 2, 2022, 5:34:39 PM9/2/22
to SubjectsPlus
Thanks for this, Andrew. I've investigated some more, and I'm not so sure that editing CompleteMe.php is a good idea, since other pages uses the CompleteMe class without looking in POST data: search.php, for example. I suspect that if I were just to change "get" to "post" in CompleteMe, then that might fix the search in databases.php, but would probably break it in search.php. I'm now thinking that the better solution is to make databases.php look in GET data for search terms, like the 4.6 version of search.php does.
Reply all
Reply to author
0 new messages