Nodebb Theme quickstart
-
I followed all the instructions to install nodebb-theme-quickstart, and changed the instances in required files.
I however, when I click my admin panel > Extend > Widgets, I get the following errors..
Internal error.
Oops! Looks like something went wrong!
/api/admin/extend/widgets
Cannot read property 'map' of nullPlease can someone explain what is this error??
-
@mkarmocha said in Nodebb Theme quickstart:
I followed all the instructions to install nodebb-theme-quickstart, and changed the instances in required files.
I however, when I click my admin panel > Extend > Widgets, I get the following errors..
Internal error.
Oops! Looks like something went wrong!
/api/admin/extend/widgets
Cannot read property 'map' of nullPlease can someone explain what is this error??
When I run this http://127.0.0.1:4567/api/admin/extend/widgets
I get following message..
{"path":"/api/admin/extend/widgets","error":"Cannot read property 'map' of null"}I think its about hook, but I have changed nothing in plugin.json file except renamed 'id' for the theme.
I also checked theme.js file, it contains following, which is responsible for creating widget, I guess.
(function(module) {
"use strict";var Theme = {}; Theme.defineWidgetAreas = function(areas, callback) { areas = areas.concat([ { 'name': 'MOTD', 'template': 'home.tpl', 'location': 'motd' }, { 'name': 'Homepage Footer', 'template': 'home.tpl', 'location': 'footer' }, { 'name': 'Category Sidebar', 'template': 'category.tpl', 'location': 'sidebar' }, { 'name': 'Topic Footer', 'template': 'topic.tpl', 'location': 'footer' } ]); callback(null, areas); }; module.exports = Theme;
}(module));
Please help.
-
@mkarmocha said in Nodebb Theme quickstart:
Yes its enable
I just changed my theme to default (Persona) and I again went back to Extend > Widgets and I still see the same error msg.
-
I ran the log and found this error
6/4 16:14 [21367] - info: [plugins] unbuild [email protected]
6/4 16:14 [21367] - error: [plugins] filter:widgets.getAreas, Cannot read property 'map' of null
6/4 16:14 [21367] - error: /api/admin/extend/widgets
TypeError: Cannot read property 'map' of null
at /home/ddd/PhpstormProjects/nodebb/node_modules/nodebb-plugin-custom-pages/library.js:31:17I uninstalled this plugin nodebb-plugin-custom-pages and it worked.
-
@mkarmocha I've sent a PR to fix this: https://github.com/psychobunny/nodebb-plugin-custom-pages/pull/30
For now if you want to use nodebb-plugin-custom-pages, you have to press the save button within its ACP page at least once. This should fix it then.
-
@frissdiegurke said in Nodebb Theme quickstart:
@mkarmocha I've sent a PR to fix this: https://github.com/psychobunny/nodebb-plugin-custom-pages/pull/30
For now if you want to use nodebb-plugin-custom-pages, you have to press the save button within its ACP page at least once. This should fix it then.
Thanks
-
@mkarmocha It's mostly extracted from the URL. See https://docs.nodebb.org/en/latest/themes/templates.html#how-it-works
-
@frissdiegurke said in Nodebb Theme quickstart:
@mkarmocha It's mostly extracted from the URL. See https://docs.nodebb.org/en/latest/themes/templates.html#how-it-works
I did check, but I don't get any hint about which tpl file is been used. For instance, I want to know which tpl file is been used in main page, like there are header.tpl, footer.tpl so what about the main content section ?? which tpl file is it using in homepage>>
-
@mkarmocha that special route is to be set within the "ACP -> General -> Home Page"; It's categories by default.