欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

Can't Find the "Install new module" Link in Drupal? "Install new module" link missing from Modules page 不能发现安装新模块 有大用

on July 16, 2015 | Drupal
cant install modules

When developers install Drupal modules, they rely on Drush or version control to manage their work.

However, most ordinary Drupal users do everything through the admin interface. They install modules via the "Install new modules" link.

Sometimes that link goes missing. If you can't find your "Install new modules" link, here are four possible solutions.

Can't Find the

#1. The Update Manager module is disabled

The most common reason why people can't see the "Install new module" link is that the Update Manager module is enabled.

Go to your Modules page and make sure it is enabled:

Install new module link in Drupal

#2. Administer modules permission

It is possible that you don't have the correct permissions to install modules.

One way to double-check whether this is your problem, is to visit this URL on your site: /admin/modules/install. If you see "You are not authorized to access this page.", then you've found the issue.

The permission you need is called "Administer modules" and you'll find it under People > Permissions > System.

Administer modules permissions in Drupal

#3. Your hosting company 

Quite a few hosting companies won't allow you to upload modules via the Drupal interface.

For example, here's what Acquia says:

"One of the most common tasks you'll accomplish while developing or maintaining a Drupal website is adding a Drupal contributed module. If you're used to working in a local installation of Drupal 7, you may be used to doing this directly in the Drupal admin interface, using the core Update Manager module. If your site is hosted on Acquia Cloud, your site's module directories are managed in your code repository. This means that you can't just add a module using the Update Manager or SFTP. Instead, you need to use your version control system (Git or SVN). "

Managing your modules with version control is definitely aligned with Drupal's best practices, but it does explain why your "Install new module" link is missing.

Other hosting companies also disable "Install new module" for the same reasons.

#4. Check your settings.php file

Open up your site's files and go to /sites/default/settings.php. Look for this line of code:


#$conf['allow_authorize_operations'] = FALSE;


Make sure that the # symbol exists at the front of this line.

If it doesn't exist, add the # symbol so it matches the code above. Or, you can change that code to this:


$conf['allow_authorize_operations'] = TRUE;



About the author

Steve is the founder of OSTraining. Originally from the UK, he now lives in Sarasota in the USA. Steve's work straddles the line between teaching and web development.

Comments (5)

  • avatar
    hi

    thanks.. i confirm , update manager disabled always cause it when on dev
     
  • avatar
    hi
    is it possible to make that link available without update manager enable?
     
    • avatar
      hi Daniel

      On some distribution(for me) , when i dev environnement(for me) , update manager (even when using cron) sometimes kill performance.
       
    • avatar
      Daniel Pickering Friday, 18 November 2016
      Hi Goli,
      Interesting I haven't really run into issues with that. If you are working on Dev you really should be using drush or console to search for and update modules automatically. Save yourself a lot of time and effort.
       
    • avatar
      Daniel Pickering Thursday, 17 November 2016
      Hi Goli,
      Why would you not want to have it enabled ?
      Thanks

      Daniel
       

来自 https://www.ostraining.com/blog/drupal/cant-install-new-module/

普通分类: