Traumflug Posted November 2, 2017 Share Posted November 2, 2017 Over the last couple of days I've put together many small patches and enhancements for the tbupgrader module. This is obviously a pretty crucial module, so I think it's a good idea if a few more people than just me test it. How to test Move the current module aside, out of the modules/ folder. Download this ZIP https://github.com/Traumflug/tbupdater/archive/supercollection.zip and place its content inside the modules/ folder. rename the resulting folder from tbupdater-supercollection to tbupdater. All this is reversible, of course. What's new Fixed graphics glitches for window sizes between ~900 and ~1200 pixels (bootstrap md and lg). Should work better on Windows now, thanks to @musicmaster . Backups should actually work now, also thanks to @musicmaster . No longer these 12 million files to backup messages (which actually started over in case one waited that long). It should show the actual number of files now and finish as all of them are backed up. Panels on the module page should now be in a more logical order. Update options above the "Update" button, for example. I've heard we Westerners have the habit to read from top to bottom, so seeing options after clicking the button is a bit late. Database backup now working as well, again, thanks to @musicmaster. Some 1500 lines of unused, duplicate code removed. Just occupying disk space and confusing developers. And last not least, one can download files manually now in case automatic downloads fail. Link to comment Share on other sites More sharing options...
SLiCK_303 Posted November 3, 2017 Share Posted November 3, 2017 following these directions, I get the this when I goto the module. Going from version 1.2.5.... top half of screen.... scrolling down to bottom... Link to comment Share on other sites More sharing options...
Traumflug Posted November 3, 2017 Author Share Posted November 3, 2017 Hmm. Doesn't look like what I see. Now I need a good guess on what happens on your side. I'll experiment a bit. Link to comment Share on other sites More sharing options...
Traumflug Posted November 3, 2017 Author Share Posted November 3, 2017 Ouch! Got it. It happens when the window is wider than ~1200 pixels. If you want to continue testing, simply make the window smaller ... or wait until I fixed it. Anyways: thanks a lot for trying and reporting! Link to comment Share on other sites More sharing options...
SLiCK_303 Posted November 3, 2017 Share Posted November 3, 2017 yeah, my setup is 1920x1080, I tried it smaller, but I don't know if I went down lower than 1200 Link to comment Share on other sites More sharing options...
Traumflug Posted November 3, 2017 Author Share Posted November 3, 2017 My setup is "fullscreen is a waste" :-) Anyways. Just pushed another commit onto this branch which should fix these glitches: https://github.com/Traumflug/tbupdater/commit/0d0dc449fc6cb62da5ea543dabf68c8a619a34b7 URL for downloading the module ZIP stays the same; procedure for installation, too. Link to comment Share on other sites More sharing options...
SLiCK_303 Posted November 3, 2017 Share Posted November 3, 2017 works now.... good job. Link to comment Share on other sites More sharing options...
vzex Posted November 5, 2017 Share Posted November 5, 2017 @Traumflug is it possible to allow backups if an update is not available? Updater used to have this option before it backed up 12 million files ;) Was so excited to see this especially the parts added by @musicmaster so I just installed it hoping to do the backups like I used to months back. But the update button doesn't work if you are current so I couldn't test it out :( Please? :pray: Link to comment Share on other sites More sharing options...
Traumflug Posted November 6, 2017 Author Share Posted November 6, 2017 But the update button doesn’t work if you are current This is intended behavior :-) But I see your point, not only for a module test run. Merchants may want to refresh their installation, for example after they changed code manually. I'll see what I can do about it. If you can't wait, you can fake the installed version in config/settings.inc.php line 14. That's where the current version is defined, just change it with a text editor. Like changing PHP define('_TB_VERSION_', '1.0.3'); to PHP define('_TB_VERSION_', '1.0.2'); Link to comment Share on other sites More sharing options...
vzex Posted November 7, 2017 Share Posted November 7, 2017 @Traumflug intended behavior yes! :) :) :) But think I might wait! See? if I had a roll back I'd go for it but since going live I'm not inclined to mess with anything even though I have a cpanel backup :) I used that rollback option all the time when I first installed TB when the button worked. Then it started the million file thing and didn't backup/rollback anymore until button no longer worked for current version like now :( This was actually the best part of thirty bees for me! A built in back up that didn't require cpanel when you first install it and are learning how to do everything! :) Opps....that was a mistake...rollback....all better! Honestly, if I had not had the rollback option to fix my mistakes in the beginning I probably would have bailed out of frustration! Link to comment Share on other sites More sharing options...
Traumflug Posted November 8, 2017 Author Share Posted November 8, 2017 As promised, I looked into these refresh-upgrades. It's not easily implementable. Upgrading doesn't mean to simply unpack a ZIP file, it's handled file by file along a list of file actions. And there is no list of actions for a refresh. Nevertheless, this research triggered quite a chunk of additional commits. Things more tidy now, (hopefully) more understandable messages. Temporary files get removed after being done. And this "warning notifications have been found" HOAX on the final screen removed, there is no code which could issue such warnings. I can also confirm that faking the version (currently) leads to backups. However, the backup thing built into the upgrader module means to allow version rollbacks, not fixing broken installations. cPanel (or file copying or another backup tool) backups are better because they can be restored with a broken shop installation, too. Being able to restore a broken installation is pretty much the point of backups, isn't it? Here's the now prettified final screen: Link to comment Share on other sites More sharing options...
alwayspaws Posted November 8, 2017 Share Posted November 8, 2017 @Traumflug I'm doomed! :) It’s a big learning curve for me. Link to comment Share on other sites More sharing options...
Traumflug Posted November 8, 2017 Author Share Posted November 8, 2017 Huh? Didn't mean to cause trouble. No other backup tool, @alwayspaws ? Imagine the shop gets broken for some reason. Pages no longer load or simply show some mess. This makes the upgrader module, including its nice rollback button, inaccessible. How would one restore from the backup done with the upgrader module, then? It might be possible, but it's certainly not easy. A much better idea is to do a database backup (Backoffice -> Advanced Parameters -> DB Backup), then to download all the files via FTP. This way one can restore when restoring is actually needed: remove the broken garbage, then upload all the files. If the database got broken, too, use phpMyAdmin to restore from the backup in adminXXX/backups. Link to comment Share on other sites More sharing options...
vzex Posted November 8, 2017 Share Posted November 8, 2017 @alwayspaws doomed why? :) ROLLBACK IS A GOOD THING :fireworks: Thanks SO MUCH @Traumflug for spending your valuable time on this. I'm trying it now downloaded from this link: https://github.com/Traumflug/tbupdater Button is live but when I click on it no activity log screen? Double checking I installed correctly... Link to comment Share on other sites More sharing options...
alwayspaws Posted November 8, 2017 Share Posted November 8, 2017 I’m doomed because I don’t understand any of this stuff. I just go to my host account and back up the site and database after every change. @Traumflug You don’t create problems. You create solutions! I didn’t mean anything bad. Link to comment Share on other sites More sharing options...
alwayspaws Posted November 8, 2017 Share Posted November 8, 2017 @vzex keep us posted. I’ll keep my eye on this but I’m off for the rest of the day. :) Link to comment Share on other sites More sharing options...
vzex Posted November 8, 2017 Share Posted November 8, 2017 @alwayspaws I'm waiting to renew my hosting to add the easy backup options they offer but they couldn't sell it to me monthly until my current plan expired! I do the manual cpanel zip file and db backup in TB but the quick rollback was the best thing ever when I was first setting up my store! After seeing what you do with csv files this you can do no problem! It's just a module! Recharge and revisit :) Link to comment Share on other sites More sharing options...
Traumflug Posted November 8, 2017 Author Share Posted November 8, 2017 @vzex I’m trying it now downloaded from this link: https://github.com/Traumflug/tbupdater You have to switch to the supercollection branch: https://github.com/Traumflug/tbupdater/tree/supercollection Link to comment Share on other sites More sharing options...
alwayspaws Posted November 8, 2017 Share Posted November 8, 2017 @vzex that’s what I will try to do. Thanks:) Link to comment Share on other sites More sharing options...
vzex Posted November 8, 2017 Share Posted November 8, 2017 Hmm downloaded from supercollection branch from your new link deleted all the others in cpanel and I can't click update button now? Think I need my own advice Recharge and revisit :) Thanks I'll try again later maybe someone else will install in the mean time and report on the rollback feature! @traumflug said in The big upgrader-upgrade: @vzex I’m trying it now downloaded from this link: https://github.com/Traumflug/tbupdater You have to switch to the supercollection branch: https://github.com/Traumflug/tbupdater/tree/supercollection Link to comment Share on other sites More sharing options...
Traumflug Posted November 8, 2017 Author Share Posted November 8, 2017 @vzex but the quick rollback was the best thing ever when I was first setting up my store! Do I read here you use such rollbacks if editing code files didn't work out as expected? I can’t click update button now? After lowering the version in settings.inc.php the panel with the update button should look like this: Note that 1.0.2 above and 1.0.3 in the lower text differ. In case the update button is still disabled, please add a screenshot here. Link to comment Share on other sites More sharing options...
musicmaster Posted November 11, 2017 Share Posted November 11, 2017 Looks ok. One addition for db.php: The function executeS() contains the Tools::displayError() too. It too should be replaced with echo. Contrary to its name Tools::displayError does not display anything. It just returns the value that you give it after processing it with htmlentitiesUTF8(). Elsewhere in the code you see things like "die(Tools::displayError($msg))". It is used in several other places in Db.php too and I propose to replace them all. Note that the main db.php (not of the tbupdater module) uses the throw command. Unfortunately it is not easy to use the main classes in the updater module as the updater module uses a special namespace. Link to comment Share on other sites More sharing options...
vzex Posted November 11, 2017 Share Posted November 11, 2017 Thanks for your contribution to this @musicmaster looking forward to getting it installed! Link to comment Share on other sites More sharing options...
Traumflug Posted November 12, 2017 Author Share Posted November 12, 2017 One addition for db.php: The function executeS() contains the Tools::displayError() too. It too should be replaced with echo. Done: https://github.com/thirtybees/tbupdater/pull/11/commits/c7e7f29a3b2024edaf16886120e80520a2a1b6f2 Choosed the die() route, because in all these places, Tools::displayError() was followed by an exit(). Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now