After updating my discourse installation from 2.9.0.beta9 to 2.9.0.beta11, the installation completely froze as all calls listing topics suddenly return
column bookmarks.post_id does not exist
I’ve tracked down the commit dropping this column to
f8939bd294ff6822a61fb653b44a4df351321f54 which drops the column from the database. The issue also occurs in safe mode so I do not think a plugin is at fault.
app/controllers/topics_controller.rb:1199:in `block (2 levels) in perform_show_response'
app/controllers/application_controller.rb:413:in `block in with_resolved_locale'
Failed to handle exception in exception app middleware : ActiveRecord::StatementInvalid : PG::UndefinedColumn: ERROR: column bookmarks.post_id does not exist
LINE 1: ...marks"."bookmarkable_type" FROM "bookmarks" WHERE "bookmarks...
Any help is appreciated
I’ve fixed it for now by adding back the column to the database but I think that the root cause should be fixed instead
Am happy to drop the column again if you need further diagnostics
I am very confused, this has been an ignored column for quite a while.
@martin needed to remove it, it is not longer something we use.
Do you have a custom setup? Are there any special plugins involved? Was the error a “transitional” thing that happened when the migration ran? (I would expect this error possibly during live update from the web interface under outlier conditions)
Faced the same issue while updating today. Adding back the
post_id column helped fix it.
- enter the discourse container
./launcher enter app
sudo -u postgres psql discourse
- Add back the
post_id column in the
ALTER TABLE bookmarks ADD COLUMN post_id int;
I’m using the default docker setup with a few plugins, but I could reproduce it in safe mode. Also, the stack traces do not contain any obvious references to plugins.
Updated using a full rebuild without any errors during the migration. Also tried re-running the migrations which reported no changes.
Can you try
- Removing the column again
- Restarting your container
./launcher restart app
Does the error persist?
Adding the column should not be needed.
I’ve already tried restarting when first encountering the error. Just to verify, I did it again and the error persists. Might a theme component be causing issues? The topic-list-preview theme component was one of the similarities I’ve identified between our instance and krita-artists.org mentioned here: Oops. The software powering this discussion forum encountered an unexpected problem - #10 by raghukamath
A theme component is very unlikely to trigger this, what is the full list of plugins you use?
Would you mind trying one more time?
I found the issue It was a plugin issue after all
Previous versions of the Topic List Previews Theme Component were distributed as a plugin and then split up into a plugin and a theme component. During this initial split users were instructed to load the plugin from a new branch. However, as time went on, the branch got abandoned and was no longer maintained. After switching to the maintained fork, everything works again.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.