Closed silbinarywolf closed 5 years ago
Sounds reasonable =)
Agreed. This is a big issue on our sites!
Bump. @robbieaverill this and it looks like a couple of other open issues are fixed in 5.2.x-dev it might be worth doing a 5.2.1 tag? Not sure what sort of release cycle userforms is currently following, but I never like doing -dev unless I'm testing stuff.
Hmmmn. It probably would've been released by now if it wasn't marked as a minor change. Looks to me like it's just a bugfix, no breaking changes... I will cherry-pick it back into 5.2 and tag a release over the next few days.
@ScopeyNZ we don't define "bug fixes" based on whether they are breaking changes; breaking changes have to go into new major releases.
If it's a new feature (which this is) then it goes into the next minor release, if it's a bug fix, then it goes into the patch release.
Sorry I assumed it was a bug fix from reading the context not the label. It seems a bit broken to me. I won't cherry-pick then, but I think there's a good case for treating this as a patch bug fix.
Yeah fair this should be a minor version bump. I smashed out that reply without putting much thought into versioning. Happy to wait on a proper release.
Is there any ETA on a minor release? There's a handful of commits ready to go into one now by the look of it.
@stephenmcm most likely in the next week or two
@robbieaverill did this ever get fixed?
@tardinha Yes, in 5.2.1
it sounds like.
Thanks for the bump.
Cancel that sorry @tardinha - looking at the change logs for the releases, looks like it finally made it out in 5.3.0
@NightJar do you know if this relies on any particular version of elemental?
We have 5.3.0 already running with SS 4.2.4 with elemental 3.x, and forms aren't showing.
Oh, no sorry, I just read back on this comment thread. It seems I was too hasty to close :)
For anyone following along at home...
SilverStripe\UserForms\Control\UserDefinedFormController:
disable_form_content_shortcode: true
The important part of the above snippet (thanks @tardinha ) is that there also needs to be an After
header to ensure the setting is not then overwritten by the userforms included configuration:
app/_config/testforms.yml
:
---
Name: testforms
After: userformsconfig
---
SilverStripe\UserForms\Control\UserDefinedFormController:
disable_form_content_shortcode: true
This fix is however limited to project wide configuration, and is not configurable per subclass for reasons I was unable to uncover (in my testing, it is entirely possible I had misconfigured something). But the fix in userforms 5.3.0 does work.
Please note the following steps were taken on a project with which I have very little familiarity.
The problem (pre-investigation) I have the UserDefinedForm module and Elemental installed. My UserDefinedForm.ss template looks like the following:
However, the $Form is refusing to render and I initially had no ideas on why that wasn't working.
The problem (post-investigation) So after digging into the code of
UserDefinedFormController
, I deduced that theindex
action is blanking out the "Form" property, because $Content defaults to having "$UserDefinedForm" when you create the page.EDIT: If you don't know, the $Content field is completely removed / hidden in the CMS when you have Elemental installed. This made discovery of this problem tough!
The proposed solution Add a config that disables the blanking out of the "Form". Modules like Elemental or Blocks could enable this OOTB.
ie.
Why not use Elemental UserForms?