Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2019-05-12 18:12:49

mwr
Member
From: Canada
Registered: 2006-01-31
Posts: 164
Website

Upgrade to 4.7.3 goes awry

I tried upgrading to 4.7.3 from 4.5.4. When logging in, I get the following:

User_Error “Table ‘theani10_macgameshuffle.txp_log’ doesn’t exist”
in /home/theani10/public_html/macgameshuffle.com/textpattern/lib/txplib_db.php at line 410.

textpattern/lib/txplib_misc.php:1759 adminErrorHandler()
updateErrorHandler()
textpattern/lib/txplib_db.php:410 trigger_error()
textpattern/lib/txplib_db.php:545 safe_query()
textpattern/update/_to_4.5.7.php:32 safe_alter()
textpattern/update/_update.php:98 include()
textpattern/index.php:215 include()

User_Error “Unknown column ‘owner’ in ‘field list’”
in /home/theani10/public_html/macgameshuffle.com/textpattern/lib/txplib_db.php at line 410.

textpattern/lib/txplib_misc.php:1759 adminErrorHandler()
updateErrorHandler()
textpattern/lib/txplib_db.php:410 trigger_error()
textpattern/vendors/Textpattern/L10n/Lang.php:496 safe_query()
textpattern/vendors/Textpattern/L10n/Lang.php:414 Textpattern\L10n\Lang->upsertPack()
textpattern/update/_update.php:133 Textpattern\L10n\Lang->installFile()
textpattern/index.php:215 include()

Fatal error: Uncaught exception ‘Exception’ with message ‘update failed’ in /home/theani10/public_html/macgameshuffle.com/textpattern/lib/txplib_misc.php:1763 Stack trace: #0 [internal function]: updateErrorHandler(256, ‘Unknown column …’, ‘/home/theani10/…’, 410, Array) #1 /home/theani10/public_html/macgameshuffle.com/textpattern/lib/txplib_db.php(410): trigger_error(‘Unknown column …’, 256) #2 /home/theani10/public_html/macgameshuffle.com/textpattern/vendors/Textpattern/L10n/Lang.php(496): safe_query(‘INSERT INTO txp…’) #3 /home/theani10/public_html/macgameshuffle.com/textpattern/vendors/Textpattern/L10n/Lang.php(414): Textpattern\L10n\Lang->upsertPack(Array) #4 /home/theani10/public_html/macgameshuffle.com/textpattern/update/_update.php(133): Textpattern\L10n\Lang->installFile(‘en-us’) #5 /home/theani10/public_html/macgameshuffle.com/textpattern/index.php(215): include(‘/home/theani10/…’) #6 {main} thrown in /home/theani10/public_html/macgameshuffle.com/textpattern/lib/txplib_misc.php on line 1763

Last edited by mwr (2019-05-12 21:42:03)


Mark

Offline

#2 2019-05-18 21:28:37

mwr
Member
From: Canada
Registered: 2006-01-31
Posts: 164
Website

Re: Upgrade to 4.7.3 goes awry

I commented out line 410 in txplib_db.php, and now everything seems to be fine.

Hope I didn’t inadvertently break something.


Mark

Offline

#3 2019-05-19 07:15:35

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

Re: Upgrade to 4.7.3 goes awry

mwr wrote #318101:

I commented out line 410 in txplib_db.php, and now everything seems to be fine.

Hope I didn’t inadvertently break something.

That looks like you just cancelled the error reporting. It may provide respite but won’t help you if a problem occurs some time later.

While I don’t recognise all the error messages it shows, try this:

But first, before you do the following: make a backup of your database as described here making sure you use sql format and all tables.

If your update worked correctly but you’re still getting those errors showing, see if you can look at your database (e.g. in phpmyadmin or similar) and look for the entry version in the table txp_prefs.

If that still shows a much earlier version, although the update to txp 4.7.x has already happened, edit it to match your new version.

An attempt at an explanation: sometimes the version number doesn’t get updated during installation. When the textpattern admin area loads, it sees you’re still (supposedly) on an old version and triggers the update process (again). That includes some things like making modifications to tables in the database. Except, when they have already been made, textpattern can’t find those entries anymore, resulting in those errors. Bumping the version number stops it repeatedly trying to update until the next new version.

Only do that if your update was already successful (in txp 4.7.x you should see Presentation › Themes in the menu). Doing this before updating is counter-productive as it prevents the update mechanism from happening.


TXP Builders – finely-crafted code, design and txp

Offline

#4 2019-05-19 14:43:57

mwr
Member
From: Canada
Registered: 2006-01-31
Posts: 164
Website

Re: Upgrade to 4.7.3 goes awry

I checked the version in txp_ prefs and it shows 4.7.3.

OTOH, txp_log is indeed missing. Is this something I can create myself? I’m feeling a little out of my depth.


Mark

Offline

#5 2019-05-19 15:22:48

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

Re: Upgrade to 4.7.3 goes awry

mwr wrote #318119:

OTOH, txp_log is indeed missing. Is this something I can create myself? I’m feeling a little out of my depth.

Hmm, we should enhance our integrity check-ups on update. You can try to run (once)

<txp:php>
    $setup = new \Textpattern\DB\Core();
    $setup->createTable('txp_log');
</txp:php>

in some article.

Offline

#6 2019-05-19 20:35:04

mwr
Member
From: Canada
Registered: 2006-01-31
Posts: 164
Website

Re: Upgrade to 4.7.3 goes awry

I ran the script, and it created txp_log in the database.

I also uncommented line 410 in txplib_db.php.

Everything seems to be working fine. Thanks!


Mark

Offline

#7 2019-05-19 21:08:16

mwr
Member
From: Canada
Registered: 2006-01-31
Posts: 164
Website

Re: Upgrade to 4.7.3 goes awry

I tried upgrading a different installation and got the same error. txp_log was missing.

Have I found a bug? :)


Mark

Offline

#8 2019-05-20 06:45:26

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,529
Website GitHub Twitter

Re: Upgrade to 4.7.3 goes awry

mwr wrote #318124:

I tried upgrading a different installation and got the same error. txp_log was missing.

Have I found a bug? :)

Hi,

txp_log table should be on your DB, all txp DB have it! Can you check if your DB have a txp_log table before upgrade ?

Cheers.

Offline

#9 2019-05-20 09:15:17

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

Re: Upgrade to 4.7.3 goes awry

txp_log table is not used at all if logging is set to None, so someone (admin? plugin?) might have deleted it without any issue. But recently we have decided to remove ip column from txp_log to comply with GDPR. The update script presumes the table is there (as it should be) and is stuck when it’s missing. Dunno whether this could be called a bug, the question is why txp_log is missing.

Offline

#10 2019-05-22 00:44:42

mwr
Member
From: Canada
Registered: 2006-01-31
Posts: 164
Website

Re: Upgrade to 4.7.3 goes awry

I updated a third installation without any issues.

As for the other two, I’m pretty sure txp_log was there before, but on the other hand this whole thing could just as easily have been due to an error on my part.

Thanks for your suggestions.


Mark

Offline

Board footer

Powered by FluxBB