Title: Updating a Theme
Section: Security and Maintenance
File name: security-update-theme.txt
Covers: How to download a new version and run the update script, from UI and Drush
Index: Security

Attribution

Written by https://www.drupal.org/u/batigolix[Boris Doesborg]
[Fill in!]

Checklist for this phase

- Does it follow the template?
- Have the comments and placeholder text been removed from the template?
- Is everything the topic was supposed to cover included, and nothing extra?
- If there are @todo notes, are they clear?
- If there are images included, do they include instructions for how to redo them in a comment? (Note: Screenshots do not need to be perfect. Just make a rough cut.)
- Is attribution provided?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Les Lim’s picture

Issue summary: View changes
jhodgdon’s picture

Version: » 8.x-0.x-dev
Issue summary: View changes

Updating summary.

jerseycheese’s picture

Assigned: Unassigned » jerseycheese
jhodgdon’s picture

Hi @jerseycheese, do you still plan to work on this? We like to get topics done within about two weeks of them being claimed, if possible. Thanks!

batigolix’s picture

Assigned: jerseycheese » batigolix

The description says "How to download a new version and run the update script, from UI and Drush" We are talking here about updating a theme?

batigolix’s picture

Ok, I see there is a security-update-module, I can get some inspiration from.

jhodgdon’s picture

Indeed, very similar to the Module topic, but applied to a Theme. Themes can (in principle) have database (or settings) updates, just like modules.

batigolix’s picture

FileSize
1.9 KB

Here is a first attempt. (see attachment)

When writing I noticed a couple of things:

a) We are (probably) not very consistent in the usage of enable versus install. It would be good to review all the topics on the usage of these terms. Could be part of a general style review as.

b) There seems not to be a topic on enabling or installing a module/theme. It can be useful to have one.

c) We could reduce the topic length by having a maintenance mode topic to refer to. I think it could be useful to have one.

d) The security-update-module topic is rather lengthy. It can be more concise like proposed in this security-update-theme topic. We should ensure the common parts of the topic are similar.

Let me know what your opinion is on this. I could create a couple of issues so we can deal with this later.

batigolix’s picture

Status: Active » Needs review
jhodgdon’s picture

Status: Needs review » Needs work

a) Good idea on enable/install -- adding to the Copy Editing notes.\

b) The topic that covers the steps on enabling modules is language-enable

c) That is an excellent idea. We do have several topics that include the need to put the site in maintenance mode. I'll add an issue to create it:
#2677468: Make a new topic on Maintenance Mode
You can go ahead and link there but we'll have to create the stub file with the [[ ]] ID at the top and include it in guide.txt before we commit this topic. (Which you can leave to me when I commit it.)

d) If you'd like to edit that topic, feel free to create an issue and do so.

So... I do like the nice concise format here... looks good!

A few things to fix and/or comments:

1. security-update-module is not a concept, so it better go in Follow-on tasks not related concepts.

2. Screen shots I guess?

3. I like the way you organized it with making the backups in Prerequisites, and I think that is fine, but I think maybe the put into maintenance mode and take out should be part of the regular steps rather than prereq/follow-on, because... well I tend to think of follow-on as kind of optional, and taking out of maintenance mode definitely isn't optional! :)

4. Technically if you are using Drush you do not need to log in to the site at all, so maybe mention that this prerequisite is only if you are using the web site method.

jhodgdon’s picture

Oh, and regarding enabling themes/modules, there are also topics extend-module-install and extend-theme-install, which cover downloading and installing/enabling them.

jhodgdon’s picture

I had a few more thoughts on this, which probably apply to both this topic and security-update-module:

1. Personally, I have never been able to use the automatic FTP-based download of modules/themes that the Update Manager supplies. It just never works on my local sites. So my process is always that I have to find the link and download the new or updated module/theme files myself, and put them into the correct directory on the site.

I doubt I am the only one with this problem. So I think it is kind of important to tell people how to manually download, unzip, and place the files, and not assume they can use the one-click "get updated files" thing in Update Manager.

2. Somewhere we need to get across the point that updating a module or a theme involves two things: (a) getting new files and (b) running automated updates supplied by the module/theme, which could update your database, files, or configuration. Maybe we should add this to the "Keeping track of security updates" topic, if it isn't covered there? Or mention it in the Goal sections of these two topics, that there are these two steps and both need to happen so that the code files are in synch with your site config/database. I think that having this background makes the topic make more sense.

3. For the Drush option, a site prerequisite is having installed Drush, and we have the install-tools topic for that (I think that is the right ID). Update Manager module is not required if you're using Drush. So it seems like probably we need 2-3 sections in Site Prerequisites: (a) required no matter which way you do it, (b) required if you are using the web version, (c) required if you are using Drush.

4. In order to update a module or theme, another site prerequisite (or two, really):
- You need to have installed a custom or contrib theme/module.
- It needs to have, since you installed it, come out with an updated version.
I don't think it hurts to mention these as prerequisites.

Anyway... hope this helps...

batigolix’s picture

Issue summary: View changes
Status: Needs work » Needs review
FileSize
2.29 KB
71.54 KB

This version covers most of your points from #10 - #12, except for point 1. in comment #12:

You suggest to explain the update process using the file system instead of the Drupal UI.
I that case, I think, we should also change the extend-module-install and extend-theme-install, because they also explain the process via the drupal UI (Update manager). (extend-theme-install covers both, but manual download very briefly).
And we should check other topics as well.

The instructions for unpacking, moving files can be lengthier and above all doesn't always match all different operating systems

None of this is a real problem but wouldn't it be nicer, more concise to explain it via the Drupal UI.

Could the problems be related to temp folder settings? We could explain how to set this as a prerequisite.

Or as an alternative: explain the different methods (manual, UI, drush, ...) in a dedicated topic and link to it from all other topics?

eojthebrave’s picture

I wonder if we should add a new topic that covers the more manual using the file system process. The task topic could walk through downloading an archive file from d.o., extracting it, and placing it into the appropriate directory. The individual theme/module install & update topics could focus on using the UI version, but also link to the new topic that talks about how to do it manually. Saying something like, "Obtaining the files can also be done manually, read more about that here." in between the steps for downloading the files in the UI and any steps where you're doing things like enabling the module after it's been put into the filesystem?

Which, I suppose is basically this suggestion:

> Or as an alternative: explain the different methods (manual, UI, drush, ...) in a dedicated topic and link to it from all other topics?

Which seems like a good idea to me.

jhodgdon’s picture

Hm... The Drush version is very simple, so I think it can be left in the main topics? But I agree that moving the completely manual version to a separate topic may make sense. But on the other hand, don't you think it's useful for people to know where these files normally end up in their file system?

I just don't know.

  • jhodgdon committed fe02cf1 on 8.x-0.x
    Issue #2541640 by batigolix: Write security-update-theme.txt
    
jhodgdon’s picture

Status: Needs review » Fixed

Actually, let's discuss the larger issues on #2677942: Edit update/install module/theme topics, which batigolix opened up yesterday, and I'm going to go over there and expand its scope to cover #13, #14, #15 from this issue.

For now, I think this topic is Good Enough (TM) so I went ahead and committed it to the guide. It's covering Drush and the UI (if FTP stuff is working) and that is what the topic was supposed to cover.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.