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

ERROR - "arguments.callee" cannot be used in strict mode #480

Open
schipa opened this issue Jul 12, 2017 · 3 comments
Open

ERROR - "arguments.callee" cannot be used in strict mode #480

schipa opened this issue Jul 12, 2017 · 3 comments

Comments

@schipa
Copy link

schipa commented Jul 12, 2017

Setup

Joomla! 3.7.3
T3 Framework 2.6.6
T3 Bs3 Blank 2.2.6

Problem

I'm getting following output on one of my pages:

Input_0:112: ERROR - "arguments.callee" cannot be used in strict mode
			if(arguments.callee &&
			   ^^^^^^^^^^^^^^^^
Input_0:113: ERROR - "arguments.callee" cannot be used in strict mode
				arguments.callee.caller &&
				^^^^^^^^^^^^^^^^
Input_0:114: ERROR - "arguments.callee" cannot be used in strict mode
				arguments.callee.caller.toString().indexOf('isPropagationStopped') !== -1){	//jquery mark
				^^^^^^^^^^^^^^^^
Input_0:122: ERROR - "arguments.callee" cannot be used in strict mode
			if(arguments.callee &&
			   ^^^^^^^^^^^^^^^^
Input_0:123: ERROR - "arguments.callee" cannot be used in strict mode
				arguments.callee.caller &&
				^^^^^^^^^^^^^^^^
Input_0:124: ERROR - "arguments.callee" cannot be used in strict mode
				arguments.callee.caller.toString().indexOf('isPropagationStopped') !== -1){	//jquery mark
				^^^^^^^^^^^^^^^^
Input_0:132: ERROR - "arguments.callee" cannot be used in strict mode
			if(arguments.callee &&
			   ^^^^^^^^^^^^^^^^
Input_0:133: ERROR - "arguments.callee" cannot be used in strict mode
				arguments.callee.caller &&
				^^^^^^^^^^^^^^^^
Input_0:134: ERROR - "arguments.callee" cannot be used in strict mode
				arguments.callee.caller.toString().indexOf('isPropagationStopped') !== -1){	//jquery mark
				^^^^^^^^^^^^^^^^

It's coming from /plugins/system/t3/base-bs3/js/script.js.

The page with this output is the only one where an iframe is embedded.
Could it be that the scripts interfere? But how?

My workaround for now is to comment out those lines.
I added console.logs but they don't appear in the dev tools.
So I asume it's okay for now!?

@schipa
Copy link
Author

schipa commented Jul 21, 2017

When the lines are not commented out, the error message is not in the js console but the whole page (source code) is just the error.

For production I'll keep them commented out for now.
I'll try to setup a testing environment.

@schipa
Copy link
Author

schipa commented Jul 21, 2017

http://t3-test.fpgclz.de/ - it's a "T3 Quickstart for Joomla 3.7.3" installation

I found the trigger for said error:

  1. edit template style (e.g. "t3_bs3_blank - Home" is used for home page)
  2. go to tab "General"
  3. under "Optimization" turn "Optimize JS" on
  4. as "JS Compress Tool" choose "Closure Compiler"
  5. "Save" and watch error

On my production site, I have the same setting turned on. Strange that the error only happend on a single page.

EDIT:
Indeed Google Closure Compiler produces this error message while checking strict mode (https://github.com/google/closure-compiler/blob/master/src/com/google/javascript/jscomp/StrictModeCheck.java#L63)

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

2 participants
@schipa and others