Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
API page: http://api.drupal.org/api/drupal/modules--node--content_types.inc/functi...
> $type (optional) The machine name of the node type when editing an existing node type.
It's obviously not a machine name if you can do this with it:
if (!isset($type->type)) {
// This is a new type. Node module managed types are custom and unlocked.
$type = node_type_set_defaults(array('custom' => 1, 'locked' => 0));
}
Comment | File | Size | Author |
---|---|---|---|
#19 | content_types-doc-1350892-19.patch | 604 bytes | nit3ch |
#15 | content_types-doc-1350892-15.patch | 559 bytes | nit3ch |
#9 | content_type_doc_1350892.patch | 547 bytes | nit3ch |
Comments
Comment #1
jhodgdonGood point. Needs a patch, should be good novice project.
Comment #2
surendramohan CreditAttribution: surendramohan commentedWould come up with the patch for this.
Comment #3
GRO CreditAttribution: GRO commentedI'm a novice and want to help out but need some clarification on where the patch needs to be applied. Is it solely the API documentation that will need to be patched to remove the reference to a machine name and how is that done?
Comment #4
jhodgdonThis page has a guide:
http://drupal.org/node/144223
Comment #5
xjmsurendramohan, are you still looking into this issue? If not we'll unassign it in a day or to so that others (like GRO) can work on it. Thanks!
Comment #6
frankbaele CreditAttribution: frankbaele commentedI want to work on this
Comment #7
jhodgdonfrankbaele: Please go ahead and assign the issue to yourself, since the other person did not respond since January to an "are you working on this" inquiry. Thanks!
Comment #8
frankbaele CreditAttribution: frankbaele commentedComment #9
nit3ch CreditAttribution: nit3ch commentedhi ,
Here is the patch.Sorry if i should wait for frankbaele's ptach.
thanks
Comment #10
jhodgdonRE #9 -
- It would have been slightly more polite to ask frankbaele if he was going to provide a patch, rather than just taking over the issue. And you should assign the issue to yourself if you plan to work on it.
- When attaching a patch, you need to set the status to "needs review", to alert both people and the testing bot that there is a patch to review.
- The patch does not actually fix the problem -- see original issue report. The problem is that $type is not a string at all, it's an object.
Comment #11
nit3ch CreditAttribution: nit3ch commentedapologize. Will take care of it next time :)
Comment #12
jhodgdonok. So nit3ch are you planning to make a replacement patch that fixes the problems? If so, please assign the issue to yourself and proceed. :)
Comment #13
nit3ch CreditAttribution: nit3ch commentedhi,
ya i will love to fix this .From the above discussion , what i concluded that $type is not a machine name ,its a object , so the possible solution may be .
> $type (optional) The object of the node type when editing an existing node type.
Comment #14
jhodgdonHow about "An object representing the node type, when editing an existing node type." -- I think that would be a bit clearer.
Comment #15
nit3ch CreditAttribution: nit3ch commentedyeah sounds good to me too. Here is the patch against it
thanks.
Comment #16
jhodgdonOK, but it needs to have lines that wrap at 80 characters at most (including spaces at the beginning of the line).
Comment #17
nit3ch CreditAttribution: nit3ch commentedhi,
i countet it using charctercounttool_dot_com , it is 78 char in first line.
please correct me if i am wrong.
thanks
Comment #18
HazaThis "tool" does not count the white spaces there are at the begging of the line.
Comment #19
nit3ch CreditAttribution: nit3ch commentedhere is the patch with correction.
Comment #20
HazaSeems now ok for me.
Comment #21
jhodgdonThanks! Committed to 8.x/7.x.