Skip to Content
Menu
This question has been flagged
1 Reply
2056 Views

I injected some html code above the tags in the html editor.

now I cannot even load the websites view to change the line of code.

does anyone know where I can find where this change was made to go in and delete the line of code I inserted?

Below is the debugging message I receive when trying to enter the websites view.

 

QWeb

Error message:

load could not load template
ValueError: Element '
' cannot be located in parent view View name: Template Header Default Error context: view: ir.ui.view(1350,) view.parent: ir.ui.view(1349,) Template: 571 Path: /t/t

The error occured while rendering the template 571

Traceback

Traceback (most recent call last):
  File "/opt/odoo14/odoo14-server/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/opt/odoo14/odoo14-server/odoo/http.py", line 808, in dispatch
    r = self._call_function(**self.params)
  File "/opt/odoo14/odoo14-server/odoo/http.py", line 361, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo14/odoo14-server/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo14/odoo14-server/odoo/http.py", line 352, in checked_call
    result.flatten()
  File "/opt/odoo14/odoo14-server/odoo/http.py", line 1252, in flatten
    self.response.append(self.render())
  File "/opt/odoo14/odoo14-server/odoo/http.py", line 1245, in render
    return env["ir.ui.view"]._render_template(self.template, self.qcontext)
  File "/opt/odoo14/odoo14-server/odoo/addons/base/models/ir_ui_view.py", line 1708, in _render_template
    return self.browse(self.get_view_id(template))._render(values, engine)
  File "/opt/odoo14/odoo14-server/addons/website/models/ir_ui_view.py", line 420, in _render
    return super(View, self)._render(values, engine=engine, minimal_qcontext=minimal_qcontext)
  File "/opt/odoo14/odoo14-server/addons/web_editor/models/ir_ui_view.py", line 28, in _render
    return super(IrUiView, self)._render(values=values, engine=engine, minimal_qcontext=minimal_qcontext)
  File "/opt/odoo14/odoo14-server/odoo/addons/base/models/ir_ui_view.py", line 1716, in _render
    return self.env[engine]._render(self.id, qcontext)
  File "/opt/odoo14/odoo14-server/odoo/addons/base/models/ir_qweb.py", line 55, in _render
    result = super(IrQWeb, self)._render(id_or_xml_id, values=values, **context)
  File "/opt/odoo14/odoo14-server/odoo/addons/base/models/qweb.py", line 258, in _render
    self.compile(template, options)(self, body.append, values or {})
  File "/opt/odoo14/odoo14-server/odoo/addons/base/models/qweb.py", line 333, in _compiled_fn
    raise e
  File "/opt/odoo14/odoo14-server/odoo/addons/base/models/qweb.py", line 331, in _compiled_fn
    return compiled(self, append, new, options, log)
  File "", line 1, in template_website_homepage1_32758
  File "", line 2, in compile
  File "/opt/odoo14/odoo14-server/odoo/tools/cache.py", line 90, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/opt/odoo14/odoo14-server/odoo/addons/base/models/ir_qweb.py", line 110, in compile
    return super(IrQWeb, self).compile(id_or_xml_id, options=options)
  File "/opt/odoo14/odoo14-server/odoo/addons/base/models/qweb.py", line 275, in compile
    element, document = self.get_template(template, options)
  File "/opt/odoo14/odoo14-server/odoo/addons/base/models/qweb.py", line 363, in get_template
    raise QWebException("load could not load template", e, path, name=template)
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/odoo14/odoo14-server/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/opt/odoo14/odoo14-server/odoo/http.py", line 808, in dispatch
    r = self._call_function(**self.params)
  File "/opt/odoo14/odoo14-server/odoo/http.py", line 361, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo14/odoo14-server/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo14/odoo14-server/odoo/http.py", line 352, in checked_call
    result.flatten()
  File "/opt/odoo14/odoo14-server/odoo/http.py", line 1252, in flatten
    self.response.append(self.render())
  File "/opt/odoo14/odoo14-server/odoo/http.py", line 1245, in render
    return env["ir.ui.view"]._render_template(self.template, self.qcontext)
  File "/opt/odoo14/odoo14-server/odoo/addons/base/models/ir_ui_view.py", line 1708, in _render_template
    return self.browse(self.get_view_id(template))._render(values, engine)
  File "/opt/odoo14/odoo14-server/addons/website/models/ir_ui_view.py", line 420, in _render
    return super(View, self)._render(values, engine=engine, minimal_qcontext=minimal_qcontext)
  File "/opt/odoo14/odoo14-server/addons/web_editor/models/ir_ui_view.py", line 28, in _render
    return super(IrUiView, self)._render(values=values, engine=engine, minimal_qcontext=minimal_qcontext)
  File "/opt/odoo14/odoo14-server/odoo/addons/base/models/ir_ui_view.py", line 1716, in _render
    return self.env[engine]._render(self.id, qcontext)
  File "/opt/odoo14/odoo14-server/odoo/addons/base/models/ir_qweb.py", line 55, in _render
    result = super(IrQWeb, self)._render(id_or_xml_id, values=values, **context)
  File "/opt/odoo14/odoo14-server/odoo/addons/base/models/qweb.py", line 258, in _render
    self.compile(template, options)(self, body.append, values or {})
  File "/opt/odoo14/odoo14-server/odoo/addons/base/models/qweb.py", line 333, in _compiled_fn
    raise e
  File "/opt/odoo14/odoo14-server/odoo/addons/base/models/qweb.py", line 331, in _compiled_fn
    return compiled(self, append, new, options, log)
  File "", line 1, in template_website_homepage1_32758
  File "", line 2, in compile
  File "/opt/odoo14/odoo14-server/odoo/tools/cache.py", line 90, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/opt/odoo14/odoo14-server/odoo/addons/base/models/ir_qweb.py", line 110, in compile
    return super(IrQWeb, self).compile(id_or_xml_id, options=options)
  File "/opt/odoo14/odoo14-server/odoo/addons/base/models/qweb.py", line 275, in compile
    element, document = self.get_template(template, options)
  File "/opt/odoo14/odoo14-server/odoo/addons/base/models/qweb.py", line 363, in get_template
    raise QWebException("load could not load template", e, path, name=template)
odoo.addons.base.models.qweb.QWebException: Element '
' cannot be located in parent view View name: Template Header Default Error context: view: ir.ui.view(1350,) view.parent: ir.ui.view(1349,) Traceback (most recent call last): File "/opt/odoo14/odoo14-server/odoo/addons/base/models/qweb.py", line 357, in get_template document = options.get('load', self._load)(template, options) File "/opt/odoo14/odoo14-server/odoo/addons/base/models/ir_qweb.py", line 119, in _load template = env['ir.ui.view'].sudo()._read_template(view_id) File "", line 2, in _read_template File "/opt/odoo14/odoo14-server/odoo/tools/cache.py", line 90, in lookup value = d[key] = self.method(*args, **kwargs) File "/opt/odoo14/odoo14-server/odoo/addons/base/models/ir_ui_view.py", line 1573, in _read_template arch = self.browse(view_id).read_combined(['arch'])['arch'] File "/opt/odoo14/odoo14-server/odoo/addons/base/models/ir_ui_view.py", line 809, in read_combined arch = root.apply_view_inheritance(arch_tree, self.model) File "/opt/odoo14/odoo14-server/odoo/addons/base/models/ir_ui_view.py", line 750, in apply_view_inheritance return self._apply_view_inheritance(source, inherit_tree) File "/opt/odoo14/odoo14-server/odoo/addons/base/models/ir_ui_view.py", line 759, in _apply_view_inheritance source = view._apply_view_inheritance(source, inherit_tree) File "/opt/odoo14/odoo14-server/odoo/addons/base/models/ir_ui_view.py", line 759, in _apply_view_inheritance source = view._apply_view_inheritance(source, inherit_tree) File "/opt/odoo14/odoo14-server/odoo/addons/base/models/ir_ui_view.py", line 758, in _apply_view_inheritance source = view.apply_inheritance_specs(source, arch_tree) File "/opt/odoo14/odoo14-server/odoo/addons/base/models/ir_ui_view.py", line 735, in apply_inheritance_specs self.handle_view_error(str(e)) File "/opt/odoo14/odoo14-server/odoo/addons/base/models/ir_ui_view.py", line 673, in handle_view_error raise ValueError(formatted_message).with_traceback(from_traceback) from from_exception ValueError: Element '
' cannot be located in parent view View name: Template Header Default Error context: view: ir.ui.view(1350,) view.parent: ir.ui.view(1349,) load could not load template ValueError: Element '
' cannot be located in parent view View name: Template Header Default Error context: view: ir.ui.view(1350,) view.parent: ir.ui.view(1349,) Template: 571 Path: /t/t


Avatar
Discard
Author Best Answer

I found the code injection (settings>technical>views>), then searched for "header default", and was able to delete the line of code.

Avatar
Discard
Related Posts Replies Views Activity
0
Oct 24
117
1
Apr 24
965
7
Sep 24
22445
1
Mar 24
275
0
Feb 24
410