Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install using the install UI #8

Closed
herbdool opened this issue May 27, 2019 · 15 comments
Closed

Cannot install using the install UI #8

herbdool opened this issue May 27, 2019 · 15 comments
Labels

Comments

@herbdool
Copy link
Contributor

herbdool commented May 27, 2019

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 wonder if it's because clone.info doesn't match the folder name "node_clone". We should probably change that.


PR #10 by @klonos

@herbdool
Copy link
Contributor Author

@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.

@pnmgman2
Copy link

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

@mazzech
Copy link

mazzech commented Feb 3, 2020

I managed to install it after un- and re-enabling the module

@klonos
Copy link
Member

klonos commented Feb 3, 2020

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 🤔

@klonos
Copy link
Member

klonos commented Feb 3, 2020

...I wonder if we could get away with this:

  • add a node_clone.info file
  • add dependencies[] = clone
  • add 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?

@klonos
Copy link
Member

klonos commented Feb 3, 2020

...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 🤷‍♂

@mazzech
Copy link

mazzech commented Feb 3, 2020

@klonos added your code, enabled another module, the error message did not appear again, cloning nodes still works > worx:-)

@klonos
Copy link
Member

klonos commented Feb 3, 2020

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.

@klonos
Copy link
Member

klonos commented Feb 3, 2020

FTR, this is the error @mazzech mentions:

image

...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): #10

@herbdool
Copy link
Contributor Author

herbdool commented Feb 4, 2020

@klonos clever solution.

@herbdool
Copy link
Contributor Author

herbdool commented May 28, 2020

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.

@mazzech
Copy link

mazzech commented May 28, 2020

Hi @herbdool thank you, I will test:-)

herbdool added a commit to herbdool/node_clone that referenced this issue May 30, 2020
Issue backdrop-contrib#8: Fix issues because of missing node_clone.info file by @klonos
herbdool added a commit to herbdool/node_clone that referenced this issue May 30, 2020
herbdool added a commit to herbdool/node_clone that referenced this issue May 30, 2020
@herbdool
Copy link
Contributor Author

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.

@herbdool
Copy link
Contributor Author

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.

@herbdool
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants