Closed (fixed)
Project:
Webform Default Fields
Version:
6.x-1.1
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Aug 2011 at 21:37 UTC
Updated:
12 Oct 2011 at 14:31 UTC
Jump to comment: Most recent file
Comments
Comment #1
Angerslave commentedCan't reproduce this. Please, provide more info. Is there other modules? Didn't any code fixes in this or webform module? May be something other unusual?
Thanks.
Comment #2
narhir commentedJust wanted to let you know that I have exact same problem with this, to explain the problem in more details.
1. I enabled webform
2. I enabled Webform Default fields
3. I tried to create some "webform" content
4. Then I went to "webform settings" I enabled "webform" on my custom content type called "job applications"
5. I noticed on default fields page for "job applications" error on line 52 (but still I tried to add new component)
6. After trying to add new component it redirected me to "Cant fint his page 404" and give one more error beside 52:
warning: Invalid argument supplied for foreach() in /var/www/narhir/sites/all/modules/webform/includes/webform.components.inc on line 302.
any ideas how to solve this ? - thank you in advance
Comment #3
Angerslave commentedHave you tried to flush caches after enabling webform for custom content type?
Comment #4
narhir commentedYes, I tried but it didnt helped.
Im on irc also, my nick is Narhir if you have any other quick questions,
Thank you for trying to help us out.
One more thing that I noticed after trying to "add default fields" it creates somekind of empty node whichout title or.. basically anything, and to delete this node you have to add title to it.. only then it is possible.
Im attaching screenshot that explain it:
http://i56.tinypic.com/15himah.png
Comment #5
cyborg_572 commentedIt's supposed to do that. The module attaches the default fields to that node, and then does whatever it can to hide it. When you make a new node, it clones the fields from that "master node"
If you delete that node, then I'm guessing you won't be able to add or create default fields.
Although... the node's not supposed to show up at admin/content/node...
Comment #6
Angerslave commentedSolved by private messages.
Comment #7
vthirteen commentedcould you please share the solution? thanks!
Comment #8
Angerslave commentedActually, Narhir created new content type and repeated same step for it, and all worked. I think it's related with described before "master node" system, which is pretty fragile, so simply deleting it may brake this functionality. I'll think about this cases when I'll have enough time and implement it in the module. For now I can recommend to flush cache after enabling webform for content type, which will lead to appropriate master node creation and not to delete master node, which actually should be hidden from nodes list.
Comment #9
damienmckennaFYI the node will show on admin/content because the module doesn't do anything to stop it showing.
Comment #10
loze commentedFor me this was due to my webform enabled content type having an underscore in it.
adding
$content_type = str_replace('-', '_', $content_type);after line 99 fixed this for me.
Comment #11
8bitplateau commentedi had a problem with this module in that after a while it lost its default fields and when i tried to create new ones it 404'd, in fact what had happened is that I didn't know how the module worked [it wasn't obvious] and I found a piece of rouge content in my content list with no title name! and deleted it, so when I went back to the module admin page it get lost. When i realised this I reinstalled the module, created the default fields [which creates a master node], found it in the content list with no title and renamed it Master Webform so I didn't delete it again. thought that might be of help to some one.
Comment #12
cyborg_572 commentedSo I've come up against this issue, and of course it's in the middle of crunch time. It seems to happen (in my case anyway) when the NID of the master node is known, but the node doesn't actually exist.
I've come up with a quick-and-dirty patch that checks if the node actually exists while loading the default fields configuration page, and makes a new one if it doesn't. I find I need to go to that page, and then refresh before the error goes away.
I think ideally there would be an option on the webform settings page to repair any missing container nodes, but this is working for me right now.
EDIT: I figured out what caused this for me. I used Devel's "Generate Content" with the "Delete all content" option enabled. Bye-bye master node.
Comment #13
Angerslave commentedAll code patches added to 1.3 version. Thank you.