Problem/Motivation
If set "Custom" in select in page "Caching options", then after saving the view the "Never cache" option is set to select. Seems the problem is only output, because debug shows custom cache sets and works.
Steps to repeat:
1. Create the view
2. Select "Time-based" in Caching
3. Click "Apply"
4. Select "Custom" in Caching options
5. Write quantity seconds in textfield "Seconds"
6. Click "Apply"
7. Save the view
8. Open page "Caching options" in the view
Expected Results:
In select will set "Custom" and will be visible textfield "Seconds"
Actual Results:
In select will set "Never cache" and won't be visible textfield "Seconds".
Proposed resolution
I think the problem is option Custom "knows" about textfield Seconds, and textfield becomes visible at a select Custom. However, textfield don't "knows" about option Custom and the option Never cache sets in select at output form Caching options again after saving view. Need somehow link textfield and option Custom if selected Custom.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | 3024941-13.patch | 2.27 KB | anchal_gupta |
| #3 | with_patch.png | 166.42 KB | Aanal.addweb |
| #3 | without_patch.png | 164.01 KB | Aanal.addweb |
| #2 | the_error_in_output_select_options_in_page_caching_options_after_saving_view-3024941-2.patch | 2.27 KB | asya_asina |
Comments
Comment #2
asya_asina commentedThis patch links textfield and option Custom. Also added cleaning textfield if selected a other option in order that option Custom was not set default.
Comment #3
Aanal.addweb commented@aleanna, Thanks for describing the steps. I followed the same steps to catch the issue you mentioned above. Your patch works well for me & I attached the screenshots for the same.
Comment #4
alexpottThanks for reporting this bug. And describing the steps to reproduce it so other can test it.
In order to commit a bug fix we need an automated to test to prove that we've fixed the bug and ensure that we don't break it again in the future. For more information about writing tests in Drupal 8 see the following links:
Comment #12
amber himes matzI think it would be worth checking if the latest patch in #3233105: Time-based custom caching is broken since configuration expects an integer. fixes the issue described here. If so, we could close this one as a duplicate.
If not, this issue needs to be re-verified, if valid, then the latest patch re-rolled, and then it needs tests.
Comment #13
anchal_gupta commentedRerolled patch against 9.5x. Please review it
Comment #14
smustgrave commentedBrought up in the bugsmash channel it was agreed upon this is a duplicate of https://www.drupal.org/project/drupal/issues/3233105
I'll move over relevant credit to that issue now.