Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Incorrect define() signature #3975

Closed
anonymous-piwik-user opened this Issue · 7 comments

3 participants

Anonymous Piwik user Anthon Pang Matthieu Aubry
Anonymous Piwik user

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

Anthon Pang
Collaborator

In 0858888: fixes #3975

Anthon Pang
Collaborator

In 98adc6a: fixes #3975

Anonymous Piwik user

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?

Anthon Pang
Collaborator

Already committed to the 1.x maintenance branch.

Anonymous Piwik user

bug still present in current 1.12 - had to patch manually

Matthieu Aubry
Owner

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 Piwik user

It's fixed. Thanks.

Anonymous Piwik user anonymous-piwik-user added this to the 2.0 - Piwik 2.0 milestone
Philip Taffner sabl0r referenced this issue from a commit in sabl0r/piwik
Anthon Pang robocoder fixes #3975 0858888
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.