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

FIX Ensure page has extension before calling method #101

Merged

Conversation

emteknetnz
Copy link
Member

Issue silverstripe/.github#199

Fixes https://github.com/silverstripe/recipe-kitchen-sink/actions/runs/8058976456/job/22012645584?pr=55#step:12:73 on silverstripe/recipe-kitchen-sink#55

1) DNADesign\ElementalUserForms\Tests\ElementFormControllerTest::testElementFormRendering BadMethodCallException: Object->__call(): the method 'getSiteRSSLink' does not exist on 'SilverStripe\UserForms\Control\UserDefinedFormController'

Happened because we removed the cwp versionfeed config which disabled versionfeed.

The elemental userforms tests has the controller extension appied by not the page extension appied, so have just added a little defensive programming here to resolve. It's required for a cms 6 build though may as well fix for 4.13

Copy link
Member

@GuySartorelli GuySartorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. I note the commit message suggests you're checking for the extension, but I actually do prefer the way you implemented this (check for the method) which allows developers to add that method themselves in their own extensions.

@GuySartorelli GuySartorelli merged commit 0a17d0c into silverstripe:2.4 Mar 3, 2024
9 checks passed
@GuySartorelli GuySartorelli deleted the pulls/2.4/exists branch March 3, 2024 22:43
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

Successfully merging this pull request may close these issues.

2 participants