Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2013-04-30 11:59:30

DaveSeidel
Member
From: New Hampshire, US
Registered: 2004-05-24
Posts: 17
Website

Update 4.0.5 -> 4.5.4 not working, assistance needed!

Hi all,

I obviously hadn’t updated in a long time, but always had good luck with it in the past. Not so today. After following the documented step, I tried to log in, and got this:

internal_error "Unknown column 'user_name' in 'where clause'"
in[redacted]/textpattern/lib/txplib_db.php at line 95
internal_error "Undefined variable: language"
in [redacted]/textpattern/index.php at line 103
Internal error "Cannot modify header information - headers already sent by (output started at [redacted]/textpattern/lib/txplib_misc.php:709)"
in [redacted]/textpattern/include/txp_auth.php at line 224
Internal error "Cannot modify header information - headers already sent by (output started at [redected]/textpattern/lib/txplib_misc.php:709)"
in [redacted]/textpattern/include/txp_auth.php at line 225
Internal error "Cannot modify header information - headers already sent by (output started at [redacted]/textpattern/lib/txplib_misc.php:709)"
in [redacted]/textpattern/lib/txplib_head.php at line 50

followed by the login form. Clicking the Login button just gives the same output.

When I go to the site itself, I see an unstyled version of the main page, prefaced with:

general_error Textpattern Error: Unknown column 'user_name' in 'where clause' on line 95
Tag error: <txp:zem_prblock rel="external"> ->  Textpattern Warning: tag does not exist while parsing form “None” on page “default”
Tag error: <txp:article_custom category="news" excerpted="0" form="title_only" limit="1" pgonly="0" section="article" status="4" /> ->  Textpattern Error: Unknown column 'Expires' in 'field list' while parsing form “None” on page “default”

Any advice? I should be to restore it to where it was (have file and db backups), but I’d rather push forward. You can see it in its current state at http://mysterybear.net (I’m hosted on TextDrive.)

- Dave

Last edited by DaveSeidel (2013-04-30 12:06:51)

Offline

#2 2013-04-30 13:27:02

DaveSeidel
Member
From: New Hampshire, US
Registered: 2004-05-24
Posts: 17
Website

Re: Update 4.0.5 -> 4.5.4 not working, assistance needed!

To be clear, I can’t login, I just get the form again, preceded by the error messages. I noticed that I’d uploaded the textpattern/setup directory, which should not have been needed. I deleted it and refreshed, but the problem persists. Looking at the database (I don’t have PhpMyAdmin, just commandline access), I see that I do have what looks like a complete tcp_prefs table, as well as txp_users.

Offline

#3 2013-04-30 13:41:38

DaveSeidel
Member
From: New Hampshire, US
Registered: 2004-05-24
Posts: 17
Website

Re: Update 4.0.5 -> 4.5.4 not working, assistance needed!

SOLVED — I apparently had an old txp_login cookie. Once deleted, I was able to login and complete the process.

Not the most user-friendly issue.

Offline

#4 2013-05-01 12:58:33

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

Re: Update 4.0.5 -> 4.5.4 not working, assistance needed!

DaveSeidel wrote:

Not the most user-friendly issue.

Agreed. The Unknown column warning is documented in the README.txt file under ‘Upgrading’ as being an unfortunate consequence of moving up from Txp < 4.2.0. Under normal circumstances the error would go away once you logged back in, but since you didn’t log out before upgrade, Txp was trying to log you straight back in with the old-style credentials. When that failed, the internal error was thrown and the upgrade script never ran so the error didn’t go away until you deleted the cookie and logged in by hand.

Not really sure what we can do about this scenario. We can’t force a cookie deletion from the upgrade script, as it never runs when there’s a bad/old cookie lurking around. Your FTP upload is outside the browser so Txp doesn’t know about it until you refresh the browser window. We don’t have any reasonable hook or hint to be able to delete the cookie, and we certainly don’t want to delete it just in case as that would affect regular logins. There may be a way to check in the txp_auth.php file itself if something has changed by checking for certain files or comparing version hashes or something and automatically deleting the cookie if something doesn’t check out. But that’s error prone and may leak version info. At the time we decided the most robust course of action was simply to warn people in the README that they need to log out of the admin side first.

Maybe a README.html file would be better so we could mark important things like this up (ha, presuming anyone actually reads the readme anyway: I’m guilty of not doing that on many occasions with other software!)

If you have any tangible suggestions on how we could improve things, please let us know.


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

#5 2013-05-01 13:04:28

DaveSeidel
Member
From: New Hampshire, US
Registered: 2004-05-24
Posts: 17
Website

Re: Update 4.0.5 -> 4.5.4 not working, assistance needed!

Thanks. I realize in retrospect that I should have logged out first. This is clearly spelled out in the detailed upgrade instructions, but perhaps it should be mentioned in the short version as well.

I’ll try to be more careful next time! Really, TXP has a better upgrade story than most server-side software out there. This was user error.

Offline

#6 2013-05-01 13:11:06

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

Re: Update 4.0.5 -> 4.5.4 not working, assistance needed!

DaveSeidel wrote:

but perhaps it should be mentioned in the short version as well.

Oooofffh, good catch. Done. How’s that?

Last edited by Bloke (2013-05-01 13:11:35)


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

#7 2013-05-01 13:16:11

DaveSeidel
Member
From: New Hampshire, US
Registered: 2004-05-24
Posts: 17
Website

Re: Update 4.0.5 -> 4.5.4 not working, assistance needed!

Excellent! Cheers.

Offline

#8 2013-05-01 14:32:26

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Update 4.0.5 -> 4.5.4 not working, assistance needed!

No, you shouldn’t have to had to log out. No one should. The thing is, Textpattern’s updater and installer suck donkey balls. The updater is just freaking broken as hell.

  1. It should disable your website until the update is done. Currently it throws out errors as mad man for anyone visiting your site.
  2. The updater should and could log you out and make sure you authenticate after uploading the new installation.
  3. We should make sure you have privileges to actually run the updater too, disable other accounts until the database is updated.

Some stupid mistakes that create these errors;

  1. Output buffers.
  2. Failed error handling. I love how one of the error handlers just kills the execution, causing the funny blank pages. Woo!
  3. There is not even single verification or error check line in the whole updater nor in the installer. It literally could fuck up your database so bad and you wouldn’t be informed. Quality.

Last edited by Gocom (2013-05-01 14:35:09)

Offline

#9 2013-05-01 21:19:37

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Update 4.0.5 -> 4.5.4 not working, assistance needed!

Wow Jukka. You certainly convinced me to quit updating ;)

(Can you do the same for smoking?)

Offline

#10 2013-05-08 13:06:19

DaCason
New Member
Registered: 2013-05-08
Posts: 2

Re: Update 4.0.5 -> 4.5.4 not working, assistance needed!

Similar problem here trying to upgrade from 4.0.4 – but I was logged out before I started the upgrade.

internal_error "Unknown column 'user_name' in 'where clause'"
in /home/redact/public_html/soapbox/textpattern/lib/txplib_db.php at line 95
internal_error "Undefined variable: language"
in /home/redact/public_html/soapbox/textpattern/index.php at line 103
internal_error "Cannot modify header information - headers already sent by (output started at /home/redact/public_html/soapbox/textpattern/lib/txplib_misc.php:709)"
in /home/redact/public_html/soapbox/textpattern/lib/txplib_head.php at line 50

I also get “Could not login with that name/password.” – and using ‘password_forgotten’ does not send me a password reset. It’s several years since I used this txp install so I may have forgotten user / password.

Any suggestions please?

Offline

#11 2013-05-08 13:11:30

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

Re: Update 4.0.5 -> 4.5.4 not working, assistance needed!

DaCason wrote:

I also get “Could not login with that name/password.” – and using ‘password_forgotten’ does not send me a password reset. It’s several years since I used this txp install so I may have forgotten user / password.
Any suggestions please?

You can change your password using phpMyAdmin by typing

update txp_users set pass=password('pass') where name='user';

Note that you should change pass to your new password and user to your user name.


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

Online

#12 2013-05-08 13:31:29

DaCason
New Member
Registered: 2013-05-08
Posts: 2

Re: Update 4.0.5 -> 4.5.4 not working, assistance needed!

colak, thanks – but I managed to reset the password via admin login panel and now I’m in. I was using the wrong username before.

Thanks again.

Offline

Board footer

Powered by FluxBB