Issue with UserNotificationRenderer reported in sidekiq

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

mfc, new to the forum, reports an issue after migrating a phpBB forum to Discourse (https://forums.mfc.bayern). Sidekiq logs show a NoMethodError: undefined method 'with_view_paths' for UserNotifications::UserNotificationRenderer, suggesting notifications or private messages may not be sent. The error appears in app/mailers/user_notifications.rb. mfc notes they’re running Discourse v2.4.0.beta2 + 183 via Docker and uses only official plugins: discourse-email-all, discourse-events, discourse-sidebar-categories, discourse-sitemap, and docker_manager. pfaffman asks if nonstandard plugins are in use, to which mfc confirms they are not. jaron shares they encountered the same error and resolved it by rebuilding the app (sudo ./launcher rebuild app) after upgrading Ubuntu — though upgrading Ubuntu alone didn’t fix it. mfc asks jaron for their Discourse version. Finally, mfc confirms that rebuilding the app resolved the issue, thanking jaron for the tip. The fix appears to be rebuilding the Discourse container, regardless of OS version or Discourse upgrade.

Hello

I’m new in this forum.
We have moved a week ago a productive phpbb forum to discourse.

I have to say, this discourse wonderfull… Everithing went well.

There is just une littel point what worries me.

Sidekiq reports…

Jobs::UserEmail 	
{"type"=>"user_private_message", "user_id"=>xxxx, "notification_id"=>yyyyy, "notification_data_hash"=>{"topic_title"=>"aaaa", "original_post_id"=>zzzz, "original_post_type"=>1, "original_username"=>"uuuu", "revision_number"=>nil, "display_username"=>"uuuu"}, "notification_type"=>"private_message", "post_id"=>pppp, "current_site_id"=>"default"}
	
Jobs::HandledExceptionWrapper: Wrapped NoMethodError: **undefined method `with_view_paths'** for UserNotifications::UserNotificationRenderer:Class Did you mean? with_options

I didn’t find any advice about UserNotificationRenderer except
https://review.discourse.org/t/dev-add-support-for-rails-6/3186

And affected file in
app/mailers/user_notifications.rb

For me it looks like notifications or messages are not going out…
Can anybody advice how to fix this ?

For info we have v2.4.0.beta2 + 183 installed, based on docker container…

Many thanks.

Stephane

Are you using any nonstandard plugins?

I don’t think so. All from discourse.
Here what we use

discourse-email-all
discourse-events
discourse-sidebar-categories
discourse-sitemap
docker_manager

I was running into the same error, but was able to fix it:

  1. I upgraded Ubuntu to the latest release (still had the error).
  2. I rebuilt the app (sudo ./launcher rebuild app) which fixed things. I’m running the latest release so otherwise would have tried upgrading instead of rebuilding.

Many thanks we will try.
We run Ubuntu 18.04.
Regarding discourse what is you version now ?

Ok, after rebuild it looks ok. Many thanks for the tip.