so im trying to change the existing document type of an existing doc type.
My structure is as follows:
Main Page (main doc type)
Home Page and General Page are 2 document types that has "Main Page" set as the master doc type.
I now want a layer in between called Middle Page , so i want Middle Page to extend from Main Page and Home Page and General Page to extend from Middle Page, i changed the cmsContentType table to achieve most of it. I successfully have Sub page inheriting from Main page, and Home page then inheriting from Sub Page. and i can modify my home page in the tree just fine. However all my General Page nodes in the site tree, gives me a "object reference not set to instance of an object" exception.
Not quiet sure why only this document type is doing that and the other one worked just fine, any ideas?
Depending on the version of Umbraco you are using (ie, I'm currently working on 4.5 support) you could have used my Master Doc Type Switcher package to do the job for you
Looking through my code though, I also make changes to the cmsPropertyData table to map over any properties to the new property types of the master page, so maybe you could start there?
I did actually try your package, however once i run it, all nodes of type General Page dissapear from the tree. What still puzzles me is why Home works just fine and only General Page is broken.
It's a bit difficuilt to suggest anything else at the moment as the "object reference not set to instance of an object" exception is quite vague without context. Is there any other stack trace that might suggest where the exception is being thrown from?
Matt is a great package you have created and a thing i often misses in Umbraco to change the doc structure when the client comes up with a new feature they want and you have to change your structure to make it the best as possible. Is it hardcore programming to change the doc type or is it because some of the Umbraco data is corrupted?
It's not that difficuilt, it's just making sure you tie up all loose ends by mapping over, or deleting any properties you no longer need. I've got plans to extend my project to allow for the extraction of a master doc type from an existing doc type (kinda like refactoring your doc types), but it's just finding the time at the moment.
changing master document type
hi all,
so im trying to change the existing document type of an existing doc type.
My structure is as follows:
Main Page (main doc type)
Home Page and General Page are 2 document types that has "Main Page" set as the master doc type.
I now want a layer in between called Middle Page , so i want Middle Page to extend from Main Page and Home Page and General Page to extend from Middle Page, i changed the cmsContentType table to achieve most of it. I successfully have Sub page inheriting from Main page, and Home page then inheriting from Sub Page. and i can modify my home page in the tree just fine. However all my General Page nodes in the site tree, gives me a "object reference not set to instance of an object" exception.
Not quiet sure why only this document type is doing that and the other one worked just fine, any ideas?
thanks in advance!
Hey Felix,
Depending on the version of Umbraco you are using (ie, I'm currently working on 4.5 support) you could have used my Master Doc Type Switcher package to do the job for you
http://our.umbraco.org/projects/master-doc-type-switcher
Looking through my code though, I also make changes to the cmsPropertyData table to map over any properties to the new property types of the master page, so maybe you could start there?
Matt
Hi Matt,
Thanks for your reply.
I did actually try your package, however once i run it, all nodes of type General Page dissapear from the tree. What still puzzles me is why Home works just fine and only General Page is broken.
im running umbraco v 4.0.4.1
It's a bit difficuilt to suggest anything else at the moment as the "object reference not set to instance of an object" exception is quite vague without context. Is there any other stack trace that might suggest where the exception is being thrown from?
Matt
Matt is a great package you have created and a thing i often misses in Umbraco to change the doc structure when the client comes up with a new feature they want and you have to change your structure to make it the best as possible. Is it hardcore programming to change the doc type or is it because some of the Umbraco data is corrupted?
Hi Anders,
It's not that difficuilt, it's just making sure you tie up all loose ends by mapping over, or deleting any properties you no longer need. I've got plans to extend my project to allow for the extraction of a master doc type from an existing doc type (kinda like refactoring your doc types), but it's just finding the time at the moment.
Matt
Refactoring of doc types sounds just like the thing we need :)
Hi All,
I have the same problem with disappearing content.
I had sth like:
=> Categories
=> Articles
I changed it into:
| => Categories
| ====> Articles
(so now articles inherit from categories)
And the content disappeared in Content section, though it's still accessible through front-end.
I tried to verify the database, but everything seems just fine.
I added new Article to Category, and it's displayed correctly, though the old articles didn't come up.
Tried to refresh the cache as well.
I'm not sure how to proceed with testing, if you have any idea about how I can provide more info to get help please let me know.
I use version 4.0.4.2
Thanks!
Mateusz
is working on a reply...