UNA 10 Upgrade Help

The post by Andrew was getting really long and difficult to follow so, I figured I would start a discussion topic instead to try and help those who are having issues with upgrading to UNA 10 Beta. This is JUST regarding the updating and not any other issues. 

First and foremost - BACK YOUR SITE AND DATABASE UP BEFORE DOING THIS UPGRADE.  

Next: Go into Studio and see what version is displaying in the Dashboard.

If you are showing 9.0.0 you MUST upgrade to 9.0.1 FIRST before doing this upgrade. If you see 9.0.0 as your version number then like me and other, your inc/classes/BxDolUpgrader.php already has /beta/ in the URL. Not sure how this happened since I downloaded UNA 9.0 from the homepage here. 

To upgrade from 9.0.0 to 9.0.1 you will need to edit the  inc/classes/BxDolUpgrader.php file and remove the /beta/ from the URL so it looks like this: 

protected $_sUrlVersionCheck = 'https://v.una.io/';

Go back into your Dashboard and check to see if you now see a 9.0.1 is available. If you do not see it, clear your cache and refresh the page.

If you see it, click the button to upgrade to 9.0.1. You should receive an email once the update is successful. Note: The module upgrades WILL FAIL and that is OK right now. 

Once you are now at 9.0.1, you will need to edit the inc/classes/BxDolUpgrader.php again and add /beta/ to the URL like this:

protected $_sUrlVersionCheck = 'https://v.una.io/beta/'; 

Go back into your Dashboard and check to see if you now see a 10.0.0-B1 is available. If you do not see it, clear your cache and refresh the page.

If you see the option, Click to upgrade to 10.0.0-B1. Your modules will again try to update and this time, it should be successful. 

IMPORTANT: Your cron job must be setup properly in order for the upgrade to occur. If you do not have access to your cron job setup, you will need to consult with your hosting company. If you do have access to your cron job setup, you should be able to tell how often the cron job runs. This will help you know when the upgrade should be completed as well as receiving the email once it is done. 

You can check to see when your cron job last ran by going into Studio > Dashboard > click the arrow next to Server Tools and click Server Audit. Scroll down until you see  Last cron jobs execution 

You can also force your cron job to run by doing the following (need FTP access):

- Go into your /periodic folder via FTP

- rename your .htaccess file to something like .htaccess.bak

- In your browser, go to this URL:  http://www.mysite.com/periodic/cron.php or use https:// if you are running SSL. This page will be blank BUT you will see that it looks like it is "loading". This is expected. Once finishes spinning, you will know it finished. Go back into your Dashboard and see if the Upgrade was successful. 

- Remember to remove the .bak after you have tested. 

EDIT 6/27/2019: Adding this info since some member have ran into the issue where they could not do the Upgrade due to files being modified

If you have very minor modifications and you want update script to overwrite it then you can enable the following setting:
Studio > Settings > System > Site Settings > Force auto-update, even if some files were modified
it will make updates to work if less than 5% of files are modified.

If more than 5% of files are modified then it's better to merge changes manually to avoid problems with the update.

Another option if more than 5% of files are modified is to overwrite any changes you've made in source code, then you need to change the following line in inc/classes/BxDolInstallerUtils.php file:

define('BX_FORCE_AUTOUPDATE_MAX_CHANGED_FILES_PERCENT', 0.05);

to:

define('BX_FORCE_AUTOUPDATE_MAX_CHANGED_FILES_PERCENT', 1.00);

Then try to upgrade UNA or modules as usual.

  • 2810
  • More
Replies (45)
    • This worked! I changed the .htaccess in .periodic folder to .htaccess.bak. Also, I did (protected $_sUrlVersionCheck = '_https://v.una.io/';) and (/beta) without the (_) symbol. Is it ok if I keep my .htaccess changed to .bak? Will UNA stop using the cronjobs or will it make the cronjobs faster?

      • You will need to remove the .bak from the .htacess file.  That is only used to manually run your cron job. 

        • After this step, the following message appeared (see Screenshot):

          Can't apply upgrade because the following files were modified: inc/classes/BxDolUpgrader.php

          ----------

          STEP 1: To upgrade from 9.0.0 to 9.0.1 you will need to edit the  inc/classes/BxDolUpgrader.php file and remove the /beta/ from the URL so it looks like this: 

          protected $_sUrlVersionCheck = '_https://v.una.io/';

          ----------

          The control panel has become available 9.0.1.

          But a warning appears and nothing happens.

          What to do?

          • image_transcoder.php?o=bx_froala_image&h=1478&dpx=2&t=1561543233

            Is this also normal? 

              • Gritly "Wed Server - Undefined" is normal, as an example it can happen when you have Nginx web server.

                • Your link can not be updated.

                  I tried to replace the following:

                  -------------------------------------------------------------------------------------------------------

                  inc/classes/BxDolInstallerUtils.phpфайле:

                  define ( ' BX_FORCE_AUTOUPDATE_MAX_CHANGED_FILES_PERCENT ' , 0,05 );

                  чтобы:

                  define ( ' BX_FORCE_AUTOUPDATE_MAX_CHANGED_FILES_PERCENT ' , 1,00 );

                  ------------------------------------------------------------------------------------------------------

                  But now when you click on the button, the following warning pops up:

                  Can't apply upgrade because the following files were modified: inc/classes/BxDolUpgrader.php, inc/classes/BxDolInstallerUtils.php

                  See attachment
                  • Alexasha - It looks like you still need to do this:

                    Studio > Settings > System > Site Settings > Force auto-update, even if some files were modified
                    it will make updates to work if less than 5% of files are modified.

                    • @Chris , 

                      Now it pops up such a window, but the update does not occur, the cache was cleaned:

                      --------------------------------------------------

                      Site will be upgraded within a minute.

                      Don't forget to check for modules updates after that.

                      -------------------------------------------------

                      • That is expected. If you cron job is setup properly, it should update your site automatically. 

                        • And what schedule should stand in the cron?

                          • I do not know how your cron job is setup. You can go to Studio > Dashboard > click the down arrow by Host Tools and choose "Server Audit".. Scroll down and you should see how your cron job is setup there. Like this:

                            SHELL="/usr/bin/bash" *    *    *    *    *    /opt/plesk/php/7.1/bin/php -q /var/www/vhosts/mywebsite.com/httpdocs/periodic/cron.php

                            Those 5 stars you see there..  * * * * * mean I have mine setup to run every minute. 

                            • What if more than 5% have been changed? My Protean module needs to be reinstalled before it can be upgraded to 10 because it supposedly has been changed by more than 5%.

                              Now my site is down with the white screen.

                              How is this manual upgrade of Protean done?

                              • 2 things actually....

                                Studio > Settings > System > Site Settings > Force auto-update, even if some files were modified
                                it will make updates to work if less than 5% of files are modified.

                                and then do this:

                                if more than 5% of files are modified is to overwrite any changes you've made in source code, then you need to change the following line in inc/classes/BxDolInstallerUtils.phpfile:

                                define('BX_FORCE_AUTOUPDATE_MAX_CHANGED_FILES_PERCENT', 0.05);

                                to:

                                define('BX_FORCE_AUTOUPDATE_MAX_CHANGED_FILES_PERCENT', 1.00);

                                • Chris, where did you get that information? You are a genius!!!

                                  Thank you for the quick reply. I would have never figured this out on my own. 

                                  I am back on the air and should change this file back to .05, I suppose.

                                  Much, much thanks! 

                                  • when trying to do the upgrade on my site, I get an error saying "Can't apply upgrade because the following files were modified: inc/classes/BxDolUpgrader.php" but that needed to be edited for the update to show.

                                    • Just follow my steps above Ryan. 

                                      • I had followed the steps, but as I said, after updating the URL to include the /beta/ I get an error because i "modified" the upgrader.php file.

                                        • Did you do this in Studio?
                                          Studio > Settings > System > Site Settings > Force auto-update, even if some files were modified

                                          • Doesn't work. nginx.  Email reads 

                                            Upgrade failed due to the following error:

                                            Files copying failed.

                                            4 different sites. Well 3 now.

                                            • I do not use Nginx so I am not sure if anything special needs to be done for that setup. I am tagging Alex T⚜️ to see if maybe he can help. 

                                              To me "Files copying failed" would mean that it could not reach the URL or some type of permissions error but.. If permissions, it should say Permission Denied or something I would think. Let's see what Alex says. 

                                              • I tried setting everything to 777 on one site. Didn't help.  No rush now.  I moved one client over to another product and I will work out a solution for the other client. The product is not ready or market and beta is the correct designation.  I have been doing this for decades and I think it is time to disconnect from UNA.  I can work on the one site on my own and figure things out.  I am not the best coder, but I can manage.  Without the daily influx of bug reports and "possible" issues, it will be easier to focus on the application, social architecture other things I like to work on.  

                                                Thanks for responding. I do appreciate it.  

                                                • I am of the same opinion as Chris, because every time I got this message it was a problem of the right to write. In my case, it is often one or two files that I replaced by having renamed the original. The new file transferred is then in 644 at home www-data can not overwrite it. After changing this I do not have this error anymore.

                                                  • I had to make a correction to my post. It seems that when I posted how to change the inc/classes/BxDolUpgrader.php so that the /beta/ could be downloaded, the URL had a _ (underscore) in it. I copied it directly from GitHub however, this is not needed. 

                                                    I corrected the initial post to remove the _ from the Update URL. 

                                                    • I had the same error on a site that was a clean install of 9.0 with base modules. I manually updated that site and I can't be certain I tried every permutation of every suggestion posts. Certainly most of them.  On the others, there were very slight modifications - no more than 10 lines and I could go through every single file and compare it to the full list of UNA files on Github.  Even adding them to a database would be insane.  No files were replaced and I assume the unzip went fine. There are a few files on the sites unrelated to UNA- notes mostly.  

                                                      I don't have 100 or more hours to debug what is most likely a UNA issue. I have done that before.  I want to start working on the websites instead of UNA files and application related issues. develop a rudimentary custom design in the time I have spent n UNA. 

                                                      It is a waste of time and energy.  I will figure out something for the one site still on UNA and if the next update fails - mover on to another app. 

                                                      Still, thanks for the posts. It does help and I appreciate them.

                                                      • I did not, I didn't remember seeing that, but I have now thank you....

                                                        • The underscore (_) keeps the link in the post from being active (functional).  I guess adding a note - remove underscore - would help.

                                                          • The original post I made was corrected to remove the _ and I did make a note of it as well about it above. 

                                                            • My 9.0.1 tells me that the BxDolUpgrader.php is changed so upgrade cannot continue. lol

                                                              • Read the EDIT 6/27/2019: part of the post 😁 

                                                                • Right on :) thanks Chris

                                                                  • You're welcome.

                                                                    • Hi Chris. Great job! I upgraded to 9.01, but need to upgrade to 10 beta 1 before beta 2 and the update button only says beta 2. Is there a way to upgrade to beta 1 first? Because Andrew says we need to before beta 2.

                                                                      Hope you can help.

                                                                      Thank you

                                                                      • Theory - I assume after the 9.0.1 update, you put the /beta/ back into the inc/classes/BxDolUpgrader.php file? And when you go into Studio, it is giving you the option for Beta 2 only?

                                                                        I would think that it should go in order. I do know there are way to download the actual Beta 1 update via zip file on Github here:

                                                                        https://github.com/unaio/una/releases/tag/10.0.0-B1 

                                                                        However, there are no instructions on how to do this manually. 

                                                                        Andrew Boon or Alex T⚜️ - Can you provide instructions on how member have not updated to Beta 1 can do this from UNA 9.0.1? From what is being said here, after 9.0.1, it is showing Beta 2 and they do not have the option to upgrade to Beta 1 first. 

                                                                        • Chris,

                                                                          Thank you for your reply. Yes everything you stated is correct. Andrew Boon or Alex T⚜️ this would be helpful.

                                                                          • Your site is updated incrementally anyway. So if you have UNA v.9.0.1 and it says that 10.0.0-B2 available, then when you click on "Upgrade" then your site is upgraded to 10.0.0-B1 first, then you need to click to "Upgrade" second time after 2-3 minutes to upgrade to 10.0.0-B2. 

                                                                            • See my post from above:

                                                                              I do not know how your cron job is setup. You can go to Studio > Dashboard > click the down arrow by Host Tools and choose "Server Audit".. Scroll down and you should see how your cron job is setup there. Like this:

                                                                              SHELL="/usr/bin/bash" *    *    *    *    *    /opt/plesk/php/7.1/bin/php -q /var/www/vhosts/mywebsite.com/httpdocs/periodic/cron.php

                                                                              Those 5 stars you see there..  * * * * * mean I have mine setup to run every minute. 

                                                                              After that, you would need to login to your backend (Plesk/cPanel/etc) and make sure that the cron is setup properly. I also talk about a way to force it in the original post. 

                                                                              • I was told by Alex T⚜️ that if my site has 9.0.1 and i wanted to wait for final release i can as well wait, am i correct?

                                                                                • Yes,  that is correct. You can wait until the final release. 

                                                                                  • Cool, thanks!


                                                                                    • i set up cron jobs but i dont see it working. I believe it is well set up because I do not get the email that it is set up wrong.

                                                                                      Do you know what can be?

                                                                                      • The fact that you are not getting success/failure emails when trying to upgrade validates that your cron is NOT working - unless you have the wrong email address setup. The screenshot you attached it really small but it looks like you have this part in the actual command line:

                                                                                        SHELL="/usr/bin/bash" *    *    *    *    *

                                                                                        You shouldn't need that in the command. All you should need is this part (your may vary)

                                                                                         /opt/plesk/php/7.1/bin/php -q /var/www/vhosts/mywebsite.com/httpdocs/periodic/cron.php 

                                                                                        So try removing the SHELL="/usr/bin/bash" *    *    *    *    *  part in the command box and see if that will work. 

                                                                                        • what line of code is this ment to be on i cant see it i see alot of other fils that say protected but dont see    protected $_sUrlVersionCheck

                                                                                          • It's located in this file:

                                                                                            inc/classes/BxDolUpgrader.php

                                                                                            • Yea i have been in and out of it do you think it could be that the cron job is still connected to my dolphin site and its messing it up i installed it onto an domain alies to test it out see if i like it better than dolphin i do do you think i should delete it all and do a fresh install?

                                                                                              Login or Join to comment.