Jump to content

Module: ProcessWire Core Upgrade


ryan

Recommended Posts

Hi all,

I'm getting an error with this module when trying to perform a core update:

Method WireHttp::setTimeout does not exist or is not callable in this context

PW 2.5.3 in shared hosting running smoothly apart from that. Any ideas?

Thanks

Link to comment
Share on other sites

  • 3 weeks later...

I'm also getting an error on PW 2.6.23 and 2.7.2:

Error loading GitHub branches - https://api.github.com/repos/ryancramerdesign/Processwire/branches - HTTP error(s): 403 Forbidden: 2: fopen(https://api.github.com/repos/ryancramerdesign/Processwire/branches): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden , Forbidden - Check that HTTP requests are not blocked by your server.
Link to comment
Share on other sites

fopen()ing that URL also fails on my local host using both PHP 5.6 and 7, so I'd tentatively point my finger towards github (allow_url_fopen is enabled and requests from the browser return the expected JSON content).

Link to comment
Share on other sites

Okay, I think I've tracked it down. The problem vanished as soon as set PHP's user_agent, which was empty in all configurations. So either setting that in php.ini, in the .htaccess or somewhere early in the PHP code should get things running again.

Link to comment
Share on other sites

It's a php.ini directive and should be set there, if possible. If PHP runs as an apache module, you should be able to set

php_value user_agent "PHP"

there. Or you could set it in PW's init.php.

ini_set("user_agent", "PHP " . PHP_VERSION);
  • Like 2
Link to comment
Share on other sites

Modules show as Upgrades 0.0.6 and Upgrades Checker 0.0.5. But I still get error "Error loading GitHub branches - https://api.github.com/repos/ryancramerdesign/Processwire/branches - HTTP error(s): 403 Forbidden: 2: fopen(https://api.github.com/repos/ryancramerdesign/Processwire/branches): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden , Forbidden - Check that HTTP requests are not blocked by your server."

Link to comment
Share on other sites

  • 1 month later...

I wanted upgrade from Processwire from 3.0.8 to 3.0.11via the Upgrade Module (0.0.6),
but it said: "Unable to locate ZIP: C:/Users/gf/Documents/UwAmp/www/fullpage3/site/assets/cache/ProcessWireUpgrade/devns.zip"
but the module downloaded the "wire-3.0.11" folder into the main directory, so I did the upgrade by hand...

Link to comment
Share on other sites

  • 1 month later...

Trying to use this module with PW version 2.4.0, I get the following error:

TemplateFile: Method WireHttp::setTimeout does not exist or is not callable in this context

ProcessWireUpgradeCheck.module(269): Wire->__call('setTimeout', Array)

The module page says, it should be compatible with 2.4.

Link to comment
Share on other sites

The setTimeout method wasn't added to WireHttp until PW 2.5:

https://github.com/ryancramerdesign/ProcessWire/commit/c06209b4e03036cf0026b57c6015192dc61c936d#diff-1972780faf7a13076c1284fbb478144a

so I believe Ryan mistakenly added 2.3 and 2.4 to the list of compatible versions.

But why not upgrade to 2.7 - 2.4 is very old now - so many amazing new features to make use of.

Link to comment
Share on other sites

Yes, we might upgrade soon to 2.7. Just have to test properly. I have need for AdminRestrictBranch module which is also not compatible with 2.4, so have to upgrade.

Link to comment
Share on other sites

But why not upgrade to 2.7 - 2.4 is very old now - so many amazing new features to make use of.

Maybe that was the reason to install the module?

@Ipa This might be an addition from after Ryan added the module to the mods directory. 

Link to comment
Share on other sites

Yes, we might upgrade soon to 2.7. Just have to test properly. I have need for AdminRestrictBranch module which is also not compatible with 2.4, so have to upgrade.

Did you test AdminRestrictBranch with 2.4 or are you just basing it on what it says in the modules directory?

If you did test and got an error, could you post for me - maybe it will be an easy fix - no promises - I don't want to spend a lot of time making it work with such an old version of PW, but if I can help, I will. 

  • Like 1
Link to comment
Share on other sites

  • 3 months later...

I just upgraded manually to 2.8.30 but still get the "Error loading GitHub branches - https://api.github.com/repos/ryancramerdesign/Processwire/branches - HTTP error(s): 403 Forbidden: 2: fopen(https://api.github.com/repos/ryancramerdesign/Processwire/branches): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden , Forbidden - Check that HTTP requests are not blocked by your server."

Can anyone explain me in plain text how to solve this?

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 months later...
3 minutes ago, Richard Jedlička said:

Yeah, it is weird. I have a latest version (0.0.7) of a module but it doesn't offer me a PW version from processwire/processwire repo. Only devns branch from old repo which is version 3.0.33, i installed it and realized it later.

 

Definitely working here. Have you done a Modules > Refresh? Maybe it is caching the source?

  • Like 3
Link to comment
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.
×
×
  • Create New...