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.
Rules/Trigger/Action and Views Bulk Operations support for Nodetype version 6.x-1.0
Since the .module code is the same for 6.x-1.x-dev they both can be patched.
Comment | File | Size | Author |
---|---|---|---|
#15 | nodetype.patch | 7.28 KB | zeusent |
#11 | nodetype.patch | 845 bytes | zeusent |
#3 | nodetype-bulk-682272-1.patch | 7.22 KB | Anonymous (not verified) |
#1 | nodetype.patch | 7.31 KB | zeusent |
Comments
Comment #1
zeusent CreditAttribution: zeusent commentedHere is the patch for it.
Comment #2
kerberos CreditAttribution: kerberos commentedThis also adds support for changing the nodetype settings to determine which node types a particular content type can be converted to.
-Daniel
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedLittle change, was a problem with the patch folder "/Users/mainuser/Downloads/" etc.
No actual code changed. Thanks for the patch.
Comment #4
asb CreditAttribution: asb commentedThe patch applies cleanly.
Thank you!
When embedding the Action into VBO, I'd prefer if the checks if the content type actually can be changed would happen before it is executed.
Other observations: When trying to change the nodetype of 112 nodes, I hade to raise the php_memory_limit from 150M to 1024M. However, the bulk operation finished fined.
Greetings,
-asb
Comment #5
asb CreditAttribution: asb commentedHi,
when appying the node type change during a normal edit of one node, I'm getting the following error:
The nodetype is configured to "Allow nodes of this type to have their content type changed."
Fatal error = priority "critical".
Thanks & greetings,
-asb
Comment #6
asb CreditAttribution: asb commentedI just tried to save a bunch of "Janode" nodes (an abandoned D5 module which created a own nodetype) by using the VBO plugin (patch from #3); that attempt failed.
After upgrading to D6, the "Janode" node type isn't handled anymore by any module; however, through VBO I can filter out unhandled content types (hoooray!) Since the content type isn't handled, I can nowhere configure it to allow node type changes. Thus the VBO plugin fails; message:
Thus no nodetype was changed.
It'd be really helpful to make the change nodetype setting from #2 optional to gain a little more flexibility.
Thanks & greetings, -asb
Comment #7
kerberos CreditAttribution: kerberos commentedHi.
Sorry, we'll take a look at the error to see what may be causing it. What version of Drupal are you using so we can test it?
As for Janode, this patch is for Drupal 6. Not sure we can support any changes for D5, particularly if we don't know if the maintainer will contribute this patch to the dev. version of this module.
Comment #8
asb CreditAttribution: asb commentedHi Kerberos,
thanks for looking into this!
I'm using Drupal 6.16, and I applied the patch against Nodetype 6.x-1.0 (#4). The patch introduces some new behaviours and causes two problems:
Because of this I'd suggest to change the behaviour a bit:
The problem from #5 is a simple bug; a workaround is to execute a VBO operation on this single node and not to use the node type change pulldown on the node edit form.
However, the patch incredibly enhances this module's power and I hope it'll make it soon into the official code!
Thanks & greetings,
-asb
Comment #9
kerberos CreditAttribution: kerberos commentedHi Asb.
We'll look at the bug in #5. Give me a few days since we are swamped with work.
We are open to making the adjustments you discuss, assuming the module maintainer is willing to accept and add patches along those lines. We don't need those changes and don't have the time to make them unless we are certain they will get contributed to the module.
I am surprised you have an unhandled node type, how did that happen? It might be easier to fix that. :)
-Daniel
Adulmec
Comment #10
ndame CreditAttribution: ndame commentedThanks for your work on this, subscribing
Comment #11
zeusent CreditAttribution: zeusent commentedThe error at #5 seems to be cause by Trigger module not being turned on. This patch makes sure to check that before trying to run the code dependent on that module. I'm still looking in finding a good way to solve your other problem though I have to admin what you suggested seems to be the best way (meaning that an user has to choose which type a node is NOT allowed to be changed to instead of choosing the ones that IS).
I'll get back on this. In the meantime please let me know if the patch solves your #5 problem.
Thanks,
Mihai Fratu
Comment #12
asb CreditAttribution: asb commentedHi,
thanks for the new patch!
Appying nodetype.patch from #11 against a fresh nodetype-6.x-1.0 fails:
Contents of nodetype.module.rej:
Greetings, -asb
Comment #13
zeusent CreditAttribution: zeusent commentedI am new at patching... What does that mean? How can I repair it?
Comment #14
asb CreditAttribution: asb commentedSorry, I'm no programmer, just a user who can apply patches ;-(
All I can say at the moment is that the patch could not be applied against a freshly downloaded nodetype-6.x-1.0. So most probably you have created the patch file from a different (already altered) code base.
The rejects file contains the code diffs which couldn't be replaced. That's as far as my limited knowledge goes.
Maybe you can simple reroll the patch against a fresh nodetype-6.x-1.0 (or simply attach the complete file; the Drupal guys don't like this, but we're not dissecting Drupal core here ;)
Thanks & greetings, -asb
Comment #15
zeusent CreditAttribution: zeusent commentedYou were right. I run the patch against an already patched version of the module. Here is the patch over a clean version of the module. Please let me know if it works ok
Comment #16
asb CreditAttribution: asb commentedHi,
the patch now applies cleanly an modifies
nodetype.module
.If I'm trying to change the nodetype on the node editing form, I'm still getting this fatal error (like in #5):
Af you mentioned correctly in #11, I don't have trigger.module enabled. As a workaround (to avoid permanently switching between patched and unpatched versions) I simply enabled it. Now the error is gone; however, IMHO something should catch requirements like this.
Also VBO works now pretty reliably for me, even if the need to enable allowed conversions per content type can be a bit pesky...
Thanks & greetings to Romania, -asb
Comment #17
zeusent CreditAttribution: zeusent commentedI've just looked into the code of this and on line 132 you should have something like
if (module_exists('trigger')) {
and not
$aids = _trigger_get_hook_aids('nodetype', $op);
wich should be on line 133. If you don't have the first if statement it means the patch didn't apply correctly (that was the difference between the first version that generated #5 error.
Comment #18
rc2020 CreditAttribution: rc2020 commentedHey,
I have applied this patch and it seems to have applied okay and the option to change node type appears in the rules action menu - but no type change seems to happen. I've tested it without any conditionals and the type doesen't seem to change.
I've also performed 'save a content' so the content is saved beforehand, and that does not help either.
Thoughts?
Thanks!