ConverseJS is the web based XMPP client entirely written mainly in Javascript. It is used by Tiki to provide the webchat feature. This library was added into Tiki as third part library and managed by composer build tool with help of supplementary repository asset-packagist.org.

Workarounds

bootstrap.native


ConverseJS bundle a library called bootstrap.native. TikiWiki also uses the same library to show dropdows, buttons and modal forms. The problem is this library is loaded twice and causes a lot of conflicts and strange behaviors in Tiki interface.

There is no easy workaround to this problem. Actually, a patch was written to completely remove bootstrap.native from ConverseJS and force to use the bootstrap.native loaded by Tiki. This patch should be updated whenever ConverseJS is updated, otherwise it will not be applied by composer correctly.

The patch file, as of Tiki 20.x, is located at installer/composer-patches/jcbrand-conversejs_remove-native-javascript-for-bootstrap.patch.

assets_path


ConverseJS has an option called assets_path, used to inform the base url from where assets will be loaded. The problem it works just for resources loaded by Javascript only. Other resources loaded from CSS files are hardcoded to load from /dist/, that will never work on Tiki. The workaround to this problem was creating a new stylesheet to override ConverseJS definitions for all resources loaded from /dist/ URL. This file needs to be reviewed whenever ConverseJS is updated.

Installing/Updating


1. Install the ConverseJS using the composer tool

composer require -d vendor_bundled npm-asset/converse.js:5.0.5  --ignore-platform-reqs


2. Manually create a patch to remove bootstrap.native from ConverseJS
3. Check every place in conversejs.css where resource are loaded from /dist/ and override it in lib/xmpp/css/conversejs.css