-
-
Notifications
You must be signed in to change notification settings - Fork 395
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
Backport 'Fix edit form in intitiatives' to v0.26 #10782
Backport 'Fix edit form in intitiatives' to v0.26 #10782
Conversation
Can you please rebase this PR? There is a conflict because of #10786. |
… backport/0.26/fix-edit-form-in-intitiatives-10724
@alecslupu The tests are failing here. It is trying to call
The problem I believe is that the hash coercer in Virtus does not convert a string into a hash, you can try this in the console (using 0.26):
In 0.27 it works somehow differently with the new attribute system as we don't have this exception happening. |
There are still some issue with the tests when using Virtus.
I investigated the problem a bit and I think there is a problem with the original fix that this is backporting. This would be the proper way to handle the problem where the data is stored in multilingual format but the form only shows the inputs for the current locale: decidim/decidim-proposals/app/forms/decidim/proposals/proposal_wizard_create_step_form.rb Lines 26 to 27 in 4eb9dec
And when saving the record (I believe this is already done in initiatives): decidim/decidim-proposals/app/commands/decidim/proposals/create_proposal.rb Lines 59 to 61 in 4eb9dec
|
@ahukkanen thanks for the input on fixing this. 35d372f fixes the issue |
Thanks @alecslupu but I think we need to do the same change at Why the current code works at decidim/decidim-core/lib/decidim/attributes/hash.rb Lines 25 to 28 in e4f5f83
In the core modules we should should avoid relying on backwards compatibility features. |
🎩 What? Why?
Backport #10724 to v0.26