Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot search for publishers with commas in name #1169

Open
5 tasks done
kattjevfel opened this issue Jul 22, 2023 · 4 comments
Open
5 tasks done

Cannot search for publishers with commas in name #1169

kattjevfel opened this issue Jul 22, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@kattjevfel
Copy link

Steps to reproduce

  1. Add a publisher with a comma (like Seven Seas Entertainment, LLC.) to a series
  2. Click on the publisher name from the series page
  3. Get The active filter has no matches

Expected behavior

Komga should find series from that publisher

Actual behavior

Komga can't find anything

Logs

No response

Komga version

1.2.1

Operating system

Arch Linux

Other details

This metadata was imported via AnisearchKomga, in case you're normally not supposed to be able to even enter commas, and this tool just happened to break everything.

Acknowledgements

  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
  • I have written a short but informative title.
  • I have checked the FAQ.
  • I have updated the app to the latest version.
  • I will fill out all of the requested information in this form.
@gotson gotson closed this as not planned Won't fix, can't repro, duplicate, stale Jul 23, 2023
@gotson gotson added question Further information is requested troubleshooting and removed triage question Further information is requested labels Jul 23, 2023
@gotson gotson reopened this Jul 23, 2023
@gotson gotson added bug Something isn't working and removed troubleshooting labels Jul 23, 2023
@gotson
Copy link
Owner

gotson commented Jul 23, 2023

This is a tricky case. Filters are passed to the backend via query parameters. Query parameters can be passed on different ways in case there are multiple values, either a single parameter with comma separated values a=b,c, or a repeated parameter each with a value a=b&a=c.

Spring is smart enough to handle various cases, however when you pass a single value that is comma separated, it throws the logic off.

If you were to filter on that publisher and another one, it works as expected.

For reference I found other people have the same issue spring-projects/spring-framework#23820 and spring-projects/spring-framework#29411

Seems like it's a Spring problem which won't get fixed, I would need to test some of the proposed workarounds.

@gotson gotson self-assigned this Jul 23, 2023
@gotson
Copy link
Owner

gotson commented Aug 1, 2023

I've spent a decent amount of time today trying to fix this, and unfortunately there is no good solution for the moment. Changing the logic used for splitting parameters with the , would introduce more problems elsewhere.

The best course of action would be to move from a GET request with request parameters to a search object in the body of the request.

@Mahesh-Vemula
Copy link

@gotson Adding below method inside controlled fixed this issue.

@InitBinder
	public void initBinder(WebDataBinder binder) {
		binder.registerCustomEditor(List.class, new CustomCollectionEditor(List.class));
	}

@gotson
Copy link
Owner

gotson commented Aug 9, 2023

@gotson Adding below method inside controlled fixed this issue.

@InitBinder
	public void initBinder(WebDataBinder binder) {
		binder.registerCustomEditor(List.class, new CustomCollectionEditor(List.class));
	}

it tried this but it breaks other stuff

@gotson gotson removed their assignment Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants