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

[BUGFIX] Fix broken manipulateVariablesInPowermailAllMarker for arrays #965

Conversation

kitzberger
Copy link
Contributor

@kitzberger kitzberger commented Feb 9, 2024

Without this patch it's not possible to use manipulateVariablesInPowermailAllMarker to manipulate selected values of an array field such as checkboxes and multiselect.

Additionally it's now possible to access an options label as defined in a fields settings.

Example:

plugin.tx_powermail.settings.setup {
    manipulateVariablesInPowermailAllMarker {
        optinMail {
            my_checkboxes = CASE
            my_checkboxes {
                key.field = value
                # Override label for option 1
                1 = TEXT
                1.value = Override for option value 1
                # Use label for other field option
                default = TEXT
                default.field = label
            }
        }
    }
}

This patch can be backported to 10.7.x too.

Resolves: #956

@mschwemer
Copy link
Collaborator

Hi

I tested it with our test suite. All behaviour tests containing upload fields are broken. Also phpcs and unit tests fail.

If all tests are green for TYPO3 v12 and Powermail v12.4, I will test it again.

TIA

Without this patch it's not possible to use manipulateVariablesInPowermailAllMarker
to manipulate values of an array field such as checkboxes and multiselect.

Additionally it's now possible to access an options label as defined in a fields
settings.

Example:

```
plugin.tx_powermail.settings.setup {
    manipulateVariablesInPowermailAllMarker {
        optinMail {
            my_checkboxes = CASE
            my_checkboxes {
                key.field = value
                # Override label for option 1
                1 = TEXT
                1.value = Override for option value 1
                # Use label for other field option
                default = TEXT
                default.field = label
            }
        }
    }
}
```
@kitzberger kitzberger force-pushed the fix-manipulateVariablesInPowermailAllMarker branch from 99794a8 to e42d09f Compare October 1, 2024 11:53
@kitzberger
Copy link
Contributor Author

@mschwemer, I've updated the PR (now option labels can be accessed too!) and now the tests are green. I think they've failed before due to code changes unrelated to this patch here.

Furthermore I'd like to discus how other field types could be improved as well:

  • country (label should contain the actual countries name, not it's 3-letter iso-code)
  • upload (label should show the original files name, not the obfuscated one)

@mschwemer mschwemer merged commit 7cad76a into in2code-de:master Oct 2, 2024
9 checks passed
@mschwemer
Copy link
Collaborator

@kitzberger Thanks for your suggestions.

Regarding the country field: There is already an issue to use the country API of TYPO3: #852 I hope to bring it into the TYPO3 v13 compatible version.

Regarding the upload field: Yes, I agree with it. Can you open a feature request? It will probably only for v13 also.

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

Successfully merging this pull request may close these issues.

manipulateVariablesInPowermailAllMarker for array fields
2 participants