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

UserDefinedFormController has an hard depedency on a class that might not exist #1198

Closed
erikfrerejean opened this issue Mar 24, 2023 · 1 comment

Comments

@erikfrerejean
Copy link

The \SilverStripe\UserForms\Control\UserDefinedFormController extends \PageController however it is never enforced that there is such a class in existance. If you add the module to an existing site that doesn't provide a \PageController itself the module happily installs but that causes problems down the line.

As the "default" \PageController from silverstripe/recipe-cms (which I assume is the reason the blind dependency exists) is nothing more then an empty shell wrapping SilverStripe\CMS\Controllers\ContentController I believe that it makes sense to have the userforms controller extend that class straight. Any required alterations can be made through an extension if needed.

@GuySartorelli
Copy link
Member

Thank you for taking the time to raise this issue, however PageController is well established as a part of Silverstripe CMS apps - it's a common patter to subclass PageController and Page in modules so that the customisations to those classes apply to the subclasses provided by the module.

I will close this issue now.

@GuySartorelli GuySartorelli closed this as not planned Won't fix, can't repro, duplicate, stale Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants