Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem when changing view_mode #1374

Closed
fabiomontefuscolo opened this issue Dec 10, 2018 · 4 comments

Comments

@fabiomontefuscolo
Copy link
Contributor

commented Dec 10, 2018

Hi,

I'm having a problem when changing view_mode on ConverseJS. To reproduce, you have to be always in the same tab or you should use ConverseJS with trusted=true. Steps:

  1. Login on ConverseJS;
  2. Go to a page where ConverseJS is in overlayed mode and controlbox is on;
  3. Go to a page where ConverseJS is in embedded mode and set up to auto join a specific room;

On step 3, the chat box will no appear. But if you inspect sessionStorage and delete a property which name format is "converse.chatbox-{{ jid }}-controlbox", the chatbox will appears normally after page reload.

That is it;

@fabiomontefuscolo fabiomontefuscolo changed the title Bug when changing view_mode Problem when changing view_mode Dec 10, 2018

@fabiomontefuscolo

This comment has been minimized.

Copy link
Contributor Author

commented Dec 11, 2018

I think you can't blacklist converse-controlbox, even on embedded mode. Otherwise, ConverseJS will give controlbox data from sessionStorage to converse-chatbox. After some steps, ConverseJS will try to get VCard from this data and an error will be thrown.

@jcbrand jcbrand added the bug label Dec 12, 2018

jcbrand added a commit that referenced this issue Dec 12, 2018

Remove coupling between converse-chatboxes and converse-roster
In embedded mode (singleton) we don't need or want the roster, so we
should be able to disable it.

updates #1374

jcbrand added a commit that referenced this issue Dec 12, 2018

jcbrand added a commit that referenced this issue Dec 12, 2018

Remove coupling between converse-chatboxes and converse-roster
In embedded mode (singleton) we don't need or want the roster, so we
should be able to disable it.

updates #1374

jcbrand added a commit that referenced this issue Dec 12, 2018

@jcbrand

This comment has been minimized.

Copy link
Member

commented Dec 12, 2018

Yes, the problem appears to be that the controlbox is stored in sessionStorage while in overlayed mode and then loaded in embedded mode (which isn't equipped to deal with the controlbox and assumes it'll never be there).

I'm currently working on a proper solution for this and I think it'll have to be based on the embedded-full branch which adds a new configuration option called singleton.

jcbrand added a commit that referenced this issue Dec 12, 2018

Remove coupling between converse-chatboxes and converse-roster
In embedded mode (singleton) we don't need or want the roster, so we
should be able to disable it.

updates #1374

jcbrand added a commit that referenced this issue Dec 12, 2018

@jcbrand

This comment has been minimized.

Copy link
Member

commented Dec 12, 2018

@fabiomontefuscolo I've committed two fixes for this issue. Could you test with the latest build whether this solves this particular problem for you?

jcbrand added a commit that referenced this issue Dec 13, 2018

No need to call `validate` here
Since the plugin is not enabled when it matters.

updates #1374
@jcbrand

This comment has been minimized.

Copy link
Member

commented Dec 13, 2018

Based on out-of-band feedback, the patch appears to solve the problem.

@jcbrand jcbrand closed this Dec 13, 2018

@jcbrand jcbrand added this to the 4.0.7 milestone Dec 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.