Closed herbdool closed 4 years ago
@klonos you brought up this issue before, perhaps we should change it to node_clone.info and change all the files and functions to match. I'm not 100% sure that's the problem but seems likely.
Also reporting this issue when trying to install using the install UI at /admin/modules/install; I get this error: There was an error getting information for node_clone
I managed to install it after un- and re-enabling the module
Yeah, I think that you must be right @herbdool.
We have inherited this mess from the D7 module, and although I don't particularly like it, it seems that renaming files/functions may be the way to go 🤔
...I wonder if we could get away with this:
dependencies[] = clone
hidden = TRUE
I believe that you cannot have "orphan" .info files, so we will also need an empty node_clone.module
file.
@mazzech can you please try the above on your local, and let me know if the errors you've been having go away?
...you see https://www.drupal.org/docs/7/creating-custom-modules/writing-module-info-files-drupal-7x mentions this:
The .info file should have the same name as the .module file and reside in the same directory. For example, if your module is named example.module then your .info file should be named example.info.
So it does not mention that the folder name should match the .info and the .module filename ...only that the .info and .module files should live under the same folder 🤷♂
@klonos added your code, enabled another module, the error message did not appear again, cloning nodes still works > worx:-)
Thanks for testing my theory @mazzech 👍
@herbdool I don't think that renaming functions is the way to go here, as we may be breaking other contrib. See https://www.drupal.org/project/node_clone
Important: In general, any complex or custom node type may not clone cleanly. This module has an extra hook in case you want to try to do a little extra cleanup to make a specific node type work. For example, if you use Field Collections, you may need to also download and enable the extra Field Collection Node Clone module. This can also be used as an example of implementing that hook.
FTR, this is the error @mazzech mentions:
...it is shown each time a new module is installed/enabled via the Project Browser, if node_clone is already installed.
I have filed a PR, that adds a node_clone.info
file (no need for node_clone.module
file during my testing): https://github.com/backdrop-contrib/node_clone/pull/10
@klonos clever solution.
I've merged and released this as part of the Bug Fix Team. But unfortunately it doesn't fix the bug. I get the same error message when I attempt to install this module. Sadly this is hard to test without making releases. I'm going to look into the code, but it may be that we could also try add an empty node_clone.module file.
Hi @herbdool thank you, I will test:-)
I've added another change by adding an empty node_clone.module. The consensus on Zulip is to do a more radical break by changing all the file and function names. But we'll need to see if we can do an upgrade path at all. I figured we can first try this before trying anything else which might or might not work.
For some reason the 1.1.4 release isn't appearing when I try to install it via the UI. Maybe just need to wait for server to update or something is wrong.
Seems ok. I tested a UI install on a different site and it worked okay. I think the basic bug is solved. If we want to rename all the files and functions we should create a new issue. And someone should volunteer to be maintainer of this.
When trying to install using the install UI at /admin/modules/install I get this error:
I wonder if it's because clone.info doesn't match the folder name "node_clone". We should probably change that.
PR https://github.com/backdrop-contrib/node_clone/pull/10 by @klonos