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

Sorting does not (fully) work for selection of single records #421

Closed
responseinformationsdesign opened this issue Sep 19, 2022 · 4 comments

Comments

@responseinformationsdesign

TypoScript setting "plugin.tx_ttaddress.settings.sortBy" is totally ignored even if flexform value of settings.sortBy is set to default.

If flexform value of settings.sortBy is set to default records are displayed in the order they were added (something I would expect for flexform value "Manual sorting [sorting]).

@Hawkeye1909
Copy link
Contributor

I just experienced the same thing. I think the TypoScript setting is ignored because the value of the "Default" option in the flexform is not empty (it's "default"). However, the TypoScript utility only overrides empty fields. So there either has to be an exception for the sortBy field or the value should be ""...

@georgringer
Copy link
Contributor

so who wants to do a PR?

@georgringer
Copy link
Contributor

fixed it. @Hawkeye1909 wanna do a test and afterwards I would do a release

@Hawkeye1909
Copy link
Contributor

Hawkeye1909 commented Jan 19, 2023

Tested it and it works here. If you do a release, could you please do one for v6 as well?

EDIT: Sorry, wrong usecase. Actually there's an error in your changes:
($previousData['sortBy'] ?? '' === 'default')
should either be
($previousData['sortBy'] ?? '') === 'default'
or
(($previousData['sortBy'] ?? '') === 'default')

Hawkeye1909 added a commit to Hawkeye1909/tt_address that referenced this issue Jan 19, 2023
georgringer pushed a commit that referenced this issue Aug 28, 2023
* Fix check for sortBy field

See comment here: #421 (comment)

* Update TypoScript.php

StyleCI fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants