Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2020-09-05 14:25:32
- awarnock
- New Member
- Registered: 2020-09-05
- Posts: 8
Migration and update from 4.4.1 to 4.8.2
Thanks in advance for any advice you can render.
I’m no textpattern expert but I’m a sysadmin, mostly familiar with Drupal and WordPress, helping a friend upgrade a textpattern site from v4.4.1 on a soon-to-be-retired CENTOS6 server to a newer CENTOS8 server. The v4.4.1 version doesn’t run on the newer server because of PHP errors (and no, I can’t downgrade PHP). I thought I’d upgrade textpattern to a newer version that works with PHP v7.2 but I’m not having any luck. It appears that the database automigration is failing.
Am I being too ambitious in upgrading from v4.4.1 to v4.8.2? Should I maybe try smaller, incremental upgrades to intermediate versions? Note that I cannot get to the diagnostics page because I can’t get anywhere. Is there a command-line diagnostics tool available?
The error I get when I go to https://new.mysite.com/textpattern is:
User_Error “Field ‘prefs_id’ doesn’t have a default value”
in /var/www/vhosts/iragitlin.com/html/textpattern/lib/txplib_db.php at line 448.
textpattern/lib/txplib_admin.php:746 adminErrorHandler()
updateErrorHandler()
textpattern/lib/txplib_db.php:448 trigger_error()
textpattern/lib/txplib_db.php:522 safe_query()
textpattern/update/_to_4.5.0.php:41 safe_insert()
textpattern/update/_update.php:102 include()
textpattern/index.php:177 include()
User_Error “Unknown column ‘owner’ in ‘field list’”
in /var/www/mysite.com/html/textpattern/lib/txplib_db.php at line 448.
textpattern/lib/txplib_admin.php:746 adminErrorHandler()
updateErrorHandler()
textpattern/lib/txplib_db.php:448 trigger_error()
textpattern/vendors/Textpattern/L10n/Lang.php:588 safe_query()
textpattern/vendors/Textpattern/L10n/Lang.php:471 Textpattern\L10n\Lang->upsertPack()
textpattern/update/_update.php:137 Textpattern\L10n\Lang->installFile()
textpattern/index.php:177 include()
- [internal function]: updateErrorHandler(256, ‘Unknown column …’, ‘/var/www/…’, 448, Array)
- /var/www/mysite.com/html/textpattern/lib/txplib_db.php(448): trigger_error(‘Unknown column …’, 256)
- /var/www/mysite.com/html/textpattern/vendors/Textpattern/L10n/Lang.php(588): safe_query(‘INSERT INTO new…’)
- /var/www/mysite.com/html/textpattern/vendors/Textpattern/L10n/Lang.php(471): Textpattern\L10n\Lang->upsertPack(Array, ‘’)
- /var/www/mysite.com/html/textpattern/update/_update.php(137): Textpattern\L10n\Lang->installFile(‘en-us’)
- /var/www/mysite.com/html/textpattern/index.php(177): include(‘/var/www/…’)
- {main} thrown in /var/www/mysite.com/html/textpattern/lib/txplib_admin.php on line 750
Offline
Re: Migration and update from 4.4.1 to 4.8.2
Welcome to Textpattern and sorry your first experience wasn’t so great.
This is a repeatable error, thanks for bringing it to our attention.
Fixing the first one is easy, I think. We just need to add prefs_id = 1,
to the values in _to_4.5.0.php on line 41.
The second one about the missing owner is baffling me. It should be added as the upgrader iterates through 4.6.0 so that by the time it finishes (i.e. gets to 4.8.2), all necessary columns should exist and the language updates can occur.
More research required, sorry for the hassle.
Last edited by Bloke (2020-09-05 15:12:19)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#3 2020-09-05 16:07:47
- awarnock
- New Member
- Registered: 2020-09-05
- Posts: 8
Re: Migration and update from 4.4.1 to 4.8.2
Adding the missing field appears to have worked. I also had a privilege error with the database user – needed to add INDEX to the privs – and got to the admin page just fine. The site looks fine to me now. I can get my friend to check it out.
Thanks!
Oh, and don’t sweat the initial experience. I had a lot of issues migrating my Drupal and WordPress sites, too.
Offline
#4 2020-09-05 16:19:03
- awarnock
- New Member
- Registered: 2020-09-05
- Posts: 8
Re: Migration and update from 4.4.1 to 4.8.2
One additional glitch, while I have your attention. In going through the diagnostice, I’m finding a warning that the file directory path is not writable, but the value it gives is the path on the old installation. When I migrated to the new site, I set a new path to the installation (/var/www/vhosts/… instead of /var/www/…), and changed the setting in textpattern/config.php. But the old path is still lingering around, apparently in the database.
I can manually edit them but, well…, you know.
Offline
#5 2020-09-05 16:23:35
- awarnock
- New Member
- Registered: 2020-09-05
- Posts: 8
Re: Migration and update from 4.4.1 to 4.8.2
Found it. The value of file_base_path in table new_txp_prefs did not update to the new value of ‘txpath’ in the config file.
Offline
Re: Migration and update from 4.4.1 to 4.8.2
Hi and welcome to txp
You have to change the file directory path via Admin>Preferences>Admin>File directory path. You should also change the Temporary directory and the Plugin cache directory paths. I normally allocate directories below the site root for these ones.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#7 2020-09-05 16:29:01
- awarnock
- New Member
- Registered: 2020-09-05
- Posts: 8
Re: Migration and update from 4.4.1 to 4.8.2
Got it – thank you!
Offline
Re: Migration and update from 4.4.1 to 4.8.2
awarnock wrote #325797:
Adding the missing field appears to have worked.
Nice one. I just patched the first issue in the upcoming 4.8.3. The second problem didn’t seem to rear its head again after I’d got rid of a bunch of other warnings around null dates (which is something we can’t do much about in such old versions) so maybe something else was preventing the update through 4.6.0. Very weird (and annoying). But glad you got it sorted and things are ticking along.
I also had a privilege error with the database user – needed to add INDEX to the privs
Yeah, that would break things!
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline