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

Incorrect define() signature #3975

Closed
anonymous-matomo-user opened this issue Jun 6, 2013 · 7 comments
Closed

Incorrect define() signature #3975

anonymous-matomo-user opened this issue Jun 6, 2013 · 7 comments
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@anonymous-matomo-user
Copy link

piwik.js

change:

define(["piwik"],[],

to:

define("piwik",[],

The module name should not be wrapped in brackets. It should be passed as a string; not an array.
Keywords: define amd

@robocoder
Copy link
Contributor

In 0858888: fixes #3975

@robocoder
Copy link
Contributor

In 98adc6a: fixes #3975

@anonymous-matomo-user
Copy link
Author

This issue breaks existing websites that use RequireJS when Piwik is loaded async (which it is by default).

Uncaught Error: Mismatched anonymous define() module: 
http://requirejs.org/docs/errors.html#mismatch require.js:160
makeError require.js:160
intakeDefines require.js:1191
(anonymous function)

When piwik.js is evaluated before require.js, this stops loading other modules, instead of giving only an error.

Perhaps it is a good idea to release Piwik 1.12.1 with the provided fix?

@robocoder
Copy link
Contributor

Already committed to the 1.x maintenance branch.

@anonymous-matomo-user
Copy link
Author

bug still present in current 1.12 - had to patch manually

@mattab
Copy link
Member

mattab commented Dec 10, 2013

Can you confirm it works in 2.0 ? https://piwik.org/blog/2013/10/new-piwik-2-0-public-beta-for-testers/

If not please suggest how to fix it, cheers

@anonymous-matomo-user
Copy link
Author

It's fixed. Thanks.

@anonymous-matomo-user anonymous-matomo-user added this to the 2.0 - Piwik 2.0 milestone Jul 8, 2014
sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

3 participants