Unknown column 'notification_type_id' in 'where clause' [1054]

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
bbforum20
Registered User
Posts: 5
Joined: Tue Jun 15, 2021 6:14 pm

Unknown column 'notification_type_id' in 'where clause' [1054]

Post by bbforum20 »

Support Request Template
What version of phpBB are you using? phpBB 3.3.4
What is your board's URL? No answer given
Who do you host your board with? No answer given
How did you install your board? I used the download package from phpBB.com
What is the most recent action performed on your board? Update from a previous version of phpBB3
Is registration required to reproduce this issue? Yes
Do you have any MODs installed? No
Do you have any extensions installed? No
What version of phpBB3 did you update from? phpBB 3.2.0
What styles do you currently have installed? none
What language(s) is your board currently using? british english
Which database type/version are you using? I Don't Know
What is your level of experience? Comfortable with PHP and phpBB
What username can be used to view this issue? No answer given
What password can be used to view this issue? No answer given
What actions did you take (updating your board; installing a MOD, style or extension; etc.) prior to this problem becoming noticeable? No answer given
Please describe your problem. First there was a 500 error when submitting a post. (was working fine for years).

So I decided to update to 3.3, did update via ACP and then told me I needed to finish updated database.

Updated database via CLI (other way did not work).

Now when submitting a post I get the error "Unknown column 'notification_type_id' in 'where clause' [1054]"

Have gone through forum searching, and still cannot fix.
Generated by SRT Generator
User avatar
warmweer
Jr. Extension Validator
Posts: 11234
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: Unknown column 'notification_type_id' in 'where clause' [1054]

Post by warmweer »

bbforum20 wrote: Tue Jun 15, 2021 6:21 pm Support Request Template
...
How did you install your board? I used the download package from phpBB.com
...
What version of phpBB3 did you update from? phpBB 3.2.0


So I decided to update to 3.3, did update via ACP and then told me I needed to finish updated database.

Updated database via CLI (other way did not work).
You mention using the download package from phpBB but you also mention you did the update via ACP.
I'm not quite sure what you mean with this.
Did you follow Upgrading from 3.2 to 3.3?
If you didn't, you should redo the upgrade, preferably even restore your database backup first.
And check /store and remove install_config.php and io_lock_lock (also any migrationsxxx) if present.
In cache also delete the directories /installer and /production

Once that's done you can retry the upgrade using CLI (what's the php version you're using during the upgrade?)
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
bbforum20
Registered User
Posts: 5
Joined: Tue Jun 15, 2021 6:14 pm

Re: Unknown column 'notification_type_id' in 'where clause' [1054]

Post by bbforum20 »

Yes, I followed upgrading 3.2 to 3.3 exactly. What I meant by downloading is they tell you to insert the files via FTP, then transfer the contents of the phpBB3 directory, then run /yourforum/install.

This is exactly what I did.

Using PHP 7.2.

What next?
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 52768
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Unknown column 'notification_type_id' in 'where clause' [1054]

Post by stevemaury »

bbforum20 wrote: Wed Jun 16, 2021 8:13 am Yes, I followed upgrading 3.2 to 3.3 exactly. What I meant by downloading is they tell you to insert the files via FTP, then transfer the contents of the phpBB3 directory, then run /yourforum/install.

This is exactly what I did.

Using PHP 7.2.

What next?
Then you did not follow the instructions in the link Warmweer provided. Step 7 of those instructions says:

"Download the phpBB 3.3 Full Package archive"

You used the Autoupdate package. Had you made any code edits to core phpBB files? If not, you should use the full package.
I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
bbforum20
Registered User
Posts: 5
Joined: Tue Jun 15, 2021 6:14 pm

Re: Unknown column 'notification_type_id' in 'where clause' [1054]

Post by bbforum20 »

How did I use the auto update?

I downloaded the file you just linked to https://www.phpbb.com/downloads/#install , transferred via FTP (steps 9 & 10).

Then used the url /yourforum/install to update the database (step 12).

I did not use autoupdate, I followed the instructions on https://www.phpbb.com/support/docs/en/3 ... upgrade32/

Then with the DB error I got in ACP (after completing all of the above), I used CLI to update the DB again and now I get the error in the title of this post.

What should I do next?
User avatar
warmweer
Jr. Extension Validator
Posts: 11234
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: Unknown column 'notification_type_id' in 'where clause' [1054]

Post by warmweer »

bbforum20 wrote: Wed Jun 16, 2021 7:07 pm How did I use the auto update?

I downloaded the file you just linked to https://www.phpbb.com/downloads/#install , transferred via FTP (steps 9 & 10).

Then used the url /yourforum/install to update the database (step 12).

I did not use autoupdate, I followed the instructions on https://www.phpbb.com/support/docs/en/3 ... upgrade32/

Then with the DB error I got in ACP (after completing all of the above), I used CLI to update the DB again and now I get the error in the title of this post.

What should I do next?
OK, if you followed those instructions exactly, then perhaps the first instance of updating broke something.
If your database backup is "clean" (no extensions, prosilver as default style, language British English as only active language) then I suggest you restore your database backup using Adminer if possible (even so, you might have to do that in fractions because I suspect your database is very large :the timeout), either check your files with a file/directory compare program, or just replace everything according to instructions - not overwriting files, but deleting them and then replacing. (overwriting "could" be a cause of errors)
Once everything's in place: use CLI to retry the upgrade, (the webinterface will probably timeout again).

If that doesn't work, your best bet would be do do the upgrade on personal webserver (where you can maximise all settings - I've had to do that with a couple of boards).
There another option (only feasible on personal webserver really and that would be to update in steps - )

Time consuming, I know :-(


Added:
I remember having had a similar problem with a 3.2.x board which couldn't be upgraded, I think also because of 'notification_type_id' (not 100% sure though perhaps post_visibility - but certainly a similar error) and used an STK (unofficial IIRC but specifically for 3.2 and I think 3Di was the author)


New add

The author is Alex Sheer : https://github.com/AlexSheer/phpBB3.2-STK
I can't guarantee this will solve the problem but it's worth having a look at it before restarting the upgrade.
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
bbforum20
Registered User
Posts: 5
Joined: Tue Jun 15, 2021 6:14 pm

Re: Unknown column 'notification_type_id' in 'where clause' [1054]

Post by bbforum20 »

Yeah, unfortunately that didn't work.

Redid the entire install and same error.
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 52768
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Unknown column 'notification_type_id' in 'where clause' [1054]

Post by stevemaury »

bbforum20 wrote: Wed Jun 16, 2021 7:07 pm How did I use the auto update?
Sorry, I misread one of your prior posts.
I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 52768
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Unknown column 'notification_type_id' in 'where clause' [1054]

Post by stevemaury »

Maybe first try this. Rename your notification_types table using phpMyAdmin. zJust change the prefix to bak_. Then run this SQL ( Executing SQL Queries in phpMyAdmin ):

Code: Select all

CREATE TABLE `phpbb_notification_types` (
  `notification_type_id` smallint(4) UNSIGNED NOT NULL,
  `notification_type_name` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
  `notification_type_enabled` tinyint(1) UNSIGNED NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


ALTER TABLE `phpbb_notification_types`
  ADD PRIMARY KEY (`notification_type_id`),
  ADD UNIQUE KEY `type` (`notification_type_name`);


ALTER TABLE `phpbb_notification_types`
  MODIFY `notification_type_id` smallint(4) UNSIGNED NOT NULL AUTO_INCREMENT;
COMMIT;
Change the table prefix if yours is not phpbb_.

If that gets rid of the error, do a data only backup (export) of the bak_notification_types table and import that into the newly made table. If it doesn't work, DROP the newly made table and rename the bak_ table with the original prefix and you are back where you started.
I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
Post Reply

Return to “[3.3.x] Support Forum”