Jump to content

Upgrade


matjazp
 Share

Recommended Posts

Hi!

I plan to upgrade from 2.4.2 to 2.5.2 (latest stable?). I know one should just replace wire directory (and index.php and .htaccess - I'm on windows with IIS) with new version, but still, should I expect problems? Or should I use upgrade module? I use just a few modules PageListPin, JqueryDatatables, Ckeditor, Fieldtypeselect. I also copied wire\modules\AdminThemeDefault to wire\templates-admin to use with my custom ProcessPageEdit module. I wasn't following the developement and this forum for few months, I just noticed some modules that might be of help (Databasebackups, Siteprofileexporter, ProcesswireUpgrade beta). I'm just a bit confused and need guidance (and help if something goes wrong). Since backup is everything, what is the best approach to make databased backup (and restore later on)? 

Link to comment
Share on other sites

This topic helped me a lot when I was upgrading:

https://processwire.com/talk/topic/7488-upgrading-25-dev-versions/?hl=%2Bupgrade+%2Bdev

I've upgraded a couple of time with no problems and have several modules installed.  However, I installed them to /site/modules not /wire/modules.  I believe that is where they are supposed to go so they don't get overwritten with upgrades.

Link to comment
Share on other sites

There are probably others here that can probably give you much more concise advice on how to handle / correct that error, but my best suggestion would be to rename your current 'wire' folder to something like 'wire_old'.  Then, upload the wire folder from 2.5.4 along with the index.php and .htaccess files.  

If that is what you've already done, hopefully someone else here can provide some more suggestions.

Link to comment
Share on other sites

Thx for link. I tried upgrade from 2.4.0 to 2.5.4 this is the error I got:

 WireCache: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'pw.caches' doesn't exist

I'm afraid you haven't upgraded properly if the caches-table doesn't exist since it means that the SystemUpdater hasn't been executed, at least not with the latest SystemUpdates (SystemUpdate6.php in particular). The SystemUpdater is executed with every request, so you probably just haven't installed a fresh wire-folder. Upgrading means replacing the whole wire-folder, not just wire/core for an example.

If in doubt, could you please list the contents of wire/modules/System/SystemUpdater so we can confirm this?

PS. I'm not sure if I understood your OP correctly, but you should never edit or copy anything under the wire-folder. It is meant to be replaced entirely during the ugprade-process (just as Gabe there said).

Link to comment
Share on other sites

I replaced wire/core and wire/modules (and index.php) but not wire\templates-admin folder.

In the wire/modules/System/SystemUpdater there are SystemUpdate1.php, SystemUpdate4.php, SystemUpdate5.php, SystemUpdate6.php, SystemUpdate7.php, SystemUpdate9.php and SystemUpdater.module. Log file system-updater.txt looks fine, no errors there.

Yes, I know I shouldn't modify anything under wire, since upgrade will overwrite files, but sometimes it is just quick fix. Still learning a proper way to hook :-) 

Link to comment
Share on other sites

Alright! Are you able to access the admin site at all? Can you for an example go and open the configuration of the SystemUpdater -module and tell me the version number you see there?

Are you able to access the database directly? If yes, you could always create the table manually with

CREATE TABLE caches (
        name VARCHAR(128) NOT NULL PRIMARY KEY,
        data MEDIUMTEXT NOT NULL,
        expires DATETIME NOT NULL,
        INDEX expires (expires)
);

However there might still be something wrong with your installation, so it's good to get to the bottom of this before putting anything to production that's fixed by manually modifying the database.

Link to comment
Share on other sites

Table is already there so no need to create it by hand. Site is working like nothing happened :-) I tried and upgraded another site with 2.4.0 and the error is again present, but everything is working.

Could you then please elaborate on where the error is presenting itself?

Have you done a hard refresh on your browser (e.g. CTRL-F5 or going Incognito)?

This could also be something that's stuck on the new System Notifications and isn't actually a new exception at all. I'm able to give more accurate guesses with more information.

If this happens on the admin-site, could you please turn debug-mode on from your site/config.php and give us the complete stack-trace? Of course, if this is not a real exception happening, then the debug-mode won't most likely make any difference.

Could you also check if site/assets/logs/errors.txt has anything.

Link to comment
Share on other sites

Error is not presenting anywhere, as far as I can see. Debug mode was on already when the upgrade took place. errors.txt shows:

2014-10-13 05:57:04 guest http://mysite/processwire/login/ SQLSTATE[42S02]: Base table or view not found: 1146 Table 'pwferi.caches' doesn't exist (WireCache)
2014-10-13 05:57:04 guest http://mysite/processwire/login/ SQLSTATE[42S02]: Base table or view not found: 1146 Table 'pwferi.caches' doesn't exist (WireCache)
 
2014-10-13 05:57:25 user? page? Warning: there appear to be two copies of module "InputfieldCKEditor" on the file system. Please remove the one in /site/modules/ unless you need them both present for some reason. (WireLog)
2014-10-13 05:57:25 user? page? Warning: there appear to be two copies of module "InputfieldCKEditor" on the file system. Please remove the one in /site/modules/ unless you need them both present for some reason. (WireLog)
2014-10-13 05:57:25 admin http://mysite/processwire/ Warning: there appear to be two copies of module "InputfieldCKEditor" on the file system. Please remove the one in /site/modules/ unless you need them both present for some reason. (WireLog)
2014-10-13 05:57:25 admin http://mysite/processwire/ Warning: there appear to be two copies of module "InputfieldCKEditor" on the file system. Please remove the one in /site/modules/ unless you need them both present for some reason. (WireLog)
 
Those warnings about CKeditor are expected and I remove duplicates
Link to comment
Share on other sites

  • 1 year later...

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...