הפעלת עריכות משותפות מציגה הודעת שגיאת שרת פנימית

סיכום מבוסס בינה מלאכותית

User Milk reports an internal server error (500) when attempting to enable shared edits in Discourse, with the nginx log showing a PUT request failing. The underlying error from the logs indicates a PostgreSQL issue: the table shared_edit_revisions does not exist. JammyDodger asks for more logs and plugin details, leading Milk to list installed plugins, including discourse-shared-edits, and note a similar missing table error for discourse_calendar_post_event_dates. JammyDodger suggests rebuilding the app via ./launcher rebuild app, but Milk clarifies the install is via YunoHost, which doesn’t include ./launcher. Milk has opened an issue on the YunoHost Discourse repo, suspecting the plugin installation method is flawed. JammyDodger notes that the YunoHost install ships with an outdated Discourse version (2.8.13) and recommends switching to a standard install for full plugin support and community assistance.

The nginx access log says "212.229.85.68 - milkii [26/May/2023:00:23:51 +0000] “PUT /shared_edits/p/20/enable.json HTTP/2.0” 500 46 “https://x.xxxxxxxxx.x/t/shared-editing-test-thread/15” “Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/113.0”

I’m relatively new to Discourse but not bad at sysadmin. Any advise? Might I be missing something? Thanks!

Is there more detail in the /logs, or possibly in your browser console when you perform the action?

And can you share a list of other plugins you have installed?

Ah, there is an error;

ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR:  relation "shared_edit_revisions" does not exist
LINE 8:  WHERE a.attrelid = '"shared_edit_revisions"'::regclass
                            ^
)
app/controllers/application_controller.rb:387:in `block in with_resolved_locale'
app/controllers/application_controller.rb:387:in `with_resolved_locale'
lib/middleware/omniauth_bypass_middleware.rb:71:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:361:in `call'
config/initializers/100-quiet_logger.rb:23:in `call'
config/initializers/100-silence_logger.rb:31:in `call'
lib/middleware/enforce_hostname.rb:23:in `call'
lib/middleware/request_tracker.rb:198:in `call'

Failed to handle exception in exception app middleware : PG::UndefinedTable: ERROR:  relation "shared_edit_revisions" does not exist
LINE 8:  WHERE a.attrelid = '"shared_edit_revisions"'::regclass

discourse-calendar
discourse-checklist
discourse-fontawesome-pro
discourse-footnote
ldap
discourse-shared-edits
discourse-spoiler-alert
styleguide

There is also the log error

Job exception: PG::UndefinedTable: ERROR:  relation "discourse_calendar_post_event_dates" does not exist
LINE 8:  WHERE a.attrelid = '"discourse_calendar_post_event_dates"':...
                            ^

I’m not sure why it wouldn’t have those? Is this a standard install?

It may be worth trying a ./launcher rebuild app to see if that smooths things out. :crossed_fingers:

No, sorry for not specifying, I installed Discourse through the turnkey method that YunoHost uses.

GitHub - YunoHost-Apps/discourse_ynh: Discourse package for YunoHost · GitHub is the YH repo for Discourse integration.

I followed the plugin install instructions at GitHub - YunoHost-Apps/discourse_ynh: Discourse package for YunoHost · GitHub

I’ve created an issue over there, because I’m guessing installing an official plugin should be fairly simple, and it’s their method will be incorrect in some way. Internal server error when trying to use official Shared Edits plugin · Issue #151 · YunoHost-Apps/discourse_ynh · GitHub

Thanks you your help anyhow.

P.S. There is no ./launcher with the install via YunoHost.

I’m not familiar with this method (and only the standard install is officially supported), but it looks like it ships with an out of date Stable version:

Shipped version: 2.8.13~ynh1

If you can, you may want to try a standard install instead so you can take advantage of all the latest plugins and features. :+1: (and access more support from people here :slight_smile:)