Ticket #7519 (closed task (blessed): fixed)

Opened 3 years ago

Last modified 23 months ago

theme update api

Reported by: lloydbudd Owned by: rboren
Priority: high Milestone: 2.7
Component: Themes Version: 2.7
Severity: major Keywords: blessed has-patch needs-testing
Cc:

Description

theme update api, like we do for plugins

Attachments

wp-includes--update.php.diff Download (3.2 KB) - added by josephscott 3 years ago.
7519.diff Download (12.8 KB) - added by DD32 3 years ago.
7519.2.diff Download (1.7 KB) - added by DD32 3 years ago.
7519.3.diff Download (1.8 KB) - added by DD32 3 years ago.

Change History

comment:1   ryan3 years ago

Joseph and I will start looking at version-check API for themes soon. The WP side of the work should largely be a cut-and-paste of the plugin code. To accommodate those who modify their themes, we might need some sort of diff service to warn them that they have changes that the update will overwrite.

This patch adds support for checking with api.wordpress.org on theme updates.

comment:3   ryan3 years ago

(In [8891]) Themes API from josephscott. see #7519

Note to self: Fix inline documentation and submit ticket to #7550.

DD323 years ago

comment:5   DD323 years ago

  • Version set to 2.7

attachment 7519.diff added.

Initial Theme update

  • Needs to handle current-theme-is-active use case
  • May need testing for Child/Parent themes(I really dont know the backend of that 100%)
  • Currently bases everything off 'stylesheet' and 'Stylesheet Dir'
  • Cache busting added to update themes function for added/changed themes
  • Fixed a Tags if statement covering too much content
  • Check the TODO's

comment:6   DD323 years ago

  • Has some issues with JS and thickbox on the update links

comment:7   DD323 years ago

  • BTW: The API was returning a null version for me last night while writing that patch, Shouldnt affect the patch though; Just a FYI

(In [8989]) Theme update UI first pass. See #7519 props DD32.

I'll get this testing with SSH2 testing.

SSH2 should work perfectly, As long as it implements all the same functionality as FTP. I've only tested upgrade with Direct and FTP so far however.

  • Status changed from new to closed
  • Resolution set to fixed
  • Status changed from closed to reopened
  • Resolution fixed deleted

Can someone with more theme knowledge complete the update-current-theme use case in the updater?

[8989] see trunk/wp-admin/update.php => TODO

Basically:

  • If theme is active: Switch to default (Or put blog into maintainence?)
  • Upgrade
  • If theme was active (And the theme was switched to default) Switch to ugraded theme, Else, If theme put into maintainence, Deactivate the maintainence mode.

I'll take a stab @ it.

  • Component changed from Administration to Themes
  • Severity changed from major to blocker

Raising to blocker.

Should we just go into maintenance mode like we do for core upgrade.

DD323 years ago

attachment 7519.2.diff added.

  • Puts blog into maintainence mode during theme update
  • ..See next patch for one that puts it into maintainence mode for if the current Stylesheet, OR parent theme is being updated..
  • Takes blog out of maintainence mode on a failed theme update as well, If the theme didnt get touched at all, then it'll be ok, Could be disasterous if theme was only half-updated. Should revert to default theme if the current theme ends up broken on next admin page load i believe?

DD323 years ago

  • Keywords has-patch needs-testing added

+1

Patch looks good to me

Need some testing.

Putting a call out to wp-testers

Currently it seems if the active theme is not present you get:

  • Blank Front End - no content at all
  • Back end works fine but you have to go to Apperance > Themes before it detects the missing theme
  • Severity changed from blocker to major
  • Milestone changed from 2.7 to 2.8

Too late to get this in before 2.7 goes gold.

Move to 2.8 for now.. Can be backported to 2.7.1 as well.

  • Type changed from enhancement to task (blessed)

Isn't this a dup of now the mostly tested #7875 patch?

Yes, In the event that huge patch on #7875 gets commited, This ticket can be closed as fixed in 2.7, As the maintainence mode stuff is taken care of by it.

  • Status changed from reopened to closed
  • Resolution set to fixed
  • Milestone changed from 2.8 to 2.7
Note: See TracTickets for help on using tickets.