ryan

Module: ProcessWire Core Upgrade

Recommended Posts

I've found the problem. There is a method getCoreBranches which returns the branches already loaded in session if the second parameter is false. But it is never called with the second parameter set to true:

https://github.com/ryancramerdesign/ProcessWireUpgrade/blob/5333322703f0f47a6d6454e8fdb3107db330eec4/ProcessWireUpgradeCheck.module#L171

So I changed temporarily the call and it works now. But I gues it should be enough to relogin.

  • Like 3

Share this post


Link to post
Share on other sites
adrian    7,647
1 minute ago, Richard Jedlička said:

I've found the problem. There is a method getCoreBranches which returns the branches already loaded in session if the second parameter is false. But it is never called with the second parameter to true: https://github.com/ryancramerdesign/ProcessWireUpgrade/blob/master/ProcessWireUpgradeCheck.module#L171

So I changed temporarily the call and it works now. But I gues it should be enough to relogin.

 

Nice sleuthing - sorry, I should have thought to mention that since I posted this issues ages ago: https://github.com/ryancramerdesign/ProcessWireUpgrade/issues/10

  • Like 1

Share this post


Link to post
Share on other sites
DaveP    763
On 12/10/2016 at 8:50 PM, adrian said:

Have you done a Modules > Refresh? Maybe it is caching the source?

Thanks @adrian that worked for me - was getting 'Error loading GitHub branches' etc, but only for core. That fixed it.

<edit>..or at least it did temporarily. It let me upgrade the core (3.0.42 => 3.0.55) and install the new Uikit admin, and now it's back to saying there's a 403 error loading the core repository. Hmmm.</edit>

Edited by DaveP
Update (and it's not good...)
  • Like 1

Share this post


Link to post
Share on other sites
DaveP    763

Update - I can confirm @Richard Jedlička's earlier post is correct. Changing line 171 of ProcessWireUpgradeCheck.module to 

$branches = $this->getCoreBranches(false, true);

fixes the (intermittent) problems I have been experiencing.

Share this post


Link to post
Share on other sites
BFD Calendar    35

I upgraded manually to 3.0.36 on one of my sites by replacing the wire folder and ProcessWireUpgrade worked. Then I upgraded via the module to 3.0.62. Now the error is back....

Share this post


Link to post
Share on other sites
RDC    5

Hi Ryan

Great module as it lets less able users do updates (even though they aren't required - people feel more comfortable keeping their site up to date). These days I think it is a required part of any program (even if it is more only for comfort not security!!!)

I tend to ship out Processwire to my clients to change content and leave it up to them. This means that a couple of them have found the Update module and I end up getting calls about what all the versions are and which one is the right one (they're all used WordPress and updates messing things up so they don't want to do anything wrong   ;)

I had a look around the module to added a check mark in the config section that would only list the One Master version so that it was clearer as to which version (only the one) needed updating (or not) but I couldn't make heads nor tails of the rest of it [no time for a deep analysis]. I've included the updated ProcessWireUpgradeCheck.config.php which just adds a 'dontuseDeveloper' variable/array.

If you think it would benefit people to include it otherwise maybe just a quick point in the direction of how to list only the one Master update that would be great.

 

Thanks for the great modules you do... and of course for Processwire itself - which is a very welcome relief from WP and the other bloated CMSes.

ProcessWireUpgradeCheck.config.php

  • Like 1

Share this post


Link to post
Share on other sites
BFD Calendar    35

I'm still experiencing "Error loading GitHub branches" on different sites with different PW versions. 3.0.36 and 3.0.42 for instance still give the error. A final solution for this would be a great help as now it seems more like a procession of trial and error via FTP.

Share this post


Link to post
Share on other sites
cstevensjr    1,369

Have you tried uninstalling the ProcessWire Core Upgrade module and then reinstalling it?

Share this post


Link to post
Share on other sites
BFD Calendar    35
5 minutes ago, cstevensjr said:

Have you tried uninstalling the ProcessWire Core Upgrade module and then reinstalling it?

I did, problem persists.

Share this post


Link to post
Share on other sites
cstevensjr    1,369

Okay,  I've had in the past some installations that were manually done or a combination of manual/different updating methods.  Sometimes this gets things out-of-whack where upgrading is concerned.

I suggest you:

pw-update1.png.4a14544fa614241821a89534d1bd7983.png

(1) FTP to your actual files and manually delete the ProcessWire Upgrade module.  This will alleviate any left-over files that may have accumulated.

pw-update2.thumb.png.127dc9e4d059ae38673b0279229abab0.png 

(2) Click the Refresh button after manually deleting the ProcessWire Upgrade module.  This will refresh the cache and alleviate any other problems.

pw-update3.thumb.png.26437d987cbccfe0e81a8680f90f3eb4.png

(3) Reinstall the ProcessWire Upgrade module using this method.  This goes directly to the modules.processwire.com website and pulls an official version of this module.

pw-update4.thumb.png.bdb14890432a1d450e7b0f3cef4e2ef9.pngpw-update5.thumb.png.0fc3489fa0b19780c7cffc3daeb44b4d.png

(4) Once you have the ProcessWire Upgrade module reinstalled, check to make sure you are at the latest version (0.0.7 as of this writing). 

One thing to remember, the ProcessWire Upgrade module requires ProcessWire 2.5.20 or newer to reliably function.

(5) Please let us know what version of PHP and ProcessWire you are having this problem with?  Are you having this problem with all your ProcessWire sites?  If not, what are the differences that you know about?  All this will help us to troubleshoot the issues you are having.   This does not mean there aren't problems with the module, however we need to eliminate as many factors as possible to get your installations working.

 

 

  • Like 1

Share this post


Link to post
Share on other sites
cstevensjr    1,369
1 hour ago, BFD Calendar said:

I'm still experiencing "Error loading GitHub branches" on different sites with different PW versions. 3.0.36 and 3.0.42 for instance still give the error. A final solution for this would be a great help as now it seems more like a procession of trial and error via FTP.

This is the only posting that I have seen that refers to that error:

 

  • Like 1

Share this post


Link to post
Share on other sites
BFD Calendar    35

Ok, I tried all this, to no avail. I'm using PW 3.0.42 on one site and 3.0.62 on another one, same problem.

I noticed a .ProcessWireUpgrade folder in the modules folder so I also removed that.

Three sites are hosted with OVH.net, one with a different provider doesn't have the problem. So that's where to look, but still I wouldn't know where exactly. PHP version is 5.6 if I'm right.

Share this post


Link to post
Share on other sites
cstevensjr    1,369

If you have the ability, on a new installation of ProcessWIre with only the ProcessWire Upgrade module installed, what happens? 

Are all the errors associated with one hosting provider?  If so, have you inquired whether they have some security script running that could erroneously flag these websites when the ProcessWire Upgrade module is running?

Just looking at all possible explanations.  I know it can be very frustrating whenever someone has these types of issues.  We will eventually figure out what's happening and correct the issue.

 

  • Like 2

Share this post


Link to post
Share on other sites
BFD Calendar    35

Same provider - two sites - PHP 7.0 - PW 2.6.23 rc2 upgrades works - PW 3.0.42 upgrades gives error.

But... there was some old .gitignore file that PW installed in the old days. Removed that and yes! Upgrades are back. I'll keep my fingers crossed and see if they stay...

  • Like 3

Share this post


Link to post
Share on other sites
BFD Calendar    35
14 hours ago, BFD Calendar said:

But... there was some old .gitignore file that PW installed in the old days. Removed that and yes! Upgrades are back. I'll keep my fingers crossed and see if they stay...

Unfortunately my luck only lasted 14 hours... Upon logging in today the error is back.

Share this post


Link to post
Share on other sites
adrian    7,647

I have had random failures on an old shared host that I no longer use. I never got around to debugging, but I wondering if it's a curl issue. I'd be curious if you have better luck disabling curl here: https://github.com/processwire/processwire/blob/57b297fd1d828961b20ef29782012f75957d6886/wire/core/WireHttp.php#L639

Just remove 'curl' from the $allowMethods array. It should resort to fopen and socket consecutively if curl fails completely, but maybe there is some curl setting on that host that is randomly problematic with Github. Not sure, but maybe worth a try.

  • Like 2

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.