Hi,

I just noticed that when a user is receiving a new message is doesn't update the Inbox block or the Notification block without refreshing the page. Is it normal? I think it should update by using JS live it is refreshing the conversation.
Am I the only one to have this problem?

But I noticed it does update the Title of the page with (1) for an unread message.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

phjou created an issue. See original summary.

phjou’s picture

Issue summary: View changes
phjou’s picture

Title: Live update is not working » Incompatibility with Core big_pipe module

I have investigate this issue and just have found the origin. The refresh update is not working with the big_pipe module of the core.

At the loading of the page, the Javascript try to get the container:
notificationWrapper = $(".private-message-notification-wrapper");

But the content of the block is added by an ajax command, so the variable is empty. We only have this in the HTML:
<span data-big-pipe-placeholder-id="callback=Drupal%5Cblock%5CBlockViewBuilder%3A%3AlazyBuilder&amp;args%5B0%5D=culturebrew_privatemessagenotification&amp;args%5B1%5D=full&amp;args%5B2%5D&amp;token=FKPASNQnR7hH0_6yMvkmdqzTfhEIC3Ir-ysvzJTetmQ"></span><div class="block block-private-message block-private-message-actions-block" id="block-culturebrew-privatemessageactions">
.
Maybe we should at least disable Big Pipe on the Notification and Inbox blocks in order to fix the refresh.

phjou’s picture

Just did a patch to disable the lazy loading on the notification and the inbox blocks.

phjou’s picture

Status: Active » Needs review
phjou’s picture

Status: Needs review » Needs work

Ok, just have found that it doesn't work correctly the container variable is undefined in the JS. I don't really know why :(

phjou’s picture

henzzapp made their first commit to this issue’s fork.

henzzapp’s picture

Status: Needs work » Needs review
Issue tags: +LutskGCW22

The element "notificationWrapper" should be assigned after receiving an AJAX response with unreadThreadCount value.

artem_sylchuk made their first commit to this issue’s fork.

artem_sylchuk’s picture

The issue with the JS of this module is that it doesn't use Drupal.behaviors properly that guarantee that content is present on the page before running scripts.
It seems to be pretty major rewrite of the module's JS to make it use contexts and behaviors properly, so marking this as closed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.