Require.js error...

Status
Not open for further replies.
Not sure why I am receiving this error..
I am using Fabrik 3.1b latest from Github and 3.1.5 Joomla site.

I added a form module for a custom register page and the form won't submit.

Here is the error code:

detailed error: Error: Mismatched anonymous define() module: function ($) { var pluses = /\+/g; function raw(s) { return s; } function decoded(s) { return decodeURIComponent(s.replace(pluses, ' ')); } function converted(s) { if (s.indexOf('"') === 0) { // This is a quoted cookie as according to RFC2068, unescape s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\'); } try { return config.json ? JSON.parse(s) : s; } catch(er) {} } var config = $.cookie = function (key, value, options) { // write if (value !== undefined) { options = $.extend({}, config.defaults, options); if (typeof options.expires === 'number') { var days = options.expires, t = options.expires = new Date(); t.setDate(t.getDate() + days); } value = config.json ? JSON.stringify(value) : String(value); return (document.cookie = [ config.raw ? key : encodeURIComponent(key), '=', config.raw ? value : encodeURIComponent(value), options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE options.path ? '; path=' + options.path : '', options.domain ? '; domain=' + options.domain : '', options.secure ? '; secure' : '' ].join('')); } // read var decode = config.raw ? raw : decoded; var cookies = document.cookie.split('; '); var result = key ? undefined : {}; for (var i = 0, l = cookies.length; i < l; i++) { var parts = cookies.split('='); var name = decode(parts.shift()); var cookie = decode(parts.join('=')); if (key && key === name) { result = converted(cookie); break; } if (!key) { result[name] = converted(cookie); } } return result; }; config.defaults = {}; $.removeCookie = function (key, options) { if ($.cookie(key) !== undefined) { // Must not alter options, thus extending a fresh object... $.cookie(key, '', $.extend({}, options, { expires: -1 })); return true; } return false; }; } http://requirejs.org/docs/errors.html#mismatch

var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#' + id);
require.js (line 156)


In My Sites it is afacolony not the norm.

Thanks.
 
I see js errors on all the pages where it can't find jquery. I couldn't see the 'custom registration page' but rather the contact form which presented the same error
I think its something in your custom template which is incorrect, if I set the site to use protostar then there is no error.

On a normal page with your custom Joomla template I am seeing several js errors:

Code:
[LIST=1]
[*]Uncaught TypeError: undefined is not a function [URL='http://afacolony.org/templates/strapped/js/bootstrap.min.js']bootstrap.min.js:6[/URL]
[/LIST]
[LIST=1]
[*]Uncaught TypeError: undefined is not a function [URL='http://afacolony.org/templates/strapped/js/application.js']application.js:7[/URL]
[/LIST]
[LIST=1]
[*]Uncaught ReferenceError: jQuery is not defined
[/LIST]
I suggest you fix those first as they are most likely having a knock on effect on Fabrik's js code
 
Yea.. this was my fault. I decided from this point to create my own templates from "prostar" instead of my old approach.

SO I fixed these issues by doing just that.
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top