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

client error on IE: Assignment to read-only properties is not allowed in strict mode #8516

Closed
SuneBahn opened this issue Sep 13, 2015 · 8 comments

Comments

@SuneBahn
Copy link

When running Odoo 9.0 from git:

  1. install project
  2. open a client connection from IE
  3. click on Project>Projects and click on a project

Expected:
The project is shown

Actual:
client error: Assignment to read-only properties is not allowed in strict mode .... at web.assets_common.js

This only happens on IE, not on Chrome.

@sle-odoo
Copy link
Contributor

hi,
which version of IE?

@SuneBahn
Copy link
Author

IE 11.
I have tried it both on windows phone (8.1), Windows surface RT, and a laptop running Win8.1, all with the same result.

@rgeleta
Copy link
Contributor

rgeleta commented Oct 31, 2015

@auditum
Copy link

auditum commented Nov 23, 2015

Does anybody have a quick fix for this issue? The Odoo 9 Community edition currently cannot be used by IE 11 users! Is this issue fixed in the enterprise version?

@auditum
Copy link

auditum commented Nov 24, 2015

Fix:

in File: addons/web/static/src/js/framework/mixins.js
change _trigger_up function (starting at line 279) to

_trigger_up: function(event) {
        this.__edispatcherEvents.trigger(event.name, event);
        var parent = this.getParent();
        if (!event.is_stopped() && (parent)) {
            parent._trigger_up(event);
        }
    }

Diff:

281c281,282
<         if (!event.is_stopped() && (parent = this.getParent())) {
---
>         var parent = this.getParent();
>         if (!event.is_stopped() && (parent)) {

@nle-odoo
Copy link
Contributor

Hello thanks for reporting and investigating, it should be fixed in f5bd1cc which has the same effect than your last diff.

Is this issue fixed in the enterprise version?

It was fixed but was part of a very big commit. Hence, that this small line was also needed in community was overlooked.

@sjatkins
Copy link

Is this a general fix or for this specific project. Many people hit this error and mentioning what the general problem is and how to generally handle it would help many. Thanks for considering it.

@nle-odoo
Copy link
Contributor

nle-odoo commented Mar 15, 2017

@sjatkins the fix I spoke above is a fix for this particular issue.

the issue could happen to any project and was that we used a variable without declaring it (by doing var my_variable;) which when the javascript code is set as strict mode caused this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants