Hello,
I have problems to get the 7.x-1.x-dev version to work. What I want to do.
I have two node types depend on roles "Gallery (admin)" and "Gallery image (admin)". I want that there is an default picture when the gallery is created. There is also a "normal" node reference. So when the gallery is created I can add pictures witch have an reference to the gallery.
What I have done:
- I create a node template with a default picture named "Gallery image (admin) 1 ANR_TEMPLATE" and make it unpublished.
- I check the settings under "admin/config/content/autocreate". The template token is named "ANR_TEMPLATE" and the suffix to append to title of cloned node have the value "Gallery (admin)". I uncheck the " Reset publishing options of cloned node to defaults for Gallery (admin)." checkbox an save it.
- The next step was to create a ANR-fiels in the "manage field" settings in the Gallery node "Gallery (admin)" and name it "gallery_image_admin" (the mashine name of the "Gallery image (admin)" node.
Now when I create a Gallery node the module creates a image node but this node is not referenced to the Gallery node witch I created.
Did I missunderstod something?
Best regards
Frank
Comments
Comment #1
sunset_bill commentedI think what's missing is in #3 in the documentation. The name of your field needs to be the same as the name of the content type of your template node, not the machine name of the template node. What's the content type of the "Gallery image (admin)" node?
Comment #2
fraweg commentedHello,
Thanks for your answer.
I have two content (node) Types:
- "Gallery (admin)" with the machine name: "gallery_admin"
- "Gallery image (admin)" with the machine name: "gallery_image_admin"
The name of the template with a default picture is:
"Gallery image (admin) 1 ANR_TEMPLATE"
The ANR reference field is created in the the content (node) type "Gallery (admin)"
So the field should named "Gallery image (admin)" ?
When I do this I have the same results :-(
Any Idea?
Best regard
Frank
Comment #3
sunset_bill commentedIt looks like the field name (not label), should be gallery_image_admin.
Comment #4
fraweg commentedHello,
thanks for your support.
You could see what I have done in the screenshot "pic1.png".
The result is what you see in the "pic2.png". There is a gallery with no picture. And there is a picture witch is not referenced to the gallery.
Edit: I also make screenshots from the other settings.
Best regards
Frank
Comment #5
fraweg commentedComment #6
sunset_bill commentedThat all looks right. What is the field setting in Manage Display? Make sure it's not hidden there.
Another possibility is that the anr_clone_node function, which is a slight modification of the clone_node funtion from the clone module, removes image attachments. That could be why you're getting a gallery with no images. To turn that off, try commenting out line 345 in autocreate.module:
Then try creating a new Gallery image (admin) node. Let me know how that works.
thanks,
SB
Comment #7
fraweg commentedHello,
This was the problem. I user display suite and the field was not set to visible by default. After I add this there is an link and it works. But when I set it to the "full view" I have this error:
Notice: Undefined index: body in theme_autocreate_formatter_full_teaser() (line 281 of /.../sites/all/modules/autocreate/autocreate.module).Best regards
Frank
Comment #8
sunset_bill commentedThe full and teaser views are currently coded to only output node body. Can you send me the Field UI view of your gallery_image_admin content type so I can see what fields are in there?
Comment #9
sunset_bill commentedLatest dev version (just pushed) changes output for display type Full to use drupal_render of the entire node, instead of just the body HTML, so it should now be picking up all fields and not complain if the referred type doesn't have a body.
Comment #10
fraweg commentedHello,
thanks for your fast very good support! I think I understand now the work flow of your module. So I think this is not the right for me. I need a node from the node-reference module. Otherwise this is not usable in views (two relations) for me.
I have done this with rules like in this link:
http://drupal.stackexchange.com/questions/21183/rule-to-autopopulate-nod...
Maybe someone will do it in the same way.
I have still one problem when I uninstall your module.
The Title in the image node type still calls "Title ANR_TEMPLATE"
Can you tell me how I can change this?
Best regards
Frank
Comment #11
sunset_bill commentedThe cloned node is going to be created with a title , where the suffix is what's set on the configuration page. If you don't need the template anymore, you can just edit it to change the title. The module just needs that suffix to select potential references for when you're setting up the field in a content type.
cheers,
SB
Comment #12
sunset_bill commented2 weeks, no activity