davo Posted November 15, 2016 Share Posted November 15, 2016 Hi I'm about to prepare to do an upgrade from ProcessWire 2.8.33 to 3.0.39. Has anyone experience any complications or issues that I should be aware of? Davo Link to comment Share on other sites More sharing options...
szabesz Posted November 15, 2016 Share Posted November 15, 2016 Well, most important thing is the compiler/namespace feature: https://processwire.com/blog/posts/processwire-3.0.14-updates-file-compiler-fields-and-more/ or in more detail: https://www.google.hu/search?as_sitesearch=processwire.com%2Fblog&as_q=recipe#q=namespace+site:processwire.com%2Fblog Non core/Ryan modules might fail, so it is recommended to read up on them too. And most importantly I would certainly clone it to a dev environment and upgrade that instance of the site firts, just to see what actually happens.... 2 Link to comment Share on other sites More sharing options...
davo Posted December 5, 2016 Author Share Posted December 5, 2016 I gave the upgrade to 3 a go today, but i'm hitting a couple of problems. I have a functions file but when it is called from in a template I get this error: Error: Call to undefined function wire() (line 155 of /var/www/vhosts/dudmc.com/httpdocs/site/templates/myfunctionlib.inc) Do I have to amend anything to make this work again? Link to comment Share on other sites More sharing options...
szabesz Posted December 6, 2016 Share Posted December 6, 2016 Perhaps is it a missing ProcessWire namespace declaration? Link to comment Share on other sites More sharing options...
FrancisChung Posted December 7, 2016 Share Posted December 7, 2016 I made a branch of our site that has the PW3 upgraded running on PHP7 (current site runs on PW2.5.x and PHP 5.5/5.6). These are the things I had to change to get it working, but your mileage may vary slightly depending on which core functions you've used. wire(page) -> \Processwire\Wire("page") wire(pages) -> \Processwire\Wire("pages") wire(config) -> \Processwire\Wire("config") wire(sanitizer) -> \Processwire\Wire("sanitizer") \PageArray() -> \Processwire\PageArray() Link to comment Share on other sites More sharing options...
adrian Posted December 7, 2016 Share Posted December 7, 2016 If you have the filecompiler turned on, you usually shouldn't have to do anything to upgrade from 2.x to 3.x. If you don't want to use it, all you should have to do is add: namespace ProcessWire; at the top of your template files. Generally there should be no need to prepend all wire() calls like that. 2 Link to comment Share on other sites More sharing options...
FrancisChung Posted December 7, 2016 Share Posted December 7, 2016 1 hour ago, adrian said: If you have the filecompiler turned on, you usually shouldn't have to do anything to upgrade from 2.x to 3.x. If you don't want to use it, all you should have to do is add: namespace ProcessWire; at the top of your template files. Generally there should be no need to prepend all wire() calls like that. Does this work if you're using multiple namespaces on your project? I couldn't get it to work otherwise .... 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