Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

SOLVED Web Editor Code Injection | 500 Internal Server Error (Header Template Default)

Subscribe

Get notified when there's activity on this post

This question has been flagged
qwebwebbuilder
1 Reply
4136 Views
Avatar
HGR Media Development

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


0
Avatar
Discard
Avatar
HGR Media Development
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.

1
Avatar
Discard
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
Odoo 18: Display image from char field containing url in qweb form
qweb
Avatar
Avatar
1
Jul 25
2987
PDF Export Option for QWeb Reports in odoo 17.0
qweb
Avatar
Avatar
1
May 25
3774
QWeb: use t-if to check birthday date Solved
qweb
Avatar
Avatar
1
Apr 25
3267
Odoo 17 - QWeb Reports with External Datasource Solved
qweb
Avatar
Avatar
1
Feb 25
2635
Tree line field shrinked/cut
qweb
Avatar
0
Oct 24
2175
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now