Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2023-01-14 23:50:19

pexman
Member
Registered: 2016-02-27
Posts: 65

Re: DB column 'log' suddenly and unexpectedly

Surprise

In phpMyAdmin (or equivalent) look in the txp_prefs table and find the version string. What value is it?

The version is 4.5.0.

Offline

#17 2023-01-14 23:53:18

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,427
Website GitHub

Re: DB column 'log' suddenly and unexpectedly

The problem is that the column doesn’t exist (presumably it was removed during an upgrade attempt) but the upgrade script didn’t finish. So as far as Textpattern is concerned, your installation is still on an old version.

Thus, every time you log in or refresh the page it tries to run the scripts from that version onwards.

When it encounters the line that tells it to remove the ip column, it can’t do so because it’s already deleted. And the upgrade falls over.

What we should have done is check first in the upgrade script and only perform the deletion if it hadn’t been done already. We can change that in future installs so this doesn’t happen again but in your case, the damage is done.

Hence, if you comment out that line I mentioned and log in, it should silently skip the erroneous operation and carry on with the upgrade. When it gets to the end, it’ll set your version string to 4.8.8 and from that point on, you’ll be fine as it won’t keep trying to trigger the upgrade.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#18 2023-01-15 18:03:08

pexman
Member
Registered: 2016-02-27
Posts: 65

Re: DB column 'log' suddenly and unexpectedly

i did it this way, but only got as far as 4.5.7. The next version would be the 4.6.0 but it does not go through. I can edit the tables of the database. What also puzzles me is the message:
User_Error “Duplicate entry ‘default’ for key ‘name’”
in /var/www/vhosts/arteurope.de/arteurope.de/textpattern/lib/txplib_db.php at line 453.

That means there is a duplicate entry, doesn’t it?

Offline

#19 2023-01-15 18:59:29

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,427
Website GitHub

Re: DB column 'log' suddenly and unexpectedly

Drat. That’s another error due to a partial upgrade. This is getting tricky to unpick. I wonder why it failed in the first place. Hmmm …


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#20 2023-01-16 19:49:06

pexman
Member
Registered: 2016-02-27
Posts: 65

Re: DB column 'log' suddenly and unexpectedly

I have disabled several lines in the textpattern/update/_to_6.0.0 file that were specified in the error message.

// Not using safe_create_index here, because we just dropped the index.
//safe_alter('txp_css',     "ADD UNIQUE name (name(250))");
safe_alter('txp_file',    "ADD UNIQUE filename (filename(250))");
//safe_alter('txp_form',    "ADD PRIMARY KEY (name(250))");
//safe_alter('txp_page',    "ADD PRIMARY KEY (name(250))");
safe_alter('txp_section', "ADD PRIMARY KEY (name(250))");
safe_alter('txp_prefs',   "ADD INDEX name (name(250))");
safe_alter('textpattern', "ADD INDEX section_status_idx (Section(249), Status)");
safe_alter('textpattern', "ADD INDEX url_title_idx (url_title(250))");
// Specifically, txp_discuss_nonce didn't have a primary key in 4.0.3
// so it has to be done in two separate steps.
safe_drop_index('txp_discuss_nonce', "PRIMARY");
//safe_alter('txp_discuss_nonce', "ADD PRIMARY KEY (nonce(250))");

With the following success

Diagnostics
Pre-flight check
Some Textpattern files have been modified:
../textpattern/update/_to_4.5.7.php,
../textpattern/update/_to_4.6.0.php Help

But in the database now:


txp_prefs
name val
Version 4.8.8

Please, tell me what to do.

Last edited by pexman (2023-01-16 19:50:11)

Offline

#21 2023-01-16 20:05:59

pexman
Member
Registered: 2016-02-27
Posts: 65

Re: DB column 'log' suddenly and unexpectedly

Don`t know. if it is important:

The following PHP functions (which may be necessary to run Textpattern) are disabled on your server: opcache_get_status Help

Offline

#22 2023-01-17 13:03:46

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,427
Website GitHub

Re: DB column 'log' suddenly and unexpectedly

pexman wrote #334522:

I have disabled several lines

That’s probably thr best thing you can do when an upgrade is botched like this. It’s dirty but at least it bypasses the choke points and means …
txp_prefs
name val
Version 4.8.8

Which is exactly what should happen.

You can now safely revert all your changes to the update files and hopefully everything will work fine from this point forward.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#23 2023-01-17 13:04:30

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,427
Website GitHub

Re: DB column 'log' suddenly and unexpectedly

pexman wrote #334523:

Don`t know. if it is important:

The following PHP functions (which may be necessary to run Textpattern) are disabled on your server: opcache_get_status Help

Shouldn’t be an issue. Only important if you’re using that feature.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#24 2023-01-17 16:35:15

pexman
Member
Registered: 2016-02-27
Posts: 65

Re: DB column 'log' suddenly and unexpectedly

Okay, thank you. I can`t restore the delete lines in plugin yab-language…, recieve error-messages, but otherwise everything works fine. Thank you for help to solve my problem.

Offline

Board footer

Powered by FluxBB