Widgets not showing on a new page called 'my-custom-page' that I made. Why is that?

Technical Support

Suggested Topics

  • 0 Votes
    10 Posts

    @nullpointer said in Connecting to socket endpoint from a custom frontend:

    var socket = io('https://dev-forum.domain.io', { transport: ["polling", "websocket"], path: "/socket.io/", extraHeaders: { withCredentials: true, cookie: 'express.sid=s%3Am0UuuyatTTSajjAnI5gGSukaJSHJaiKpIVhb3H7L.TW4c4vZn4blOnWV1gilF9HhMqFc9g9V7NnLLZHMAmFg; Domain=dev-forum.domain.io; Path=/; HttpOnly; SameSite=Lax', }, });

    withCredentials is not a header - it's an option that should be on the same level in the settings object as extraHeaders. It should be used instead of setting the cookie header manually in the browser - but it will only work if the browser has the cookies for the website you're connecting to and needs explicit permission from it via headers (the Access-Control-Allow-* headers).
    This should look more like this:

    var socket = io('https://dev-forum.domain.io', { transport: ["polling", "websocket"], path: "/socket.io/", withCredentials: true, });

    The reason the NodeBB test example works is that it's not ran inside a browser - NodeJS, as a server environment, has quite different security requirements than browsers and also just can't save credentials for each page (imagine what programming horror having this kind of mutable state in code would be...). I'm not sure what is your ultimate goal with this code, so that's why I mentioned the cookies as needed for server-side code.

  • 1 Votes
    6 Posts

    package-install requires lodash, preventing fresh installs · Issue #10289 · NodeBB/NodeBB

    https://community.nodebb.org/topic/16362/1-19-2-github-won-t-install-or-update/5 NodeBB/src/cli/package-install.js Line 6 in a1593e3 const _ = require('lodash'); External dependencies can't be used here. Use Object.assign or something in...


    GitHub (github.com)

  • 0 Votes
    1 Posts

    So I have an odd little issue. I am trying to use a plugin "shortcode" (or whatever the proper terminology is) in a Text widget but it is not working.

    Specifically I am trying to add [carousel{"items":1,"lazyLoad":false}] to a text widget. I do have the Parse as a Post? (Take all post-related plugins into effect) selected yet when I view the page that has the widget on it the Carousel plugin does not seem to be kicking in and doing what it should.

    Is there something I can add to make sure the "parse as a post" is doing what it should be doing?

    Thank you.

  • 0 Votes
    3 Posts

    On top of what @baris said, if you are using a reverse-proxy like nginx, you can add that location to redirect to the same place.

  • 0 Votes
    2 Posts

    @Bri you will have to change core I think.