In .info file the module dependencies property should have a download link as optional parameter.
On page admin/build/modules, if the dependent module is missing, then a download link should be displayed.
download link = (d.o.) project page
| Comment | File | Size | Author |
|---|---|---|---|
| #24 | drupal-core-missing-required-module-link-2182493-3.patch | 2.25 KB | rootwork |
| #13 | missing_modules_links.patch | 999 bytes | callison |
Comments
Comment #1
pasqualleok, the download link in the .info file is not necessary if the module is on drupal.org, which is 99.9% of all cases.
just do is as update_status do, find it on d.o by project name..
Comment #2
ssm2017 Binder commentedi think that it can be a good idea to allow to add a link for the dependencies.
this can display a linked module name in the dependencies on the module list page.
if the link is not present, use the drupal.org/project link
if the link is present, display the link
( for example, on today, i need to install a module that needs a dependency, this module is asking me to install the module called "content" and i needed a long time to see that "content" module is in fact "cck".... )
Comment #3
Anonymous (not verified) commentedSounds like a good idea, but it's actually a little more complicated than it sounds. (At least if you want to do it without potentially killing security.) You can check out the plugin manager modules for more details.
Comment #4
pasquallea download link is a security risk?
Comment #5
Anonymous (not verified) commentedSorry. I misunderstood. I assumed the purpose of the download link was to cause Drupal to download and install the missing modules. (Which could have security implications.) If the download link is just a link where you can manually download it, then that shouldn't be a problem.
Comment #6
dave reidMarked #334744: Link to project pages of missing modules (dependencies) as a duplicate of this issue.
Comment #7
traviscarden commentedI strongly agree with this idea, though I think a link to the project page for the missing module, rather than a direct download link (if that is indeed what was intended above) would be a better option, since a module may have multiple versions available, and it would be both less complicated and more courteous to send the user to the project page and let them decide which version they want.
Comment #8
callison commentedHere's a patch. As mentioned in #2, a link in .info is not necessary. All I did was link to the Drupal project page. Granted, this wouldn't work if there is no project on drupal.org for this module, but in just about every case, this would work perfectly.
Comment #10
callison commentedTake #2 - I keep having trouble with unix line-endings. I think it's something to do with my CVS patch settings.
Comment #11
callison commentedThe above patch may have applied fine, but I'm going to do it again (after changing my CVS settings).
Comment #13
callison commentedWell, after 3 patches, I think I finally got it. Used Eclipse's CVS functions.
Comment #14
pasqualleI found one real problem with this.
example: for media_brightcove module dependencies[] = emvideo, but emvideo is a submodule in emfield module
so http://drupal.org/project/emvideo is a page not found..
we need better logic to find the missing modules.. Probably a service which can tell the project page of any Drupal module/submodule/theme/subtheme. Drupal project discovery tool.
Comment #15
dave reidYeah this is a tough one to solve with lots of unhappy fringe cases.
Comment #16
callison commentedWell, does anyone know to go about getting a service (as mentioned in #14) or something like this going? I thought we could integrate something from the drupal updates feed or something, but that only includes parent modules, too. As far as I can tell, this would just need to be a pretty simple index of all the .info files registered in the CVS with a URL for the project's page.
Comment #17
pasqualleI think this issue will help to achieve this #102102: Parse project .info files: present module list and dependency information
Comment #18
callison commentedThat's great. So, where will this information be available to use in our case? Will this be installed on drupal.org I guess?
Comment #19
sivaji_ganesh_jojodae commentedsubscribing, this is something i wish to see in drupal.
Comment #20
greg.harveyLet's move this out of the D7 issue queue. It seems it is not resolvable with the current system of dependencies in .info files (see #14) so we can't do anything with this until the way .info files are created is re-visited. I guess this would be a separate issue, and I don't know if it even exists yet...?
Comment #21
xanoSubscribing.
Comment #22
jibranAs per #20 #1793074: Convert .info files to YAML
Comment #23
klonosMarked #2182493: Missing required modules in the modules admin page should be links to the respective projects on d.o as a duplicate. Making the issue title less vague.
Comment #24
rootworkSo here's the most recent patch from #2182493: Missing required modules in the modules admin page should be links to the respective projects on d.o. Note this patch fails tests, but I figured it'd be useful to have a patch against 8.x.
Comment #26
pasqualleIn the dependencies list
- core module [block] should not display a link
- module already downloaded should not display a link
- missing contrib module [webform] should automatically display a link to d.o project page
- missing contrib submodule [admin_menu_toolbar] needs the download link configured in info file
- missing module which is hosted outside drupal.org [custom_message] needs the download link configured in info file
If there is no download link configured and the module is not a core module, then the module should be considered as a contrib module hosted on d.o.
the yml file configuration could be something like:
or
I think updates is not a good name, as it is not really an update url, and projects hosted on d.o do not need the full url.
Comment #27
klonosThe patch in #24 alters only entries in the list that have the
admin-missingclass. AFAIK disabled core modules will never have this class (they ship with core - they will never be missing. Perhaps disabled, but never missing). So I think this pretty much handles that case.Same with already downloaded but disabled contrib modules. So this is taken care of too:
This sounds like a sensible default to me. Of course there'll be cases such as missing contrib not hosted on d.o (custom modules for example), but I believe we can safely say we handle the majority here and this sounds like an 80/20 case. For these edge cases we should offer the download link entry in .info/.yml files as proposed in this issue.
Comment #30
MaskyS commentedAnyone still interested on working on this? I think that this should definitely be implemented, but with a standard which specifies to include only links to drupal.org project pages.
Comment #31
rootwork@Kifah Meeran I think it'd be a great feature. I can see the argument for allowing links to third-party libraries, but I guess since the dependencies listed on the module page will always be modules, it would make sense to restrict the links to d.o projects.
In any case, I hope work on this will continue. I can help contribute and review.
Comment #45
smustgrave commentedThank you for sharing your idea for improving Drupal.
We are working to decide if this proposal meets the Criteria for evaluating proposed changes. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or there is no community support. Your thoughts on this will allow a decision to be made.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!