Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2019-10-06 04:17:20

boyandin
Member
Registered: 2005-09-16
Posts: 21

Multiple problems upgrading from 4.0.3

I have to upgrade an old (yet working without issues) installation of TP 4.0.3. It works under PHP 5.6, site and admin language is Russian..

When I try to do that as directed in manual (first to 4.2.0, then to latest), I encounter multiple issues:

- Cyrillic letters in all content and interface all are replaced with question marks (‘?’), even though 4.0.3 DB charset is utf8
- I see “Strict warnings” at startup (which I can’t normally suppress)
- file taghandlers.php contains definition of function yield() at line 274; that causes fatal error in PHP 5.5 and later (since ‘yield’ is a reserved word now)

Is it theoretically possible to upgrade 4.0.3 to the latest, given the above problems?


Om gate gate paragate parasamgate bodhi svaha

Offline

#2 2019-10-06 13:45:35

etc
Developer
Registered: 2010-11-11
Posts: 5,157
Website GitHub

Re: Multiple problems upgrading from 4.0.3

boyandin wrote #319544:

- file taghandlers.php contains definition of function yield() at line 274; that causes fatal error in PHP 5.5 and later (since ‘yield’ is a reserved word now)

You can try to rename/remove yield() in 4.2.0 distrib, it won’t be used anyway. Or log into a different tab than Write, Articles or Comments.

Offline

#3 2019-10-06 14:46:09

boyandin
Member
Registered: 2005-09-16
Posts: 21

Re: Multiple problems upgrading from 4.0.3

etc wrote #319546:

You can try to rename/remove yield() in 4.2.0 distrib, it won’t be used anyway. Or log into a different tab than Write, Articles or Comments.

Thanks, I’ll try to rename it. Question is, how to handle the rest.


Om gate gate paragate parasamgate bodhi svaha

Offline

#4 2019-10-20 23:20:18

boyandin
Member
Registered: 2005-09-16
Posts: 21

Re: Multiple problems upgrading from 4.0.3

No more pieces of advice?

Site breaks completely at the first upgrade attempt if I try upgrading it as recommended (to 4.2.0 first). Looks like I will have to apply every release published (4.0.4, 4.0.5… and so on).

Most annoying, apart from incompatible PHP functions, is non-English content (including admin area localization) switching completely to question marks.


Om gate gate paragate parasamgate bodhi svaha

Offline

#5 2019-10-21 04:23:12

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,081
Website GitHub Mastodon Twitter

Re: Multiple problems upgrading from 4.0.3

There is this plugin which converts latin to utf8. You will also need to change the dbcharset in your config.php file to

$txpcfg['dbcharset'] = 'utf8';

Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#6 2019-10-21 12:27:36

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,719
Website

Re: Multiple problems upgrading from 4.0.3

I’ve helped a few other people do upgrades from very old versions and don’t mind seeing if I can assist, but I don’t speak Russian at all, so one of our other Russian-speaking txp-experts might be more useful to you (e.g. makss for example).

There is this plugin which converts latin to utf8.

… even though 4.0.3 DB charset is utf8

If your database was already utf8, you may not want to do that conversion. Perhaps first check also the mysql server’s collation and what you have set in a) your config.php and b) your meta tag in your HTML. They should match.

One way or the other, make sure you have (properly_labelled) backups first before doing those conversions. Manually converting mis-converted text is bad enough with accents in a European language, but with Russian it must make no sense.

Finally, the most recent version of textpattern in the dev branch on github has a slightly improved update routine that resolves some hiccups. If you’re unsure about using a dev version for your site, you could download txp 4.7.3 and then swap out only the “update” folder from the dev version.


TXP Builders – finely-crafted code, design and txp

Offline

#7 2019-10-21 12:57:57

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,241
GitHub

Re: Multiple problems upgrading from 4.0.3

boyandin wrote #319544:

Is it theoretically possible to upgrade 4.0.3 to the latest, given the above problems?

Yes, it’s possible. It’s been done. I’ve done it, aside from the Russian language element.

I would propose a slightly different route since this is a live site: clone the site files and database to a virtual machine, and do the upgrade jumps there. If you can replicate the hosting setup on a virtual machine, you’ll have a much more sane time of things. You can also switch out the admin language to your preferred locale, do the upgrade(s), then you’ll have a prepared set of files + database to drop back into the web host when you’re up-to-date.

Another variation: set up a subdomain on the same web host, and use that as a staging/build area, so the live site is untouched until you’ve ironed out the snags.

Offline

#8 2019-10-21 13:16:43

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,436
Website GitHub

Re: Multiple problems upgrading from 4.0.3

Is there any possibility of temporarily rolling back PHP to 5.4? That should at least allow you to get past the ‘yield’ thing.


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

#9 2019-10-22 10:06:00

etc
Developer
Registered: 2010-11-11
Posts: 5,157
Website GitHub

Re: Multiple problems upgrading from 4.0.3

jakob wrote #319797:

I’ve helped a few other people do upgrades from very old versions and don’t mind seeing if I can assist, but I don’t speak Russian at all, so one of our other Russian-speaking txp-experts might be more useful to you

I speak Russian if it helps.

Offline

#10 2019-10-22 10:19:11

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,719
Website

Re: Multiple problems upgrading from 4.0.3

etc wrote #319805:

I speak Russian if it helps.

Hah, of course! Why didn’t I think of that?! Your English is just so good :-)

@boyandin: there are few people more qualified to help than etc!


TXP Builders – finely-crafted code, design and txp

Offline

#11 2019-10-22 10:27:22

etc
Developer
Registered: 2010-11-11
Posts: 5,157
Website GitHub

Re: Multiple problems upgrading from 4.0.3

jakob wrote #319806:

@boyandin: there are few people more qualified to help than etc!

Hey, I meant to help with translation, most technical aspects of the web are mystery for me!

Offline

#12 2019-11-21 13:20:21

boyandin
Member
Registered: 2005-09-16
Posts: 21

Re: Multiple problems upgrading from 4.0.3

Thanks to everyone for offers of help. I’m again out of my wits trying to upgrade the site in situ.

The DB collation of 4.0.3 is already utf8_general_ci, and charset is already utf8 (specified in both config.hp and in META tag).

However, the site is hosted under MariaDB 10.0.15 and perhaps this is the problem. Even if I try to upgrade to 4.0.4, I get all Cyrillic characters replaced with ‘?’, no matter the charset/collation.

I will try now copying the site to a VM with MySQL 5.7 and PHP 5.3 (not the MariaDB) and try upgrading there.

@etc , actually, I speak English quite well, I only have problem with Russian text being garbled during upgrade.


Om gate gate paragate parasamgate bodhi svaha

Offline

Board footer

Powered by FluxBB