awesomemotive / easy-digital-downloads

Sell digital downloads through WordPress
https://easydigitaldownloads.com
GNU General Public License v2.0
864 stars 475 forks source link

Fix/improve upgrade routines when upgrading from older versions #3666

Open mindctrl opened 9 years ago

mindctrl commented 9 years ago

Upgrading from 1.7.2 to 2.4.2. Here's the experience.

When returning to the plugins page after installing the update: image

I'm going to make some other experience notes here, and we might want those in another ticket, but I'm going to log everything as I go.

.htaccess notice:

image We could help by linking them directly to the settings page there. Ideally we could attempt to do it automatically instead of showing the big notice, but not sure if we'd need to refactor anything for that.

Now that I look at that whole message, we don't explain what it means to have a missing .htaccess file and why they need it. It's all very technical. We should improve this similar to how the NGINX notice is. Something like "The download files in ... are currently not protected. To have EDD attempt to automatically fix this, please go to Downloads > Settings > Misc and click the Save Changes button. If this message continues to appear......"

Upgrade notices

Clicking the upgrade notices, starting with the first one. I got the intermediary screen, then it auto redirected to the 2.4.2 welcome screen: image

The remaining db upgrade notices are now gone. I clicked back to the dashboard home and got this notice: image

I ran the upgrade and was returned to the 2.4.2 welcome screen again. Went back to dashboard home and got the same upgrade notice message: image

Clicked, ran upgrade, returned to 2.4.2 welcome screen. Went back to dashboard home, got the same "previously started" notice. I appear to be stuck in a loop with this experience. I went through the same circle ~10 times and it doesn't finish. The URL that flashes in the address bar before redirecting me back to the welcome page is /wp-admin/index.php?page=edd-upgrades&edd-upgrade&step=1&custom=0&steps=0

The Upgrades Completed line in the system info file shows that none have completed.

chriscct7 commented 9 years ago

I know we got a lot of things in the 2.5 release, but this issue causes more support tickets than pretty much anything else in EDD core right now. I think it should be tackled sooner rather than later. Other things should be punted so this can get done first

cklosowski commented 9 years ago

I'm open to suggestions, who has ideas on how to handle all the upgrades that are needed?

pippinsplugins commented 9 years ago

I think we should update all of our previous upgrades routine to use the new upgrades API, that way we can at least ensure all of them run.

Showing a bunch of notices is not great but it's not horrible. Horrible is showing a bunch of notices and then giving the appearance of the upgrade routines running after you click on one when in reality none of them ran.

cklosowski commented 8 years ago

There are a few things I think we should do here: 1) Yes, all past upgrade routines should use the new system. 2) Reduce the number of upgrade notices. that display at a single time. Weather that's through a UX, or something. 3) We should make sure these upgrade routines run IN ORDER. Maybe we do this by building an 'upgrades' view. With it we can show all the upgrades that are needed, gray out the ones that need to come after, only allow a single upgrade at a time. As you complete an upgrade, the next one becomes available to click and execute.

We could use the CSS from the batch exporter to give a nice view of how far an upgrade has run.

cklosowski commented 8 years ago

I'm going to make this one of my priorities for 2.5. I'll try and work up a wireframe of my thoughts on this tomorrow for some feedback.

pippinsplugins commented 8 years ago

:+1:

cklosowski commented 8 years ago

We're too close to the 2.5 beta, and we don't have any upgrades in this one. I'm punting until we can get some more time available for this.

pippinsplugins commented 8 years ago

We're going to have to try and hit this again in 2.6.

cklosowski commented 8 years ago

This just isn't going to make 2.6. I hate punting this but it's a _massive_effort for backwards compatibility reasons.