lloc / Multisite-Language-Switcher

WordPress Plugin: Multisite Language Switcher
http://msls.co
GNU General Public License v2.0
134 stars 41 forks source link

Autocomplete search input broken in latest version #352

Closed hatsumatsu closed 3 months ago

hatsumatsu commented 4 months ago

Describe the bug After the latest updates, the experimental autocomplete search widget to connect posts is broken. When typing in the input field, no posts are shown.

To Reproduce Steps to reproduce the behavior:

  1. Enable the experimental autocomplete inputs feature
  2. Edit a post
  3. Search for a post title in the connected sites
  4. No posts are returned

Environment (please complete the following information):

Fix After some debugging it seems that in the suggest() method, query vars are retrieved from the GET object, though the autocomplete request method ist POST.

https://github.com/lloc/Multisite-Language-Switcher/blob/5e89e49637cfbf8e7e97a50b7fef51c28ed78229/includes/MslsMetaBox.php#L20

Switching from INPUT_GET to INPUT_POST in this method fixes the bug.

lloc commented 3 months ago

It looks good to me. Please, send a PR.

hatsumatsu commented 3 months ago

It looks good to me. Please, send a PR.

https://github.com/lloc/Multisite-Language-Switcher/pull/353 here we go