- π³π±Netherlands megachriz
I ran in this problem again for an other D7 site lately and noticed that I had written a patch for it before! Lovely.
But this time I also ran into a similar issue as @swms, though in my case it was about the "Display" field specifically.
Hopefully this new patch fixes the issue better.
- πΊπΈUnited States philsward
I'm going to say that #6 needs some work.
I honestly don't know if it works (yet) because I'm writing this AFTER finding the new Clone Files option.
But...
If the patch is applied and the option is set to No (the default option after applying the patch), presumably, the patch doesn't address the initial shortcomings of the core of the issue.
If a node is cloned for example and has images, the images are "moved" from the original to the clone on saving the clone.
If the original node is then edited and saved, all of the images "move" from the clone back to the original.
Ideally, the option of "No" should take into consideration any files and then erase all references to those files on clone save instead of carrying them over to the clone for the two nodes to then play tug-of-war on which one get's to house the images.
I'm using filefield_paths with "active updating" turned on which might be part of the problem of the tug-of-war, however the cloning needs to do a better job of dealing with existing files at the basis.
Unfortunately this probably won't get a proper fix given the EoL of D7, but these comments might help if node_clone gets ported to Backdrop or YAD7 or another startup flavor after the EoL in 2025.
- π³π±Netherlands megachriz
If the patch is applied and the option is set to No (the default option after applying the patch), presumably, the patch doesn't address the initial shortcomings of the core of the issue.
Correct. It makes sure that the default behavior is that files are not copied. Only when
[node:nid]
(or an other node specific value) is used, you may want to clone the files too. If I'm correct, the[node:nid]
token is only available when Filefield Paths is installed. So this issue only becomes a 'bug' when a particular other module is installed. Therefore I think that cloning files should be optional and off by default. - πΊπΈUnited States philsward
Therefore I think that cloning files should be optional and off by default.
Agreed, however, how can we deal with the presence of fielfield_paths which I believe is the offending culprit for the majority of use-cases?