# Discourse layouts plugin is broken

**URL:** <https://meta.discourse.org/t/discourse-layouts-plugin-is-broken/75722>\
**Category:** Support\
**Created:** [December 9, 2017, 5:16am UTC](https://meta.discourse.org/t/discourse-layouts-plugin-is-broken/75722 "2017-12-09T05:16:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![GuidoD](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/guidod/32/292621_2.png) [@GuidoD](https://meta.discourse.org/u/GuidoD)\
**Post date:** [December 9, 2017, 5:16am UTC](https://meta.discourse.org/t/discourse-layouts-plugin-is-broken/75722/1 "2017-12-09T05:16:30Z")

</div>

I do have the same Problem as Parisa. The installation is currently on [v1.9.0.beta14 +18](https://github.com/discourse/discourse/compare/880d154381c13855bfc01cb138fe544d01eb9915...tests-passed) and the system tells me to upgrade to 1.9.0.beta15 but UI upgrade is disabled

```plaintext
<h2>You are running an old version of the Discourse image.</h2>
<p>
Upgrades via the web UI are disabled until you run the latest image.
</p>

```

but doing the upgrade on the console does fail.  
How can I solve this?

```plaintext
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 11137 exi t 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 --withou t test --without development'", "su discourse -c 'bundle exec rake db:migrate'", "su discourse -c 'bundle exec rake assets:precompile'"]}
3fef1ff0c053dc5c0e9b7ba85f73b95bbdf875181f42cd625bfe9ede20d4315f
**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one

```

and further up I do see:

```plaintext
Building native extensions. This could take a while...
0: unicorn (5.3.1) from /var/www/discourse/vendor/bundle/ruby/2.3.0/specifications/unicorn-5.3.1.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
Bundle complete! 105 Gemfile dependencies, 181 gems now installed.
Gems in the group development were not installed.
Bundled gems are installed into `./vendor/bundle`

I, [2017-12-09T04:35:40.446491 #16] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
rake aborted!
ArgumentError: wrong number of arguments (given 1, expected 2)
/var/www/discourse/plugins/discourse-layouts/lib/widget_helper.rb:4:in `add_widget'

```

---

<div class="post-metadata">

**Author:** ![dax](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dax/32/244677_2.png) [@dax](https://meta.discourse.org/u/dax)\
**Post date:** [December 9, 2017, 11:06am UTC](https://meta.discourse.org/t/discourse-layouts-plugin-is-broken/75722/2 "2017-12-09T11:06:08Z")

</div>

> [@GuidoD](#):
>
> How can I solve this?

Comment out the layout plugin on your .yml file and launch the rebuild again.  
Then wait until @angus fixes the problem before rehabilitating 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:** [December 10, 2017, 3:44am UTC](https://meta.discourse.org/t/discourse-layouts-plugin-is-broken/75722/3 "2017-12-10T03:44:57Z")

</div>

Hey there 🙂 The layouts plugin isn’t broken. You’ll get this error if you’re trying to add a widget and you don’t pass the right number arguments to the `add_widget` method.

What widget(s) / versions of widgets are you trying to use with the layouts plugin? (maybe just paste the list of plugins you’re using here)

Additionally, I’ve made a small change to the layouts plugin to prevent the passing of incorrect arguments from throwing an exception like this.

---

<div class="post-metadata">

**Author:** ![GuidoD](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/guidod/32/292621_2.png) [@GuidoD](https://meta.discourse.org/u/GuidoD)\
**Post date:** [December 10, 2017, 1:40pm UTC](https://meta.discourse.org/t/discourse-layouts-plugin-is-broken/75722/4 "2017-12-10T13:40:03Z")

</div>

this is the list of plugins that are currently installed::

 ![grafik](https://global.discourse-cdn.com/meta/original/3X/5/9/590d52900c17d58e53276bc3d04f7da28ea0fe0d.png)

---

<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:** [December 10, 2017, 1:48pm UTC](https://meta.discourse.org/t/discourse-layouts-plugin-is-broken/75722/5 "2017-12-10T13:48:31Z")

</div>

The issue is with `layouts-categories`. It’s using an old version of the layouts `add_widget` signature.

I’ve submitted a PR to your repo to update it.

[https://github.com/DemokratieInBewegung/layouts-categories/pull/8](https://github.com/DemokratieInBewegung/layouts-categories/pull/8)

---

<div class="post-metadata">

**Author:** ![GuidoD](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/guidod/32/292621_2.png) [@GuidoD](https://meta.discourse.org/u/GuidoD)\
**Post date:** [December 12, 2017, 9:33pm UTC](https://meta.discourse.org/t/discourse-layouts-plugin-is-broken/75722/6 "2017-12-12T21:33:36Z")

</div>

thanks to everyone who helped.  
Since we had layouts-categories anyway no longer in use (was used for a test in the past) we did just remove it and were then able to sucessfully upgrade.  
Thread can be closed now.

---

<div class="post-metadata">

**Author:** ![dax](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dax/32/244677_2.png) [@dax](https://meta.discourse.org/u/dax)\
**Post date:** [December 13, 2017, 9:44am UTC](https://meta.discourse.org/t/discourse-layouts-plugin-is-broken/75722/7 "2017-12-13T09:44:00Z")

</div>


