# Layouts Plugin

**URL:** https://meta.discourse.org/t/layouts-plugin/55208
**Category:** Plugin
**Tags:** pavilion, broken
**Created:** [January 5, 2017, 9:41am UTC](https://meta.discourse.org/t/layouts-plugin/55208 "2017-01-05T09:41:13Z")
**Posts on this page:** 20
**Page:** 4

<div class="post-metadata">

### Author: ![xiasummer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/xiasummer/32/82790_2.png) [@xiasummer](https://meta.discourse.org/u/xiasummer)
#### Post date: [June 16, 2017, 5:50am UTC](https://meta.discourse.org/t/layouts-plugin/55208/62 "2017-06-16T05:50:07Z")

</div>

Hi, I’m wondering how to add such things in as the right banner.

1. A calendar, better to have Schedule Function.

2. An Editable Advertisement Place for showing the sponsor’s logos.

Can that be done?

---

<div class="post-metadata">

### Author: ![exetico](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/exetico/32/119962_2.png) [@exetico](https://meta.discourse.org/u/exetico)
#### Post date: [June 18, 2017, 1:41pm UTC](https://meta.discourse.org/t/layouts-plugin/55208/63 "2017-06-18T13:41:03Z")

</div>

Did someone make a list with widgets(plugins) created for this awesome plugin?

---

<div class="post-metadata">

### Author: ![Pad\_Pors](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pad_pors/32/52016_2.png) [@Pad\_Pors](https://meta.discourse.org/u/Pad_Pors)
#### Post date: [July 8, 2017, 2:37pm UTC](https://meta.discourse.org/t/layouts-plugin/55208/64 "2017-07-08T14:37:03Z")

</div>

all widgets in the layout has disappeared after a recent update … (one of them was the profile widget e.g.).

error in the console:

```plaintext
Uncaught TypeError: Cannot read property 'inlineBetween' of undefined

```

some errors in the admin error logs:

```plaintext
 TypeError (no implicit conversion of nil into String) /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.8/lib/action_controller/metal/data_streaming.rb:68:in `file?' 

```

@angus  
Hi Angus, may you confirm if this is related to layout plugin or the widgets?

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [July 10, 2017, 6:23am UTC](https://meta.discourse.org/t/layouts-plugin/55208/65 "2017-07-10T06:23:21Z")

</div>

> [@Pad\_Pors](#):
>
> inlineBetween

This property does not appear anywhere in my code. Please attach the full error log so I can confirm.

I’m not seeing any errors using the layouts plugin with the latest version of Discourse.

---

<div class="post-metadata">

### Author: ![Pad\_Pors](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pad_pors/32/52016_2.png) [@Pad\_Pors](https://meta.discourse.org/u/Pad_Pors)
#### Post date: [July 10, 2017, 1:28pm UTC](https://meta.discourse.org/t/layouts-plugin/55208/67 "2017-07-10T13:28:47Z")

</div>

the problems were from another plugin Angus. I’ll disable the plugin to see if the widgets come back or not. and update here.

**update:**  
@angus after removal of mathjax, layout and widgets are working fine.

---

<div class="post-metadata">

### Author: ![Pad\_Pors](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pad_pors/32/52016_2.png) [@Pad\_Pors](https://meta.discourse.org/u/Pad_Pors)
#### Post date: [July 24, 2017, 1:07pm UTC](https://meta.discourse.org/t/layouts-plugin/55208/68 "2017-07-24T13:07:25Z")

</div>

the [profile widget](https://github.com/angusmcleod/discourse-profile-widget) is not working for the not-logged in users (logged in users are fine), after the common-mark updates; with this error in the browser console:

```plaintext
Error: Could not find module pretty-text/engines/discourse-markdown/helpers
    at s (_ember_jquery-a8dcbd3….js:59258)
    at require (_ember_jquery-a8dcbd3….js:59273)
    at h (pretty-text-bundle-1122bc3….js:sourcemap:1)
    at r (pretty-text-bundle-1122bc3….js:sourcemap:1)
    at a (application-6ed9515….js:sourcemap:1)
    at r (application-6ed9515….js:sourcemap:1)
    at t.html (plugin-third-party-3bbfdf2….js:sourcemap:1)
    at t.p [as draw] (application-6ed9515….js:sourcemap:48)
    at t.value (application-6ed9515….js:sourcemap:48)
    at r (_vendor-ee405da….js:7919)
u @ _ember_jquery-a8dcbd3….js:28913

```

---

<div class="post-metadata">

### Author: ![Alavi1412](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alavi1412/32/67721_2.png) [@Alavi1412](https://meta.discourse.org/u/Alavi1412)
#### Post date: [August 1, 2017, 12:33pm UTC](https://meta.discourse.org/t/layouts-plugin/55208/69 "2017-08-01T12:33:17Z")

</div>

I have solved this problem by using `TextLib.cookAsync`.  
You could see fixed profile widget [here](https://github.com/Alavi1412/discourse-profile-widget)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [August 1, 2017, 2:23pm UTC](https://meta.discourse.org/t/layouts-plugin/55208/70 "2017-08-01T14:23:52Z")

</div>

My plan is to totally deprecate cook from the library, we simply can not safely use it anymore. cookAsync is the only method allowed.

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [August 7, 2017, 2:28am UTC](https://meta.discourse.org/t/layouts-plugin/55208/71 "2017-08-07T02:28:33Z")

</div>

Note to users of this plugin (@Pad_Pors) . I’ve changed the way widgets are enabled and positioned. Rather than listing widgets in settings, you now select the position and whether the widget is pinned in a separate admin panel.

 ![36 AM](https://global.discourse-cdn.com/meta/original/3X/e/7/e764db9fbe1143242f26cdc9ca4566adaf573d79.png)

Instead of monkey patching the SiteSetting model, i.e.

```plaintext
SiteSetting.class_eval do
  @choices[:layouts_sidebar_left_widgets].push('profile')
end

```

You now add widgets in your `plugin.rb` like so:

```plaintext
DiscourseLayouts::WidgetHelper.add_widget('election-list')

```

This will make them appear on the list of widgets in the new admin panel.

---

<div class="post-metadata">

### Author: ![Ham](https://avatars.discourse-cdn.com/v4/letter/h/ecb155/32.png) [@Ham](https://meta.discourse.org/u/Ham)
#### Post date: [August 9, 2017, 2:10am UTC](https://meta.discourse.org/t/layouts-plugin/55208/72 "2017-08-09T02:10:55Z")

</div>

Hey Angus. Do you have this working on the current version? My app wont launch with this right now.

Also I couldnt see the other one but the profile widget also isnt working on it.

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [August 9, 2017, 2:59am UTC](https://meta.discourse.org/t/layouts-plugin/55208/73 "2017-08-09T02:59:31Z")

</div>

Yup, it works fine with the latest version. Can you find any relevant logs?

 ![06 AM](https://global.discourse-cdn.com/meta/original/3X/1/1/11b83dde4f6af8c60aa42f21bd99d8928b4a448c.png)  
 ![15 AM](https://global.discourse-cdn.com/meta/original/3X/d/9/d9902f419b12d8d75864a949fb8b587fce74be33.png)

> [@Ham](#):
>
> Also I couldnt see the other one but the profile widget also isnt working on it.

I don’t actually use the profile widget. I’ll take a look. Have you enabled it as described above?

> [@Layouts Plugin](https://meta.discourse.org/t/custom-layouts-plugin/55208/71):
>
> Note to users of this plugin (@Pad_Pors) . I’ve changed the way widgets are enabled and positioned. Rather than listing widgets in settings, you now select the position and whether the widget is pinned in a separate admin panel. Instead of monkey patching the SiteSetting model, i.e. SiteSetting.class\_eval do @choices[:layouts\_sidebar\_left\_widgets].push('profile') end You now add widgets in your plugin.rb like so: DiscourseLayouts::WidgetHelper.add\_widget('election-list') This wi…

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [August 9, 2017, 3:06am UTC](https://meta.discourse.org/t/layouts-plugin/55208/74 "2017-08-09T03:06:59Z")

</div>

Ok, I’ve updated the profile widget to use the new way of adding widgets.

 ![33 AM](https://global.discourse-cdn.com/meta/original/3X/6/a/6a30a94e2f40d22d4c8cc923c954e08177098ac7.png)

 ![Screenshot at Aug 09 11-04-59](https://global.discourse-cdn.com/meta/original/3X/8/5/8511700debc30badd4d3046f7437a7360eb503f1.png)

[https://github.com/angusmcleod/discourse-profile-widget/commit/ab1a53abadef9a055c539e5615b4df05f62c96b9](https://github.com/angusmcleod/discourse-profile-widget/commit/ab1a53abadef9a055c539e5615b4df05f62c96b9)

---

<div class="post-metadata">

### Author: ![Ham](https://avatars.discourse-cdn.com/v4/letter/h/ecb155/32.png) [@Ham](https://meta.discourse.org/u/Ham)
#### Post date: [August 9, 2017, 7:51am UTC](https://meta.discourse.org/t/layouts-plugin/55208/75 "2017-08-09T07:51:33Z")

</div>

```
0: pry (0.10.4) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/pry-0.10.4.gemspec
Using unicorn 5.3.0
0: unicorn (5.3.0) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/unicorn-5.3.0.gemspec
Using rbtrace 0.4.8
0: rbtrace (0.4.8) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/rbtrace-0.4.8.gemspec
Using rspec-core 3.6.0
0: rspec-core (3.6.0) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/rspec-core-3.6.0.gemspec
Using rspec-expectations 3.6.0
0: rspec-expectations (3.6.0) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/rspec-expectations-3.6.0.gemspec
Using rspec-mocks 3.6.0
0: rspec-mocks (3.6.0) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/rspec-mocks-3.6.0.gemspec
Using sassc 1.11.2
0: sassc (1.11.2) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/sassc-1.11.2.gemspec
Using unf 0.1.4
0: unf (0.1.4) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/unf-0.1.4.gemspec
Using fast_xor 1.1.3
0: fast_xor (1.1.3) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/fast_xor-1.1.3.gemspec
Fetching activesupport 4.2.9
Installing activesupport 4.2.9
0: activesupport (4.2.9) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/activesupport-4.2.9.gemspec
Using loofah 2.0.3
0: loofah (2.0.3) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/loofah-2.0.3.gemspec
Using nokogumbo 1.4.13
0: nokogumbo (1.4.13) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/nokogumbo-1.4.13.gemspec
Using ruby-readability 0.7.0
0: ruby-readability (0.7.0) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/ruby-readability-0.7.0.gemspec
Using sidekiq 5.0.3
0: sidekiq (5.0.3) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/sidekiq-5.0.3.gemspec
Using mail 2.6.6
0: mail (2.6.6) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/mail-2.6.6.gemspec
Using oga 2.10
0: oga (2.10) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/oga-2.10.gemspec
Using aws-sdk-resources 2.5.3
0: aws-sdk-resources (2.5.3) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/aws-sdk-resources-2.5.3.gemspec
Using ember-handlebars-template 0.7.5
0: ember-handlebars-template (0.7.5) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/ember-handlebars-template-0.7.5.gemspec
Using webmock 3.0.1
0: webmock (3.0.1) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/webmock-3.0.1.gemspec
Using oauth2 1.3.1
0: oauth2 (1.3.1) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/oauth2-1.3.1.gemspec
Using listen 3.1.5
0: listen (3.1.5) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/listen-3.1.5.gemspec
Using omniauth-oauth 1.1.0
0: omniauth-oauth (1.1.0) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/omniauth-oauth-1.1.0.gemspec
Using omniauth-openid 1.0.1
0: omniauth-openid (1.0.1) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/omniauth-openid-1.0.1.gemspec
Using pry-nav 0.2.4
0: pry-nav (0.2.4) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/pry-nav-0.2.4.gemspec
Using pry-rails 0.3.4
0: pry-rails (0.3.4) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/pry-rails-0.3.4.gemspec
Using rspec 3.6.0
0: rspec (3.6.0) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/rspec-3.6.0.gemspec
Using rails-deprecated_sanitizer 1.0.3
0: rails-deprecated_sanitizer (1.0.3) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/rails-deprecated_sanitizer-1.0.3.gemspec
Using globalid 0.4.0
0: globalid (0.4.0) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/globalid-0.4.0.gemspec
Fetching activemodel 4.2.9
Installing activemodel 4.2.9
0: activemodel (4.2.9) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/activemodel-4.2.9.gemspec
Using shoulda-matchers 2.8.0
0: shoulda-matchers (2.8.0) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/shoulda-matchers-2.8.0.gemspec
Using rails-html-sanitizer 1.0.3
0: rails-html-sanitizer (1.0.3) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/rails-html-sanitizer-1.0.3.gemspec
Using sanitize 4.5.0
0: sanitize (4.5.0) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/sanitize-4.5.0.gemspec
Using aws-sdk 2.5.3
0: aws-sdk (2.5.3) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/aws-sdk-2.5.3.gemspec
Using omniauth-oauth2 1.4.0
0: omniauth-oauth2 (1.4.0) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/omniauth-oauth2-1.4.0.gemspec
Using omniauth-twitter 1.3.0
0: omniauth-twitter (1.3.0) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/omniauth-twitter-1.3.0.gemspec
Using rspec-html-matchers 0.9.1
0: rspec-html-matchers (0.9.1) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/rspec-html-matchers-0.9.1.gemspec
Using rails-dom-testing 1.0.8
0: rails-dom-testing (1.0.8) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/rails-dom-testing-1.0.8.gemspec
Fetching activejob 4.2.9
Installing activejob 4.2.9
0: activejob (4.2.9) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/activejob-4.2.9.gemspec
Using active_model_serializers 0.8.3
0: active_model_serializers (0.8.3) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/active_model_serializers-0.8.3.gemspec
Fetching activerecord 4.2.9
Installing activerecord 4.2.9
0: activerecord (4.2.9) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/activerecord-4.2.9.gemspec
Using shoulda 3.5.0
0: shoulda (3.5.0) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/shoulda-3.5.0.gemspec
Fetching onebox 1.8.17
Installing onebox 1.8.17
0: onebox (1.8.17) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/onebox-1.8.17.gemspec
Using omniauth-facebook 4.0.0
0: omniauth-facebook (4.0.0) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/omniauth-facebook-4.0.0.gemspec
Fetching omniauth-github 1.3.0
Installing omniauth-github 1.3.0
0: omniauth-github (1.3.0) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/omniauth-github-1.3.0.gemspec
Using omniauth-google-oauth2 0.3.1
0: omniauth-google-oauth2 (0.3.1) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/omniauth-google-oauth2-0.3.1.gemspec
Using omniauth-instagram 1.0.2
0: omniauth-instagram (1.0.2) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/omniauth-instagram-1.0.2.gemspec
Fetching actionview 4.2.9
Installing actionview 4.2.9
0: actionview (4.2.9) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/actionview-4.2.9.gemspec
Using seed-fu 2.3.6
0: seed-fu (2.3.6) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/seed-fu-2.3.6.gemspec
Using test_after_commit 1.1.0
0: test_after_commit (1.1.0) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/test_after_commit-1.1.0.gemspec
Fetching actionpack 4.2.9
Installing actionpack 4.2.9
0: actionpack (4.2.9) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/actionpack-4.2.9.gemspec
Fetching actionmailer 4.2.9
Installing actionmailer 4.2.9
0: actionmailer (4.2.9) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/actionmailer-4.2.9.gemspec
Fetching railties 4.2.9
Installing railties 4.2.9
0: railties (4.2.9) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/railties-4.2.9.gemspec
Using sprockets-rails 3.2.0
0: sprockets-rails (3.2.0) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/sprockets-rails-3.2.0.gemspec
Using discourse-qunit-rails 0.0.9
0: discourse-qunit-rails (0.0.9) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/discourse-qunit-rails-0.0.9.gemspec
Using jquery-rails 4.3.1
0: jquery-rails (4.3.1) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/jquery-rails-4.3.1.gemspec
Using rspec-rails 3.6.0
0: rspec-rails (3.6.0) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/rspec-rails-3.6.0.gemspec
Fetching rails 4.2.9
Installing rails 4.2.9
0: rails (4.2.9) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/rails-4.2.9.gemspec
Using ember-rails 0.18.5
0: ember-rails (0.18.5) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/ember-rails-0.18.5.gemspec
Using rails_multisite 1.0.6
0: rails_multisite (1.0.6) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/rails_multisite-1.0.6.gemspec
Using spork-rails 4.0.0
0: spork-rails (4.0.0) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/spork-rails-4.0.0.gemspec
Bundle complete! 96 Gemfile dependencies, 173 gems now installed.
Gems in the group development were not installed.
Bundled gems are installed into ./vendor/bundle.

I, [2017-08-09T07:46:56.949898 #15] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
rake aborted!
NoMethodError: undefined method `[]' for nil:NilClass
/var/www/discourse/plugins/dl-custom-content/plugin.rb:9:in `block (2 levels) in activate!'
/var/www/discourse/plugins/dl-custom-content/plugin.rb:8:in `class_eval'
/var/www/discourse/plugins/dl-custom-content/plugin.rb:8:in `block in activate!'
/var/www/discourse/lib/plugin/instance.rb:208:in `block in notify_after_initialize'
/var/www/discourse/lib/plugin/instance.rb:206:in `each'
/var/www/discourse/lib/plugin/instance.rb:206:in `notify_after_initialize'
/var/www/discourse/config/application.rb:209:in `block (2 levels) in <class:Application>'
/var/www/discourse/config/application.rb:209:in `each'
/var/www/discourse/config/application.rb:209:in `block in <class:Application>'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/lazy_load_hooks.rb:44:in `each'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/railties-4.2.9/lib/rails/application/finisher.rb:62:in `block in <module:Finisher>'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/railties-4.2.9/lib/rails/initializable.rb:30:in `instance_exec'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/railties-4.2.9/lib/rails/initializable.rb:30:in `run'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/railties-4.2.9/lib/rails/initializable.rb:55:in `block in run_initializers'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/railties-4.2.9/lib/rails/initializable.rb:54:in `run_initializers'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/railties-4.2.9/lib/rails/application.rb:352:in `initialize!'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/railties-4.2.9/lib/rails/railtie.rb:194:in `public_send'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/railties-4.2.9/lib/rails/railtie.rb:194:in `method_missing'
/var/www/discourse/config/environment.rb:5:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:274:in `require'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:274:in `block in require'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:240:in `load_dependency'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:274:in `require'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/railties-4.2.9/lib/rails/application.rb:328:in `require_environment!'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/railties-4.2.9/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:22:in `load'
/usr/local/bin/bundle:22:in `<main>'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
I, [2017-08-09T07:47:03.176969 #15] INFO -- :
I, [2017-08-09T07:47:03.177937 #15] INFO -- : Terminating async processes
I, [2017-08-09T07:47:03.178041 #15] INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/9.5/bin/postmaster -D /etc/postgresql/9.5/main pid: 44
I, [2017-08-09T07:47:03.178422 #15] INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 157
2017-08-09 07:47:03.178 UTC [44] LOG: received fast shutdown request
2017-08-09 07:47:03.178 UTC [44] LOG: aborting any active transactions
157:signal-handler (1502264823) 2017-08-09 07:47:03.179 UTC [51] LOG: autovacuum launcher shutting down
Received SIGTERM scheduling shutdown...
2017-08-09 07:47:03.185 UTC [48] LOG: shutting down
157:M 09 Aug 07:47:03.238 # User requested shutdown...
157:M 09 Aug 07:47:03.238 * Saving the final RDB snapshot before exiting.
2017-08-09 07:47:03.261 UTC [48] LOG: database system is shut down
157:M 09 Aug 07:47:03.328 * DB saved on disk
157:M 09 Aug 07:47:03.328 # Redis is now ready to exit, bye bye...

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 464 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --deployment --verbose --without test --without development'", "su discourse -c 'bundle exec rake db:migrate'", "su discourse -c 'bundle exec rake assets:precompile'"]}
5e2f206b07fc093adb6a40ae8494c03ec58e0c19cc9a08484356663165da3c64
**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one
root@server70:/var/discourse#

```

This is what I get. The profile widget was ok on here but even in layouts i have it saved but its not showing up on my front page.

Edit the profile widget is showing now after I rebuilt the app.

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [August 9, 2017, 8:57am UTC](https://meta.discourse.org/t/layouts-plugin/55208/76 "2017-08-09T08:57:32Z")

</div>

It looks like the error is coming from the `dl-custom-content` plugin / widget, not the layouts plugin.

Remove that widget and try again.

---

<div class="post-metadata">

### Author: ![Ham](https://avatars.discourse-cdn.com/v4/letter/h/ecb155/32.png) [@Ham](https://meta.discourse.org/u/Ham)
#### Post date: [August 9, 2017, 9:10am UTC](https://meta.discourse.org/t/layouts-plugin/55208/77 "2017-08-09T09:10:08Z")

</div>

Ok. Guess that’s the one I need to work. Do you have that one working yet?

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [August 10, 2017, 3:16am UTC](https://meta.discourse.org/t/layouts-plugin/55208/78 "2017-08-10T03:16:42Z")

</div>

I didn’t build that one.

> [@Layouts Plugin](https://meta.discourse.org/t/custom-layouts-plugin/55208/4):
>
> This is very cool. I’ve had a play with Discourse Layouts and written [dl-custom-content](https://github.com/jezdean/dl-custom-content). It’s a tiny plugin using Discourse Layouts to show arbitrary HTML. A really awesome projects; thank you!

Here’s how you can fix it if you want to use it:

1. Fork the `dl-custom-content` repo.

2. Change these lines

3. Change the plugin url in your `app.yml` to your fork.

---

<div class="post-metadata">

### Author: ![Ham](https://avatars.discourse-cdn.com/v4/letter/h/ecb155/32.png) [@Ham](https://meta.discourse.org/u/Ham)
#### Post date: [August 10, 2017, 5:54am UTC](https://meta.discourse.org/t/layouts-plugin/55208/79 "2017-08-10T05:54:21Z")

</div>

Ah ok. Thanks Angus!

---

<div class="post-metadata">

### Author: ![Ham](https://avatars.discourse-cdn.com/v4/letter/h/ecb155/32.png) [@Ham](https://meta.discourse.org/u/Ham)
#### Post date: [August 10, 2017, 7:22am UTC](https://meta.discourse.org/t/layouts-plugin/55208/80 "2017-08-10T07:22:22Z")

</div>

No luck. Made the changes and it still failed when ./launcher rebuild app

---

<div class="post-metadata">

### Author: ![exetico](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/exetico/32/119962_2.png) [@exetico](https://meta.discourse.org/u/exetico)
#### Post date: [August 27, 2017, 1:05pm UTC](https://meta.discourse.org/t/layouts-plugin/55208/81 "2017-08-27T13:05:29Z")

</div>

Did you manage to fix it @Ham :-)?

---

<div class="post-metadata">

### Author: ![Ham](https://avatars.discourse-cdn.com/v4/letter/h/ecb155/32.png) [@Ham](https://meta.discourse.org/u/Ham)
#### Post date: [August 27, 2017, 1:08pm UTC](https://meta.discourse.org/t/layouts-plugin/55208/82 "2017-08-27T13:08:58Z")

</div>

Never. Just removed it and made my css changes back to how it was prior. My site was live and couldn’t have it down any longer needed.

[Previous page](https://meta.discourse.org/t/layouts-plugin/55208.md?page=3)

[Next page](https://meta.discourse.org/t/layouts-plugin/55208.md?page=5)
