Problem/Motivation

I have a search View and I want to change the "Preserve facets while using filters", which has nothing to do with Searchstax. But there's a Searchstax section on the same settings form that is preventing me form updating the setting I want to update.

errors caused by Searchstax module

Steps to reproduce

Try to change a query setting on a View that integrates with Searchstax.

Proposed resolution

The workaround is to enter a bogus username/password combination, which is good enough for the form to validate and save. But I shouldn't have to do that.

Issue fork searchstax-3593329

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

danflanagan8 created an issue. See original summary.

drunken monkey made their first commit to this issue’s fork.

drunken monkey’s picture

Version: 1.10.0 » 1.x-dev
Status: Active » Needs review

Thanks for reporting this problem!
You’re of course correct, this behavior is annoying and doesn’t make any sense. We should just be able to set those two fields to non-required and let the login form (if “Continue” is clicked) complain about wrong login if any fields are left empty.
Implemented in this MR, please give it a try!

danflanagan8’s picture

Would it makes sense to add a new argument to ApiLoginFormTrait::showLogInForm() to allow setting the username and password as not required?

Not sure how often this pattern would be used, but it might be more elegant than following that call with the foreach block.

Either way this looks like it should work. Nice job throwing in the test coverage.

drunken monkey’s picture

@danflanagan8 #5: Good suggestion, thanks. After a bit of consideration, given that this is currently used only once I think I’ll leave the code as-is, though. We can always change this later if it occurs a second time. The code right now might not be the most elegant, but it’s concise enough.

Could you give the MR a try to see if it really works for you? Then I could merge this, making it part of the next release (probably next week).

danflanagan8’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new61.53 KB

I applied the change in the MR to my local and it fixed the problem.

fixed!

The Searchstax fields are no longer required and I can submit my other changes to the form.

Thanks for the fix, @drunken monkey

  • drunken monkey committed 981f5b5a on 1.x
    fix: #3593329 Fixed Views query settings being blocked by SearchStax...
drunken monkey’s picture

Status: Reviewed & tested by the community » Fixed

Great to hear, thanks for testing!
Merged.
Thanks again!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.