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.
Serial field doesn't work properly with node_clone module.
Probably a proper hook should be implemented, since node_clone in clone.pages.inc calls:
drupal_alter('clone_node', $node, $context);
Comment | File | Size | Author |
---|---|---|---|
#12 | serial-node_clone-2144389-12.patch | 658 bytes | BR0kEN |
Comments
Comment #1
Melechin_AV CreditAttribution: Melechin_AV commentedI have a similar problem (with the serial_field-1.3).
Autoincrement work only when creating a new node. When cloning - number also cloned. In version 1.2 this doesn't happen. I don't want to use a hook and I have to use version 1.2.
This is error or now it will be always?
Thanks in advance for a attention to this issue.
Comment #2
drvdt CreditAttribution: drvdt commented+1
Comment #3
tyrpower CreditAttribution: tyrpower commented+1
Comment #4
mstiIf someone wants to use a hook to solve this, here is how it is done:
Comment #5
GAMe CreditAttribution: GAMe commentedI too have the same issue :-/
Comment #6
Melechin_AV CreditAttribution: Melechin_AV commentedmsti, thanks for help.
- This hook should be inserted into the file /serial/serial.module?
I tried - does not work
And I created a module - item does not work
What am I doing wrong?
Comment #7
msti@Melechin_AV
You will have to place this in your custom module.
Replace the 'mymod' in mymod_clone_node_alter with your module name like: MODULE_NAME_clone_node_alter
Check this for help: https://www.drupal.org/developing/modules/7
Comment #8
Melechin_AV CreditAttribution: Melechin_AV commentedModule with hook does not give error, but does not work - when cloning the number does not increase.
I hope this function will included in next version serial-field module.
Comment #9
GAMe CreditAttribution: GAMe commentedHas any other development been done on this yet? All seems to have gone quiet.
Comment #10
GAMe CreditAttribution: GAMe commentedOk so a big thanks out to msti for his direction. I created a module for this which I have attached as a super quick way for people to get this thing working however you MUST edit the .module file and change the field names to that of your own.
Lets hope this is fixed properly in newer versions of serial field :-)
Comment #11
Melechin_AV CreditAttribution: Melechin_AV commentedIt work!
I'm slowpoke.
I'm very grateful to msti and GAMe.
Comment #12
BR0kENComment #18
BR0kEN