Custom Layouts Plugin

Yep please use the official Discourse builds instead. Use of Bitnami is at your own risk.

Thanks for you assistance, sure…I will set that up on Digital Ocean and will confirm if issue persists.

This Plugin is broken with Fakebook theme.

You could equally say Fakebook is broken with this plugin? :wink:

We support core Discourse and if a theme works, great. If not, you are probably out of luck.

Whilst we make great efforts to optimise compatibility we can’t promise all themes will work with our plugins. Especially those combinations where our plugin and the Theme are both changing templates.

If you want to use a Theme with this plugin choose a lighter weight Theme that has less or no impact on layout.

Fakebook already has its own sidebars and almost certainly won’t have been designed to work with this plugin (otherwise why doesn’t it use the CL sidebars?). It is also targeting core Discourse no doubt. You’ll probably have to choose between them. Or, use CL and borrow elements from Fakebook and design your own Theme.

There’s currently a Chrome limitation that prevents us fully exploiting Topic List Previews with sidebars. Watch this space…

2 Likes

It’s currently broken, for some reason.

** INCOMPATIBLE PLUGIN **

You are unable to build Discourse due to errors in the plugin at
/var/www/discourse/plugins/layouts-topic-list

We’ve removed it on our site.

The plugin has just undergone a significant update.

https://github.com/paviliondev/discourse-layouts/commit/a47cf304684baac5f380ba25a49c86f33858159d

You can now add theme components as widgets (in addition to plugins). I’ve updated the widget you’ve been using to support v0.2

https://github.com/angusmcleod/layouts-topic-list/commit/548503d6c01622afe5ca17fc63da343d4ab7ba5d

However I would recommend the new theme version of the same widget (with some functionality improvments and changes)

https://github.com/paviliondev/layouts-topic-lists-widget

Generally the plugin is moving away from using plugins for widgets to using themes. Full documentation to follow in the next day or so.

Note that the plugin now has support for group-specific permissions, so make sure this is set in /admin/layouts.

This plugin will also soon be moving to the same update schedule as our other plugins; see further:

6 Likes

It’s GREAT NEWS! I just written the same to another person, and suggested, that we moved to a theme-component based solution. Thanks for the update!

2 Likes

Please PM me with your use case so I can help you get setup with the new theme-supporting version :slight_smile:

4 Likes

When I update Discourse to the latest version, Theme Minimal - The Plugin is not working.

My Forum: Https://babyforex/net

Hey, welcome :slight_smile:

Can you give me some more specifics on the issue? What widgets are you trying to use?

A key thing to note is that the plugin now has enabled and group settings for each widget. That’s the first thing to check.

I’m still working on the documenation for v0.2 (literally right now!), and v0.2 won’t be officially launched until the next Pavilion Plugin Update Period: 2020-04-30T14:00:00Z2020-05-04T14:00:00Z.

If you look at try.thepavilion.io you’ll see that the plugin is working successfully with the current version of discourse (just updated): Layouts - Try Pavilion

1 Like

Hi Angus

My forum show blank page when I update to Latest Discourse Version. I use minimal light theme.

I just updated try.thepavilion.io to the latest version of both Discourse and this plugin and it has no issues. See e.g. try.thepavilion.io/c/layouts

Are you running the latest version of the plugin?

If you are running the latest version of everything, can you go to /logs and send me a PM with all the latest logs and a full list of the plugins you’re using

Hi Angus

This is my log:

ReferenceError: createWidget is not defined
    at https://babyforex.net/assets/plugins/layouts-custom-html-79795a6b28be65e4018399be0f7acd013a9a3065bf89e41348009b7d4d022c17.js:1:871
    at t.module.exports.u.<computed> (https://babyforex.net/assets/ember_jquery-d1d89874d5f08a664c68007c6c2eef5e3bb1cbd8058291fce7818d8ef4ded8ca.js:1:561910)
    at t.module.exports.u.<computed> (https://babyforex.net/assets/ember_jquery-d1d89874d5f08a664c68007c6c2eef5e3bb1cbd8058291fce7818d8ef4ded8ca.js:1:561623)
    at require (https://babyforex.net/assets/ember_jquery-d1d89874d5f08a664c68007c6c2eef5e3bb1cbd8058291fce7818d8ef4ded8ca.js:1:561640)
    at https://babyforex.net/assets/application-d8533a612d618e9f9772f7c5554ffa382ad1ac0d9948ebcdfcc616f5e295c095.js:1:2403830
    at Array.forEach (<anonymous>)
    at Object.t (https://babyforex.net/assets/application-d8533a612d618e9f9772f7c5554ffa382ad1ac0d9948ebcdfcc616f5e295c095.js:1:2403702)
    at Object.n.initialize (https://babyforex.net/assets/application-d8533a612d618e9f9772f7c5554ffa382ad1ac0d9948ebcdfcc616f5e295c095.js:1:176791)
    at https://babyforex.net/assets/ember_jquery-d1d89874d5f08a664c68007c6c2eef5e3bb1cbd8058291fce7818d8ef4ded8ca.js:1:340617
    at i.each (https://babyforex.net/assets/ember_jquery-d1d89874d5f08a664c68007c6c2eef5e3bb1cbd8058291fce7818d8ef4ded8ca.js:1:501398)

And here:

ReferenceError: Can’t find variable: createWidget Url: https://babyforex.net/assets/ember_jquery-d1d89874d5f08a664c68007c6c2eef5e3bb1cbd8058291fce7818d8ef4ded8ca.js Line: 1 Column: 31156 Window Locati

https://babyforex.net/assets/plugins/layouts-custom-html-79795a6b28be65e4018399be0f7acd013a9a3065bf89e41348009b7d4d022c17.js:1:883

https://babyforex.net/assets/ember_jquery-d1d89874d5f08a664c68007c6c2eef5e3bb1cbd8058291fce7818d8ef4ded8ca.js:1:561915

https://babyforex.net/assets/ember_jquery-d1d89874d5f08a664c68007c6c2eef5e3bb1cbd8058291fce7818d8ef4ded8ca.js:1:561624

require@https://babyforex.net/assets/ember_jquery-d1d89874d5f08a664c68007c6c2eef5e3bb1cbd8058291fce7818d8ef4ded8ca.js:1:561640

https://babyforex.net/assets/application-d8533a612d618e9f9772f7c5554ffa382ad1ac0d9948ebcdfcc616f5e295c095.js:1:2403839

forEach@[native code]

t@https://babyforex.net/assets/application-d8533a612d618e9f9772f7c5554ffa382ad1ac0d9948ebcdfcc616f5e295c095.js:1:2403709

https://babyforex.net/assets/application-d8533a612d618e9f9772f7c5554ffa382ad1ac0d9948ebcdfcc616f5e295c095.js:1:176795

https://babyforex.net/assets/ember_jquery-d1d89874d5f08a664c68007c6c2eef5e3bb1cbd8058291fce7818d8ef4ded8ca.js:1:340627

https://babyforex.net/assets/ember_jquery-d1d89874d5f08a664c68007c6c2eef5e3bb1cbd8058291fce7818d8ef4ded8ca.js:1:501399

https://babyforex.net/assets/ember_jquery-d1d89874d5f08a664c68007c6c2eef5e3bb1cbd8058291fce7818d8ef4ded8ca.js:1:500421

https://babyforex.net/assets/ember_jquery-d1d89874d5f08a664c68007c6c2eef5e3bb1cbd8058291fce7818d8ef4ded8ca.js:1:499868

https://babyforex.net/assets/ember_jquery-d1d89874d5f08a664c68007c6c2eef5e3bb1cbd8058291fce7818d8ef4ded8ca.js:1:499914

_runInitializer@https://babyforex.net/assets/ember_jquery-d1d89874d5f08a664c68007c6c2eef5e3bb1cbd8058291fce7818d8ef4ded8ca.js:1:340854

runInstanceInitializers@https://babyforex.net/assets/ember_jquery-d1d89874d5f08a664c68007c6c2eef5e3bb1cbd8058291fce7818d8ef4ded8ca.js:1:340577

_bootSync@https://babyforex.net/assets/ember_jquery-d1d89874d5f08a664c68007c6c2eef5e3bb1cbd8058291fce7818d8ef4ded8ca.js:1:325419

didBecomeReady@https://babyforex.net/assets/ember_jquery-d1d89874d5f08a664c68007c6c2eef5e3bb1cbd8058291fce7818d8ef4ded8ca.js:1:331042

https://babyforex.net/assets/ember_jquery-d1d89874d5f08a664c68007c6c2eef5e3bb1cbd8058291fce7818d8ef4ded8ca.js:1:490059

https://babyforex.net/assets/ember_jquery-d1d89874d5f08a664c68007c6c2eef5e3bb1cbd8058291fce7818d8ef4ded8ca.js:1:489056

https://babyforex.net/assets/ember_jquery-d1d89874d5f08a664c68007c6c2eef5e3bb1cbd8058291fce7818d8ef4ded8ca.js:1:491075

https://babyforex.net/assets/ember_jquery-d1d89874d5f08a664c68007c6c2eef5e3bb1cbd8058291fce7818d8ef4ded8ca.js:1:496504

https://babyforex.net/assets/ember_jquery-d1d89874d5f08a664c68007c6c2eef5e3bb1cbd8058291fce7818d8ef4ded8ca.js:1:493039

https://babyforex.net/assets/ember_jquery-d1d89874d5f08a664c68007c6c2eef5e3bb1cbd8058291fce7818d8ef4ded8ca.js:1:497040

e@https://babyforex.net/assets/ember_jquery-d1d89874d5f08a664c68007c6c2eef5e3bb1cbd8058291fce7818d8ef4ded8ca.js:1:29468

https://babyforex.net/assets/ember_jquery-d1d89874d5f08a664c68007c6c2eef5e3bb1cbd8058291fce7818d8ef4ded8ca.js:1:29788

You need to update the layouts-custom-html plugin to this commit

https://github.com/angusmcleod/layouts-custom-html/commit/3a319aca670f83ad23da9982fa9d4236300dca29

Note that the plugin-based widgets are generally being phased out in favour of theme-based widgets. I’ll be release a theme-component that replaces this plugin in the near future.

3 Likes

I had to change a few functions to get my plugin to work again.

Mainly using

layouts.createLayoutsWidget. and DiscourseLayouts::Widget.add

1 Like
TypeError: Discourse.SiteSettings is undefined_discourse-layouts-21b7cbab0ee1773efd84d72a08dbb131313019d1a0b99321fc5f165b31752521.js:93:23
    <anonymous> _discourse-layouts-21b7cbab0ee1773efd84d72a08dbb131313019d1a0b99321fc5f165b31752521.js:93
    jQuery 8
    _prepareInitializer _application-c96f4694dbdebd9912b6dffe0051bbb7d18f7c4bf08c5c3272c57906b63a978e.js:6849
    start _application-c96f4694dbdebd9912b6dffe0051bbb7d18f7c4bf08c5c3272c57906b63a978e.js:6870
    forEach self-hosted:225
    start _application-c96f4694dbdebd9912b6dffe0051bbb7d18f7c4bf08c5c3272c57906b63a978e.js:6866
    <anonymous> _start-discourse-efa4e5abfbd1b50b5152ffbe64d5dcea9f7c33f766dcc6387e2711f0f2112148.js:3
  var sidebarPadding = 20;
  var mainLeftOffset = Discourse.SiteSettings.layouts_sidebar_left_width + sidebarPadding;
  var mainRightOffset = Discourse.SiteSettings.layouts_sidebar_right_width + sidebarPadding;

We’re facing a problem, after the latest update. It’s reporting that Discourse.SiteSettings is not defined. Is it direct, og indirecly related to this plugin?

(I’ve just rebuilded our page)

Update:
Retort are generating the same issues. I’ve disabled Custom Layouts from our build, but hereafter, Retort reported the same problem with Discourse.SiteSettings :slight_smile:

Thanks Tobias, it’s due to this change in Discourse:

https://github.com/discourse/discourse/commit/2b2434b82d2c7919e764248f756246d5f1d686b2

I’ve addressed the issue in Layouts:

https://github.com/paviliondev/discourse-layouts/commit/5d8360c056e6c7915e96809b03ffc930d5ef9860

1 Like

Oh my I’m amazed the previous code ever worked! Those site settings were evaluated at module read time, which could be before the app has booted. Your new solution is now much cleaner and future proof :slight_smile:

4 Likes

Newly realised the power of this plugin, and really love the new direction it has taken with widgets based on components. Thank you @angus :tada:

Tested it quickly on a site but realised there is a compatibility issue when used with other theme components that injects themselves between the header and the main content; the sidebars gets stuck/sticky to the height including the height the injected theme component, rendering the sidebars floating in the middle or lower half of the screen.

Also - when I include the Layouts Topic Lists Widget in the active theme and activate it in Layouts, I get a white page and have to deactivate the Layouts plugin and rebuild to be able to fix.

All the best

2 Likes

Indeed, this is an issue I’m working on atm :slight_smile: Note that you can also disable fixed positioning via a site setting.

I’ll take a look at that widget, thanks.

1 Like