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

Multiple conditions on one select-field doesn´t work / 403 Error for condition.json #82

Open
DTM-TYPO3 opened this issue Apr 20, 2023 · 1 comment

Comments

@DTM-TYPO3
Copy link

DTM-TYPO3 commented Apr 20, 2023

Hi,

I've created a form with several select fields which all depend on the chosen option from Select1. The conditions are all basically the same structure:

Name: Show SelectX
Target field: SelectX
show
OR
Rule
Name: if option X is selected in Select1
Start field: Select1
contains value
"Bläser/Schlagzeug"

I´ve 18 conditions for this Select1. It worked perfectly when there were just 4 conditions, but after adding a 5th one (same structure), the extension doesn´t seem to work anymore. All fields are displayed that should be hidden by the condition.
I also get a console error in Chrome saying

POST https://www.DOMAIN.de/PAGE/condition.json 403 (Forbidden) jquery-3.2.1.min.js?1493274518:4

With 4 conditions in it, the condition.json file can be found and read. No error occurs.

This project runs under TYPO3 10.4.37
powermail 8.4.2
powermail_cond 8.2.2

Furthermore there´s an error in the system log saying
"PHP Warning: Invalid argument supplied for foreach() in /srv/www/htdocs/public/typo3conf/ext/powermail_cond/Classes/Controller/ConditionController.php line 89"

Maybe that´s a hint?

Thanks in advance and regards
Stefanie

@DTM-TYPO3
Copy link
Author

We´ve found out that the error occurred due to the length of the self-defined variable names for the 18 select fields. Since we probably handle too many fields by conditions in total, this brought the extension to its limit.
We have now named the fields very simply with "w-1" to "w-18" and the conditions are now all working.

For the future it would be desirable to optimize the extension in this respect.

Thanks and greetings
Stefanie

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

1 participant