[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mtos-dev
Subject:    Re: [MTOS-dev] Stumped by ref($obj) on subclass of MT::Entry
From:       "Mark Carey" <mark () mt-hacks ! com>
Date:       2008-09-22 19:59:10
Message-ID: b8bd436c0809221259q30ce7d53if83161fc55855ee5 () mail ! gmail ! com
[Download RAW message or body]

Okay, I figured it out after dissecting the rebless routine as well as
the related call to MT->models.  It turns out that the MT->models
routine does a regex for an object_type that has been registered that
begins with the datasource name of the "parent" object class.  In this
case, it was looks for any object types that begin with 'entry.'
Earlier today when looking at MT::Core it found the following line in
the object_types registration:

'page'            => 'MT::Page',

That, I missed the th fact that there were actually *two* lines for MT::Page:

 'entry.page'      => 'MT::Page',
 'page'            => 'MT::Page',

And I now I know the purpose of the first one above ;)

After double-registering my custom object in a similar manner, it now
works as desired.

Thanks for all the quick responses and pointers,

Mark

On Mon, Sep 22, 2008 at 3:59 PM, Mark Carey <mark@mt-hacks.com> wrote:
> On Mon, Sep 22, 2008 at 3:40 PM, Kevin Shay
> <mtplugins2007@staggernation.com> wrote:
>> It appears to be MT::Object::_post_load_rebless_object().
>
> Thanks, Kevin, I just found this as well.  Currently trying to
> understand why its not re-blessing my object....
>
_______________________________________________
MTOS-dev mailing list
MTOS-dev@sixapart.com
http://www.sixapart.com/mailman/listinfo/mtos-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic