Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2017-12-06 20:48:32

jpdupont
Member
From: Virton (BE)
Registered: 2004-10-01
Posts: 641
Website

Error when installing a plugin, last 4.7 dev

I try to install etc_datepicker, error : “Plugin not installed” +

User_Error "Unknown column 'textpack' in 'field list'"
in /home/rouvroy/webapps/rox/textpattern/lib/txplib_db.php at line 409.


adminErrorHandler()
textpattern/lib/txplib_db.php:409 trigger_error()
textpattern/lib/txplib_db.php:483 safe_query()
textpattern/vendors/Textpattern/Plugin/Plugin.php:100 safe_insert()
textpattern/include/txp_plugin.php:439 Textpattern\Plugin\Plugin->install()
textpattern/include/txp_plugin.php:50 plugin_install()
textpattern/index.php:232 include()

Offline

#2 2017-12-06 22:43:04

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 7,800
Website

Re: Error when installing a plugin, last 4.7 dev

Was this an installation or an upgrade? The column should have been created when doing either, I’m just curious where to look.

If upgrade, did you log out first?

Check your txp_plugin table and see if the textpack column is in there. If not, log out, set your prefs version string to 4.6.2 in phpMyAdmin, then log back in again.


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 2017-12-07 08:46:54

jpdupont
Member
From: Virton (BE)
Registered: 2004-10-01
Posts: 641
Website

Re: Error when installing a plugin, last 4.7 dev

It was an update. I think I have not made a logout before.
I have just done the required manipulations:
- Logout
- Check the absence of the textpack column
- Change the version to 4.6.2
- Login

After that, check in phpmyadmin:

The version has not changed (always 4.6.2)
The column has not been added
And in addition, impossible to activate the textarea where to paste the code of the plugin. I reported this problem yesterday to Philippe for Sand space , while yesterday I could paste something in Hive / textarea plugin, not in Sand space

Last edited by jpdupont (2017-12-07 09:22:17)

Offline

#4 2017-12-07 09:14:44

jpdupont
Member
From: Virton (BE)
Registered: 2004-10-01
Posts: 641
Website

Re: Error when installing a plugin, last 4.7 dev

To be sure to work with the right files, I just:
- Logout
- Upload the latest github files
- Login.

I now have the following error when I log in on the “Diagnostics” page:

Notice "Undefined index: filename"
in /home/rouvroy/webapps/rox/textpattern/vendors/Textpattern/L10n/Lang.php at line 234.
textpattern / lib / txplib_misc.php: 1693 adminErrorHandler ()
textpattern / vendors / Textpattern / L10n / Lang.php: 234 updateErrorHandler ()
textpattern / update / _to_4.7.0.php: 42 Textpattern \ L10n \ Lang-> available ()
textpattern / update / _update.php: 91 include ()
textpattern / index.php: 198 include ()

Now the textpack column in txp_plugins is added. At refresh, no more error in diagnostic.
But the version has not changed (4.6.2) in phpmyadmin.
File upload stuff and plugin textarea not active.

Offline

#5 2017-12-07 09:53:24

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 7,800
Website

Re: Error when installing a plugin, last 4.7 dev

Seems like the upgrade script isn’t firing properly. That’s weird. I wonder if something changed very recently in that area that’s broken upgrades. Can’t think of anything that anyone’s done there.

EDIT: Hmm, I wonder if this has anything to do with it ? When you log in, you’re filling the $_POST array with login/pw info so that test will fail… right?

EDIT 2: Oh, wait, upgrade won’t alter the db version number, duh. It’s a dev version. So that bit is correct. But the fact other stuff is failing is a bit weird.

I’m baffled. Any clues, Oleg?

Last edited by Bloke (2017-12-07 09:57:16)


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

#6 2017-12-07 10:06:52

etc
Developer
Registered: 2010-11-11
Posts: 2,351
Website

Re: Error when installing a plugin, last 4.7 dev

Bloke wrote #308146:

EDIT: Hmm, I wonder if this has anything to do with it ? When you log in, you’re filling the $_POST array with login/pw info so that test will fail… right?

That’s possible, though the update script should then run on the next access… unless you do something special on login? Please try to axe this $_POST check, but perhaps leave async there, an update on article save is not a good idea.


etc_[ query | search | pagination | date | tree | cache ]

Offline

#7 2017-12-07 11:02:05

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 7,800
Website

Re: Error when installing a plugin, last 4.7 dev

etc wrote #308147:

That’s possible, though the update script should then run on the next access

Yes, that’s what I’d expect. Although it might be better to run on first login.

unless you do something special on login?

Not that I’m aware of. The $_POST array is popualted with login and password and submitted like any regular form. In fact, if you log in, then immediately refresh, the browser offers to post the credentials a second time.

Please try to axe this $_POST check

Can do, but I still don’t see why this would prevent the update from running on second click somewhere else – at least in a dev environment. It does mean there’s the possibility of visiting somehere else first, and then be taken to the Diagnostics panel with the “welcome to Textpattern x.y.z” message showing. Which is a bit odd.

but perhaps leave async there, an update on article save is not a good idea.

Absolutely.


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

#8 2017-12-07 11:47:46

etc
Developer
Registered: 2010-11-11
Posts: 2,351
Website

Re: Error when installing a plugin, last 4.7 dev

Bloke wrote #308149:

Not that I’m aware of.

It does mean there’s the possibility of visiting somehere else first, and then be taken to the Diagnostics panel with the “welcome to Textpattern x.y.z” message showing. Which is a bit odd.

If update does nothing special on login, what if we don’t update automatically, but display a message like “A new version is available, please visit Diagnostics” and update there?


etc_[ query | search | pagination | date | tree | cache ]

Offline

#9 2017-12-07 12:13:01

etc
Developer
Registered: 2010-11-11
Posts: 2,351
Website

Re: Error when installing a plugin, last 4.7 dev

Please test if this workflow solves the problem. Thanks!


etc_[ query | search | pagination | date | tree | cache ]

Offline

#10 2017-12-07 12:14:47

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 7,800
Website

Re: Error when installing a plugin, last 4.7 dev

etc wrote #308151:

If update does nothing special on login, what if we don’t update automatically, but display a message like “A new version is available, please visit Diagnostics” and update there?

Two reasons:

  1. You may have already uploaded the files via FTP and we can’t leave Txp in an “unknown” state until the DB changes are synchronized with what the file system expects. So the update needs to happen immediately on next page refresh/login.
  2. Determining if a new version is available on each page refresh is (at least, was – might be better now we have a simple JSON file) expensive, even if we cache the results periodically. So the only check we do on every page reload is “does the version number in index.php match the one in the DB?” If not, it immediately triggers an update and bounces you to Diagnostics.

If we had an install process that didn’t rely on an out-of-band step (e.g. FTP) then we could probably do what you suggested. If we can overcome or sidestep write permissions issues, this might be possible, but that’s the primary reason we don’t auto-install config.php during setup (although I’ve often wondered we should try and, if it fails, ask them to do it by hand instead).

EDIT: also note there’s a difference between “new stable/beta version is available to download” (a check requiring external access to the JSON file) and “you have installed files from a new version, let’s go update the database too” (which just checks the index.php version number against the DB).

Last edited by Bloke (2017-12-07 12:18:56)


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

Board footer

Powered by FluxBB