Details
-
Bug
-
Resolution: Cannot Reproduce
-
Major
-
None
-
7.0.1, 7.1.1
-
None
-
PostgreSQL 9.2, Tomcat 7, Apache 2.4.6
-
Unknown
-
Description
- Deploy XWiki as xwiki webapp in Tomcat (not the ROOT app)
- Install a custom JavaScript, e.g. webapps/xwiki/resources/js/bower_components/my.js
- use your custom js in a wiki page:
{{velocity}} $xwiki.jsfx.use('js/bower_components/my.js') {{/velocity}}
Will produce the following error:
Error: Mismatched anonymous define() module: function (){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){ 'use strict';
- Now deploy XWiki as ROOT app and my.js will work fine, no more errors in this context. However, with XWiki 7.1.1 you will have a lot of other problems now (see
XWIKI-12342)