Upgrade to MODx 1.0.3 didn't quite make it

22 Apr 2010 MODx

I've been using MODx 1.0.3 on my PC since it came out. I've also been working on getting PubKit proper (not just the blog part) fit to publish. So I thought I'd upgrade Pogwatch before setting up PubKit for its blogging tool and documenting it here.

Sadly, this was not to be. Earlier in the evening, I upgraded Pog Academy, the demo site for PubKit, to use the full version, and wrote my first news item with it after only very small adjustments. This was encouraging.

Rather than overwrite the old files and leave some dross around, I prefer to rename the old assets and manager directories and replace them with an uncustomized set of the new MODx files, transferring in my own mods from the old assets folder. That went OK with the Academy, but Pogwatch got rather upset on the first run at Install, complaining about mismatched columns for Jot records, and not completing. Running install again with Jot deselected left the site in a strange state, with the Ditto section deciding it was restricted to logged in users, and unable to find some of its templates.

So for now Pogwatch is still on an older version of MODx. I'll do the upgrade on a local copy of the site and upload it when everything is hunky dory, which is my preferred routine in any case. And trotting out PubKit Major to the world stage will have to wait a few more days, probably.

At least one thing worked - I usually upload a zip file of MODx to the server, and use a little PHP magic to unzip it in situ to a folder there. Then I move the assets, manager and install folders to their proper position and add in my customizations. The upload takes a few minutes rather than half an hour or so for hundreds of previously unzipped files, and the unzip itself takes just a few seconds. This is especially good for me, as I tend to realize I'm uploading to the wrong destination halfway through that great heap of TinyMCE files.


Comments (4)

sharkbait
Posts: 3
Comment
heads up
Reply #1 on : Fri April 23, 2010, 10:04:46
Hi Keith,

what PHP magic to unzip on the server are you using? :)

thanks, j
kp52
Posts: 1
Comment
Re: Upgrade to MODx 1.0.3 didn't quite make it
Reply #2 on : Fri April 23, 2010, 14:19:37
Just a ZipArchive object. It preserves the paths in the Zip file, so the MODx upload doesn't immediately overwrite the live installation. Here's what I used to restore Pogwatch yesterday (my host gives me a backup that zips the whole site, I just removed the .sql file and some old junk from the zip before putting it back).

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>UNZIP</title>
</head>

<body>
<?php
echo "hello!<br />";
$zip = new ZipArchive;
$res = $zip->open('pogrestore.zip');
if ($res === TRUE) {
$zip->extractTo('.');
$zip->close();
echo 'ok';
} else {
echo 'failed';
}
?>
</body>
</html>
sharkbait
Posts: 3
Comment
Re: Upgrade to MODx 1.0.3 didn't quite make it
Reply #3 on : Fri April 23, 2010, 18:22:37
great, thanks
sharkbait
Posts: 3
Comment
Re: Upgrade to MODx 1.0.3 didn't quite make it
Reply #4 on : Sat April 24, 2010, 12:23:35
... it's working :)

Write a comment

  • Required fields are marked with *.

If you have trouble reading the code, click on the code itself to generate a new random code.