Actually the issue you have is because of the change made in
http://jira.xwiki.org/browse/XWIKI-11094 which removed jquery from
/xwiki/resources/js/amd/jquery. This might actually be seen as an
important API breackage.

On Thu, Jun 4, 2015 at 4:17 PM, Jeremie BOUSQUET
<jeremie.bousq...@gmail.com> wrote:
> 2015-06-04 11:34 GMT+02:00 Marius Dumitru Florea <
> mariusdumitru.flo...@xwiki.com>:
>
>> On Wed, Jun 3, 2015 at 1:05 PM, Jeremie BOUSQUET
>> <jeremie.bousq...@gmail.com> wrote:
>> > Hello dear xwiki-ers,
>> >
>> > (long time no see ;) )
>> >
>> > I installed the Mocca Calendar application [1] in my xwiki 5.4.7
>> instance,
>> > but when browsing to its home page, needed js file can't be loaded and so
>> > not much appears ...
>> >
>> > Error from FF console:
>> >
>> > GET http://r-wikiggs.gemalto.com/fullcalendar.js [HTTP/1.1 404 Not Found
>> > 9ms]
>> > Error: Script error for: fullcalendar
>> > http://requirejs.org/docs/errors.html#scripterror
>> >
>> > I understand that it probably comes from MoccaCalendar.Macro js
>> extension:
>> >
>> > require(['jquery', 'fullcalendar'], function(jQuery, fullCalendar) {
>> >
>> > ... but my knowledge of requireJS is more than poor so I'm not sure how
>> to
>> > fix this ... For sure URL used to reach fullcalendar.js is NOK.
>>
>> I'm not familiar with the Mocca Calendar application, but from the 404
>> URL you get in the Firefox console it seems you're missing the
>> Require.js configuration that specifies where the 'fullcalendar'
>> module is located. Require.js attempts to load the module from the
>> root of your webapp as a fallback and fails. See
>> http://requirejs.org/docs/api.html#config-paths .
>>
>
> Thanks Marius,
>
> I checked from page source and there is:
>
> require.config({
>   baseUrl: '/',
>     paths: { 'jquery': "/xwiki/resources/js/amd/jquery" },
>   map: {
>     '*': { 'jquery': 'jQueryNoConflict' },
>     'jQueryNoConflict': { 'jquery': 'jquery' }
>   }
> });
>
> I suppose this is a basic configuration of xwiki, I'm not sure where
> require conf can be altered ... (from velocity templates ?)
> Anyway, as I did not find fullcalendar.js, what I did is:
> - download fullcalendar-2.3.1.zip and unzip it to
> $TOMCAT_HOME/webapps/xwiki/resources/js/fullcalendar/
> - change js extension in MoccaCalendar.Macro with: "require(['jquery',
> '/xwiki/resources/js/fullcalendar/fullcalendar.js'], function(jQuery,
> fullCalendar) {"
>
> A calendar is now displayed (sometimes), but seems to be missing
> stylesheets completely, so it's not really usable ...
> I feel there must be something easier to do ;)
>
> BR,
> Jeremie
>
>
>> Hope this helps,
>> Marius
>>
>> >
>> > Thanks,
>> > BR,
>> > Jeremie
>> > _______________________________________________
>> > users mailing list
>> > users@xwiki.org
>> > http://lists.xwiki.org/mailman/listinfo/users
>> _______________________________________________
>> users mailing list
>> users@xwiki.org
>> http://lists.xwiki.org/mailman/listinfo/users
>>
> _______________________________________________
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users



-- 
Thomas Mortagne
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to