[IMP] web: Added log information to help fix errors from services.
A typo fix is added. Fix error from loading xml while widget is destroyed. Now that the xml templates are loaded in the bundle, the error appears more frequently. Part-of: odoo/odoo#95500
This commit is contained in:
@@ -11,7 +11,9 @@ export const publicLivechatService = {
|
||||
return {
|
||||
mountLivechatButton() {
|
||||
const livechatButton = new LivechatButton(rootWidget, messaging);
|
||||
livechatButton.appendTo(document.body);
|
||||
livechatButton.appendTo(document.body).catch(error => {
|
||||
console.info("Can't load 'LivechatButton' because:", error);
|
||||
});
|
||||
return livechatButton;
|
||||
},
|
||||
};
|
||||
|
||||
@@ -267,7 +267,7 @@ QWeb2.Engine = (function() {
|
||||
if (name && extend) {
|
||||
// Clone template and extend it
|
||||
if (!this.templates[extend]) {
|
||||
return this.tools.exception("Can't clone undefined template " + extend);
|
||||
return this.tools.exception("Can't clone undefined template '" + extend + "' to create '" + name + "'");
|
||||
}
|
||||
this.templates[name] = this.templates[extend].cloneNode(true);
|
||||
this.extend_templates[name] = (this.extend_templates[extend] || []).slice();
|
||||
|
||||
@@ -125,7 +125,7 @@ async function _startServices(env, toStart) {
|
||||
})
|
||||
.catch((error) => {
|
||||
services[name] = error;
|
||||
console.error(error);
|
||||
console.error("Can't load service '" + name + "' because:", error);
|
||||
})
|
||||
.finally(resolve);
|
||||
})
|
||||
|
||||
@@ -3865,7 +3865,7 @@ const SnippetOptionWidget = Widget.extend({
|
||||
// widget start.
|
||||
parentEl.removeChild(el);
|
||||
|
||||
if (widget.isContainer()) {
|
||||
if (widget.isContainer() && !widget.isDestroyed()) {
|
||||
return this._renderXMLWidgets(widget.el, widget);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -831,4 +831,4 @@
|
||||
|
||||
export var Quiz = Quiz;
|
||||
export var ConfirmationDialog = ConfirmationDialog;
|
||||
export const websiteSlidesQuizNoFullscree = publicWidget.registry.websiteSlidesQuizNoFullscreen;
|
||||
export const websiteSlidesQuizNoFullscreen = publicWidget.registry.websiteSlidesQuizNoFullscreen;
|
||||
|
||||
Reference in New Issue
Block a user