Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Data Model Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

IMPORTANT - Extension Methods not available on child class of extended DO -- since... ?


Go to End


1028 Views

Avatar
DesignCollective

Community Member, 66 Posts

27 August 2016 at 5:06am

Hi guys,

I got my hands on an existing site which was setup in 3.1.x. I'd like to understand the nature of the problem. We have a PersonExtension which has some methods and $db additions, let's say the method in question is MyMethod(). We extend "Person" with PersonExtension, all good, and then create a SpecialPerson class extends Person. It used to be (and in fact, on the production server), when we do SpecialPerson->MyMethod(), all works great).

However in our local and dev environments, recently, (possibly?!?) since upgrading Silverstripe -- it now says `[User Error] Uncaught Exception: Object->__call(): the method 'MyMethod' does not exist on 'SpecialPerson'`/

So--- HUH!? :) Any insights? Is this a PHP class isolation thingie or are extensions handled differently since 3.2.x or something? Thank you!