Whenever the Layouts Plugin is enabled, the "tag" field is not prefilled in the composer when creating a new Topic from a Tag page

Environment

Discourse Version: Commits · discourse/discourse · GitHub

Plugin Commit: 0.3.1 – 41a13bad

Steps to Reproduce

Whenever the Layouts Plugin is enabled, the “tag” field is not prefilled in the composer when creating a new Topic from a Tag page. It seems to be a reincarnation of a previously-resolved bug…

Screenshot 2022-09-14 180824

Example

Please sign up for an account on the site to create a Topic from a Tag page. The site is set to require invite code: invitation-to-noobish

Logs

Message (11603 copies reported)

Job exception: undefined method `sort_by!’ for nil:NilClass

Backtrace

/var/www/discourse/plugins/discourse-autobot/lib/autobot/campaign.rb:7:in list' /var/www/discourse/plugins/discourse-autobot/app/jobs/scheduled/campaigns_handler.rb:8:in execute’
/var/www/discourse/app/jobs/base.rb:237:in block (2 levels) in perform' /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rails_multisite-4.0.1/lib/rails_multisite/connection_management.rb:80:in with_connection’
/var/www/discourse/app/jobs/base.rb:226:in block in perform' /var/www/discourse/app/jobs/base.rb:222:in each’
/var/www/discourse/app/jobs/base.rb:222:in perform' /var/www/discourse/app/jobs/base.rb:284:in perform’
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/mini_scheduler-0.14.0/lib/mini_scheduler/manager.rb:93:in process_queue' /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/mini_scheduler-0.14.0/lib/mini_scheduler/manager.rb:37:in block (2 levels) in initialize’