changing product name/structure - Plone 3.3x

3 messages Options
Embed this post
Permalink
Sean K () changing product name/structure - Plone 3.3x
Reply Threaded More More options
Print post
Permalink
I am having a problem with renaming product.  I removed the old product in
the Products folder and created a new product with same type name which
installs fine and works.  The only problem is that the old existing content
is not getting associated with new product with the same content type.  When
I try to view existing content I get the error that <My_Thing at broken>
I also get the error in my log file:
WARNING OFS.Uninstalled Could not import class 'My_Thing' from module
'Products.MyThing.My_Thing'

A little background:
I have migrated a site from plone 2.5.5 to plone 3.3x
I thought I would restructure the old plone 2.5.5 product I am using at the
file system level by basing it on an existing product I created with uml
tool which works in plone 3.

old product structure:
Products/MyThing/My_Thing.py
  class My_Thing(ATLink):

Other old product class settings:
    archetype_name = 'MyThing'
    meta_type = 'My_Thing'
    portal_type = 'My_Thing'
    typeDescription = 'MyThing'

new product structure:
Products/MyOtherThing/My_Thing.py
  class My_Thing(Location, ATLink):

So I must be missing something to be able to remove the old product
completely so that existing content related to new product.  I looked at the
portal_catalog for the existing content itself and nothing is getting stored
in there other than prtal type names (no product).



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Tom Gross () Re: changing product name/structure - Plone 3.3x
Reply Threaded More More options
Print post
Permalink
Hi Sean,

   persistent objects are stored with their full dotted name in the
ZODB. If you change the name (location) of a persistent object you need
to do a content migration. You may want to look at
http://pypi.python.org/pypi/Products.contentmigration for implementing
your own migration path.

-Tom

On 07.11.09 17:54, Sean K wrote:

> I am having a problem with renaming product.  I removed the old product in
> the Products folder and created a new product with same type name which
> installs fine and works.  The only problem is that the old existing content
> is not getting associated with new product with the same content type.  When
> I try to view existing content I get the error that<My_Thing at broken>
> I also get the error in my log file:
> WARNING OFS.Uninstalled Could not import class 'My_Thing' from module
> 'Products.MyThing.My_Thing'
>
> A little background:
> I have migrated a site from plone 2.5.5 to plone 3.3x
> I thought I would restructure the old plone 2.5.5 product I am using at the
> file system level by basing it on an existing product I created with uml
> tool which works in plone 3.
>
> old product structure:
> Products/MyThing/My_Thing.py
>    class My_Thing(ATLink):
>
> Other old product class settings:
>      archetype_name = 'MyThing'
>      meta_type = 'My_Thing'
>      portal_type = 'My_Thing'
>      typeDescription = 'MyThing'
>
> new product structure:
> Products/MyOtherThing/My_Thing.py
>    class My_Thing(Location, ATLink):
>
> So I must be missing something to be able to remove the old product
> completely so that existing content related to new product.  I looked at the
> portal_catalog for the existing content itself and nothing is getting stored
> in there other than prtal type names (no product).
>
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Maurits van Rees-3 () Re: changing product name/structure - Plone 3.3x
Reply Threaded More More options
Print post
Permalink
Tom Gross, on 2009-11-07:
> Hi Sean,
>
>    persistent objects are stored with their full dotted name in the
> ZODB. If you change the name (location) of a persistent object you need
> to do a content migration. You may want to look at
> http://pypi.python.org/pypi/Products.contentmigration for implementing
> your own migration path.

Or it may be enough to play with sys.modules.  See the __init__.py of
RichDocument: http://plone.org/products/richdocument

--
Maurits van Rees | http://maurits.vanrees.org/
            Work | http://zestsoftware.nl/
"This is your day, don't let them take it away." [Barlow Girl]


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users