Early Bird Registration for DrupalCon Atlanta is now open! By registering during our Early Bird Registration window, you’ll save $100. This window ends on 19 January 2025 and will go by quickly, so don’t wait!
I just tried copying the Product node type (created by ubercart) by exporting and then importing it, and changing the Node Name and Type. I got the following error:
An error has occurred adding the content type eventproduct.
Please check the errors displayed for more details.
The thing is, there are no errors displayed, so I don't know where to go from here.
Thanks for any help,
Jugney
Comments
Comment #1
KarenS CreditAttribution: KarenS commentedIf the error was creating the content type, it's something in the regular core content type creation process that went awry, and that's really outside the scope of CCK. There is no API for creating content types and no system to use to tell what will or won't work, so we're limited in what we can do about giving you useful information.
If you exported it from another site, make sure that all modules it uses are available and enabled on the site you're moving it to. It's also possible that it is a 'locked' content type that can't be copied.
I'm not familiar with ubercart, so you might post a question on their forums about exporting and importing their content types to see if it's possible and what, if any, special considerations there are to make it work.
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #3
fp CreditAttribution: fp commentedI haven't look seriously under the hood but I think that content import is looking at the module through which the content type is imported to get the widgets associated with it. Maybe KarenS can confirm this.
If you export a product from ubercart the array will look like this:
uc_product doesn't provide the widgets to correctly import the data.
You should be able to import this changing the 'name', type', 'old_type', 'orig_type' to whatever new content type you want to create (below I have used "book") and by changing the value of the 'module' key to 'node':
Then you can import your new content type, after which you will need to set the content type module back to uc_product:
If you are creating a new product class you will also need to do something like this in your db:
I am just working with this right now, so I can't assure you that it's a recipe to blindly follow and expect consistent results. However, it might help you progressing along with your project...
Comment #4
ergophobe CreditAttribution: ergophobe commentedThanks fp.
It's a bit of an involved process, but it sure beats adding the fields 1 x 1.
A couple of notes:
- you have to use fp's method. You can't add it and then use the Manage Classes interface. It will fail
- you have to change the 'module', but you can leave widgets like 'uc_image' or whatever and that seems to work fine
Comment #5
thirstysix CreditAttribution: thirstysix commentedThanks a lot fp...
Comment #6
jlopez CreditAttribution: jlopez commentedI was able to avoid the issue by creating the product content type through store administration and then applying the CCK import.
Ubercart product content types should be created through 'Manage classes' under 'Products'. Once the content type is create, you have the option of importing your CCK fields as usual through the available export/import process.
Comment #7
guschilds CreditAttribution: guschilds commentedI ran into this issue when duplicating a content type stored in features. Changing 'module' from 'feature' to 'node', similar to the technique described in #3, fixed the errors and allowed for a successful import. There was no need for the other two steps, as those are only relevant to ubercart types.