• Extensions
  • FriendsOfFlarum Byōbu, well integrated, advanced private discussions

Update. Previous error was spotted on my localhost server. When I updated flarum and byobu on my hosting, I found out that private messages work totally ok.

I don't know if it's connected with my localhost working in Windows environment or you guys already fixed something in the code, but I'm glad it works 🙂

  • [deleted]

  • Edited

Does this extension work correctly in beta 15 ? I am able to reproduce the same issue in beta 15 as I could in 14. I don't have access to my PC presently, but it's easily replicated (for me anyway) in the sense that if I click on private messages, open a new message, close it, then click any tag, I can't open a new discussion window.

There's definitely a console error which I'll post as soon as I can, but I wondered if anyone else has noticed this ?

    Very minor detail: The display name driver is not used for the send <username> a message button on user dropdown, it is hardcoded to username.

    It looks like there is a new notification bug : when I receive a message, a notification number appears, it's ok. But when I try to open the notifications panel, it stays in loading state and it doesn't display any notification anymore until I read the private message. Is it only in my website or anyone has the same behaviour ?

    Edit : I noticed this javascript error when opening panel

    TypeError: this.props is undefined
    href DiscussionCreatedNotification.js:10
    view Notification.js:21
    a render.js:30
    l render.js:155
    l render.js:160
    l render.js:66
    u render.js:50
    l render.js:134
    l render.js:63
    u render.js:50
    l render.js:134
    l render.js:63
    u render.js:50
    l render.js:134
    l render.js:63
    u render.js:50
    l render.js:103
    l render.js:62
    u render.js:50
    l render.js:103
    l render.js:62
    f render.js:423
    h render.js:302
    f render.js:477
    f render.js:416
    h render.js:302
    f render.js:477
    f render.js:416
    f render.js:488
    f render.js:419
    h render.js:302
    f render.js:477
    f render.js:416
    h render.js:302
    f render.js:477
    f render.js:416
    f render.js:488
    f render.js:419
    h render.js:302
    f render.js:477
    f render.js:416
    h render.js:315
    f render.js:477
    f render.js:416
    f render.js:488
    f render.js:419
    h render.js:302
    exports render.js:964
    a mount-redraw.js:14
    c mount-redraw.js:25
    c mount-redraw.js:23
    loadMore NotificationListState.js:63
    promise callback*flarum.core</Ee</e.loadMore NotificationListState.js:61
    load NotificationListState.js:43
    onclick NotificationsDropdown.js:50
    handleEvent render.js:888
    I render.js:910
    k render.js:735
    l render.js:730
    l render.js:122
    l render.js:63
    u render.js:50
    l render.js:134
    l render.js:63
    l render.js:162
    l render.js:66
    u render.js:50
    l render.js:134
    l render.js:63
    u render.js:50
    l render.js:134
    l render.js:63
    l render.js:162
    l render.js:66
    u render.js:50
    h render.js:277
    exports render.js:964
    mount mount-redraw.js:45
    mount ForumApplication.js:123
    boot Application.js:176
    <anonymous> (index):219
    mount-redraw.js:15:23

    • IanM replied to this.

      sylv38 DiscussionCreatedNotification comes from fof/subscribed. This was corrected in 0.4.1, which version do you have installed?

        • [deleted]

        [deleted] Console error is as below

        Uncaught (in promise) TypeError: Cannot read property 'onunload' of undefined
            at r (extend.js:22)
            at addPollToDiscussion.js:57
        extend.js:22 Uncaught (in promise) TypeError: Cannot read property 'onunload' of undefined
            at r (extend.js:22)
            at addPollToDiscussion.js:57
        extend.js:22 Uncaught (in promise) TypeError: Cannot read property 'onunload' of undefined
            at r (extend.js:22)
            at addPollToDiscussion.js:57
        extend.js:22 Uncaught (in promise) TypeError: Cannot read property 'onunload' of undefined
            at r (extend.js:22)
            at addPollToDiscussion.js:57
        PrivateDiscussionComposer.js:29 Uncaught (in promise) TypeError: Cannot read property 'toArray' of undefined
            at e.n.data (PrivateDiscussionComposer.js:29)
            at t.app.initializers.add.et.a.changed (index.js:44)
            at t.<anonymous> (index.js:192)
            at t.<computed> [as preventExit] (extend.js:61)
            at t.e.load (ComposerState.js:48)
            at t.<computed> [as load] (extend.js:25)
            at IndexPage.js:298
            at new Promise (<anonymous>)
            at e.n.newDiscussionAction (IndexPage.js:296)
            at e.t.<computed> [as newDiscussionAction] (extend.js:25)

          [deleted] this seems to relate to polls more than it seems to relate to byobu or am I missing something @IanM ?

          • IanM replied to this.

            luceos

            [deleted]

            Just looking now, actualy. The polls issue, I believe would be temporarily resolved by removing pusher.. Still checking byobu

            Edit: @[deleted] for the error related to polls - please try composer require fof/polls:dev-master. I'm not able to test as I don't have pusher setup locally, but I think the issue should be resolved.

            The composer related issue however, will require some more investigation

              • [deleted]

              IanM @luceos I just disabled FoF/Polls, and the error in the console is gone - but, if I then repeat the process, and click "Start a Discussion", this time, no error message, but the composer (new message) object fails to load unless I press F5 to reload the page.

                • [deleted]

                IanM I don't have pusher installed, but do have kyrne/websockets

                • IanM replied to this.
                  • [deleted]

                  Now I see this

                  PrivateDiscussionComposer.js:29 Uncaught (in promise) TypeError: Cannot read property 'toArray' of undefined
                      at e.n.data (PrivateDiscussionComposer.js:29)
                      at t.app.initializers.add.et.a.changed (index.js:44)
                      at t.<anonymous> (index.js:192)
                      at t.<computed> [as preventExit] (extend.js:61)
                      at t.e.load (ComposerState.js:48)
                      at t.<computed> [as load] (extend.js:25)
                      at PrivateComposing.js:25
                      at new Promise (<anonymous>)
                      at t.s.action (PrivateComposing.js:15)
                      at _.handleEvent (render.js:888)

                  [deleted] I don't have pusher installed, but do have kyrne/websockets

                  Essentally the same, from a fof/polls perspective anyway..

                    • [deleted]

                    Also seeing this

                    extend.js:22 Uncaught (in promise) TypeError: Cannot read property 'onremove' of undefined
                        at r (extend.js:22)
                        at addPollToDiscussion.js:57
                    r @ extend.js:22
                    (anonymous) @ addPollToDiscussion.js:57
                    Promise.then (async)
                    (anonymous) @ addPollToDiscussion.js:23
                    t.<computed> @ extend.js:27
                    t.<computed> @ extend.js:25
                    a @ render.js:30
                    (anonymous) @ render.js:971
                    a @ mount-redraw.js:14
                    (anonymous) @ mount-redraw.js:25
                    requestAnimationFrame (async)
                    c @ mount-redraw.js:23
                    (anonymous) @ PostStreamState.js:118
                    Promise.then (async)
                    e.goToNumber @ PostStreamState.js:118
                    n.show @ DiscussionPage.js:169
                    Promise.then (async)
                    n.load @ DiscussionPage.js:112
                    n.oninit @ DiscussionPage.js:37
                    a @ render.js:30
                    M @ render.js:917
                    (anonymous) @ render.js:153
                    (anonymous) @ render.js:160
                    l @ render.js:66
                    u @ render.js:50
                    h @ render.js:374
                    (anonymous) @ render.js:444
                    f @ render.js:415
                    (anonymous) @ render.js:488
                    f @ render.js:419
                    h @ render.js:302
                    (anonymous) @ render.js:964
                    a @ mount-redraw.js:14
                    (anonymous) @ mount-redraw.js:25
                    requestAnimationFrame (async)
                    c @ mount-redraw.js:23
                    v @ router.js:111
                    Promise.then (async)
                    t @ router.js:126
                    S @ router.js:95
                    (anonymous) @ setImmediate.js:40
                    f @ setImmediate.js:69
                    a @ setImmediate.js:109
                    postMessage (async)
                    i @ setImmediate.js:120
                    p.setImmediate @ setImmediate.js:27
                    d @ router.js:143
                    p @ router.js:20
                    y.set @ router.js:182
                    s.attrs.onclick @ router.js:250
                    _.handleEvent @ render.js:888
                    extend.js:22 Uncaught (in promise) TypeError: Cannot read property 'onremove' of undefined
                        at r (extend.js:22)
                        at addPollToDiscussion.js:57
                    • IanM replied to this.

                      [deleted] this is definately coming from the pusher/websockets specific code in the extension. Unfortunately I'm running blind on attempting a fix as I don't have either setup locally. I think probably the most straightforward way to get this resolved is to see if @Kyrne can take a look at fof/polls?

                      I will continue to work on fof/byobu in the meantime, and hopefully get some resolution to the errors caused by it..

                        IanM Looks like you're right ! I updated and it solved the bug

                        • [deleted]

                        IanM Thanks. The error persists even if I disable FoF/Polls though... :-(

                        [deleted] but the composer (new message) object fails to load unless I press F5 to reload the page

                        This is exactly the same error I have on my localhost but don't have on the actual server.

                        8 days later
                        • [deleted]

                        IanM just circling back on this, as the issue in still evident on my forum. Any thoughts ?

                        Thanks

                        • IanM replied to this.

                          @IanM

                          I'm trying to extend PrivateDiscussionComposer. I wonder, if this is exported or not.

                          My webpack.config.js contains:

                          module.exports = require('flarum-webpack-config')({
                              useExtensions: ['fof-byobu'],
                          });

                          and in my extension I try:

                          import { byobu } from '@fof-byobu';
                          console.log(byobu)

                          ... which says:

                          Uncaught TypeError: _fof_byobu__WEBPACK_IMPORTED_MODULE_9__ is undefined

                          Is there a new way to extend certain parts of Byobu?