1

I have a Drupal 7 site with 3 themes enabled:

  • Foo
  • Adminimal
  • Shiny

Foo is a custom theme for the front-end, located in /sites/foo/themes/ and set as the default.

Adminimal and Shiny are both installed via drush make into sites/all/themes/contrib/.

Running drush pm-updatestatus disables the default 'Foo' theme.

$ drush pm-updatestatus
Checking available update data ...                             [ok]
Failed to check available update data for Foo settings.        [ok]
Checked available update data for Administration menu.         [ok]
...
Checked available update data for Adminimal.                   [ok]
Checked available update data for Shiny.                       [ok]
Failed to get available update data for one project.           [error]
Checked available update data for 64 projects.                 [status]
 Name                                                        Installed Version  Proposed version  Message
 Administration menu Adminimal Theme (adminimal_admin_menu)  7.x-1.6            7.x-1.7           Update available
...
 Adminimal (adminimal_theme)                                 7.x-1.21           7.x-1.24          Update available
 Shiny (shiny)                                               7.x-1.6            7.x-1.7           Update available

The Failed to check available update data for Foo settings. & Failed to get available update data for one project. [error] lines from the output clearly look relevant, but I'm struggling to identify the underlying cause.

With the Drush's -d debug flag enabled the output includes this line before the Failed to get update data for on project [error]:

Undefined index: foo theme.inc:100 [1.78 sec, 35.7 MB]            [notice]

drush pm-list has the same effect.

Presumably there's something wrong with the declaration, or location of the Foo theme?

Checking the status report via the Drupal admin does not disable the Foo theme.

Why would drush pm-list & drush pm-updatestatus disable the default theme?

  • pm-updatestatus queries the Drupal servers for updated versions of modules. If this is a custom module, Drupal has no response from it: Failed to get update data for on project [error]. So this is normal for custom modules or themes. It should however not disable the theme. – Neograph734 May 20 '16 at 11:14
0

Your themes for Drupal 7 should live here:

  • /sites/all/themes/THEMENAME - for all sites and all themes
  • /sites/example.com/themes/THEMENAME - for example.com of a multisite setup

Now in your case there is an additional note: You have the option to put your theme in a contrib and a custom subfolder. Themes in the custom subfolder would be skipped during the update process (see /r/drupal for cross reference). There is a caveat though: Apparently once you use contribyou also have to use custom otherwise it seems the whole tree breaks (see disqus)

Try to move the foo theme too: /sites/all/themes/custom/foo or /sites/example.com/themes/custom/foo then run drush rr and drush cc all

  • Hi @nhck, thanks for your help. I moved the theme to /sites/all/themes/custom/foo and ran drush rr and drush cc all as you suggested, but it hasn't resolved the issue. Both pm-list and pm-updatestatus are still disabling the Foo theme. – tommarshall May 20 '16 at 12:22
  • Through trial and error we've identified that setting the --uri=foo.example.com flag seems to prevent pm-list and pm-updatestatus from disabling the theme. Is setting the --uri flag mandatory for multisite? I haven't been able to find anything in Drush's documentation indicating that it is. – tommarshall May 24 '16 at 13:51
  • This article explains why setting --uri is significant for multisite, though it does not explain why pm-list and pm-updatestatus would disable the default theme when Drush is passed insufficient information to identify the multisite site. docs.acquia.com/articles/how-use-drush-multisite-installation – tommarshall May 24 '16 at 14:23
  • Interessting. Sorry that my answer wasn't sufficient. I've been wondering it there might be something in the info file of your theme that could make drush look for a project on drupal.org? – nhck May 25 '16 at 12:40
  • I had thought the same, but it looks very vanilla to me: pastebin.com/S4qpfBNm – tommarshall May 25 '16 at 13:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.