On Thu, Nov 5, 2009 at 21:09, Vincent Massol <vincent(a)massol.net> wrote:
>
> On Nov 5, 2009, at 7:14 PM, tmortagne (SVN) wrote:
>
>> Author: tmortagne
>> Date: 2009-11-05 19:14:43 +0100 (Thu, 05 Nov 2009)
>> New Revision: 24882
>>
>> Added:
>> Â platform/core/trunk/xwiki-rendering/xwiki-rendering-tests/src/test/
>> resources/link/links24.test
>> Modified:
>> Â platform/core/trunk/xwiki-rendering/xwiki-rendering-api/src/main/
>> java/org/xwiki/rendering/internal/renderer/xhtml/
>> DefaultXHTMLLinkRenderer.java
>> Â platform/core/trunk/xwiki-rendering/xwiki-rendering-tests/src/test/
>> java/org/xwiki/rendering/SimpleRenderingTests.java
>> Â platform/core/trunk/xwiki-rendering/xwiki-rendering-tests/src/test/
>> java/org/xwiki/rendering/WikiRenderingTests.java
>> Log:
>> XWIKI-4554: NPE occurs when there is no WikiModel implementation
>> registered
>>
>> Modified: platform/core/trunk/xwiki-rendering/xwiki-rendering-api/
>> src/main/java/org/xwiki/rendering/internal/renderer/xhtml/
>> DefaultXHTMLLinkRenderer.java
>> ===================================================================
>> --- platform/core/trunk/xwiki-rendering/xwiki-rendering-api/src/main/
>> java/org/xwiki/rendering/internal/renderer/xhtml/
>> DefaultXHTMLLinkRenderer.java 2009-11-05 17:25:33 UTC (rev 24881)
>> +++ platform/core/trunk/xwiki-rendering/xwiki-rendering-api/src/main/
>> java/org/xwiki/rendering/internal/renderer/xhtml/
>> DefaultXHTMLLinkRenderer.java 2009-11-05 18:14:43 UTC (rev 24882)
>> @@ -157,7 +157,7 @@
>> Â Â Â */
>> Â Â public void beginLink(Link link, boolean isFreeStandingURI,
>> Map<String, String> parameters)
>> Â Â {
>> - Â Â Â Â if (link.isExternalLink()) {
>> + Â Â Â Â if (this.wikiModel == null || link.isExternalLink()) {
>> Â Â Â Â Â Â beginExternalLink(link, isFreeStandingURI, parameters);
>> Â Â Â Â } else {
>> Â Â Â Â Â Â beginInternalLink(link, isFreeStandingURI, parameters);
>> @@ -188,7 +188,7 @@
>> Â Â Â Â if (link.getType() == LinkType.INTERWIKI) {
>> Â Â Â Â Â Â // TODO: Resolve the Interwiki link
>> Â Â Â Â } else {
>> - Â Â Â Â Â Â if ((link.getType() == LinkType.URI) &&
>> link.getReference().startsWith(ATTACH)) {
>> + Â Â Â Â Â Â if (this.wikiModel != null && link.getType() ==
>> LinkType.URI && link.getReference().startsWith(ATTACH)) {
>> Â Â Â Â Â Â Â Â // use the default attachment syntax parser to
>> extract document name and attachment name
>> Â Â Â Â Â Â Â Â Attachment attachment =
>> this
>> .attachmentParser
>> .parse(link.getReference().substring(ATTACH.length()));
>> Â Â Â Â Â Â Â Â aAttributes.put(HREF,
>> this.wikiModel.getAttachmentURL(attachment.getDocumentName(),
>>
>> Modified: platform/core/trunk/xwiki-rendering/xwiki-rendering-tests/
>> src/test/java/org/xwiki/rendering/SimpleRenderingTests.java
>> ===================================================================
>> --- platform/core/trunk/xwiki-rendering/xwiki-rendering-tests/src/
>> test/java/org/xwiki/rendering/SimpleRenderingTests.java    2009-11-05
>> 17:25:33 UTC (rev 24881)
>> +++ platform/core/trunk/xwiki-rendering/xwiki-rendering-tests/src/
>> test/java/org/xwiki/rendering/SimpleRenderingTests.java    2009-11-05
>> 18:14:43 UTC (rev 24882)
>> @@ -210,6 +210,9 @@
>> Â Â Â Â suite.addTestsFromResource("misc/misc7", false);
>> Â Â Â Â suite.addTestsFromResource("encoding/encoding1", false);
>>
>> + Â Â Â Â // Links without WikiModel
>> + Â Â Â Â suite.addTestsFromResource("link/links24", false);
>> +
>> Â Â Â Â return new ComponentManagerTestSetup(suite);
>> Â Â }
>> }
>>
>> Modified: platform/core/trunk/xwiki-rendering/xwiki-rendering-tests/
>> src/test/java/org/xwiki/rendering/WikiRenderingTests.java
>> ===================================================================
>> --- platform/core/trunk/xwiki-rendering/xwiki-rendering-tests/src/
>> test/java/org/xwiki/rendering/WikiRenderingTests.java 2009-11-05
>> 17:25:33 UTC (rev 24881)
>> +++ platform/core/trunk/xwiki-rendering/xwiki-rendering-tests/src/
>> test/java/org/xwiki/rendering/WikiRenderingTests.java 2009-11-05
>> 18:14:43 UTC (rev 24882)
>> @@ -75,8 +75,6 @@
>> Â Â Â Â suite.addTestsFromResource("image/image3", false);
>> Â Â Â Â suite.addTestsFromResource("image/image4", false);
>> Â Â Â Â suite.addTestsFromResource("image/image5", false);
>> -
>> - Â Â Â Â suite.addTestsFromResource("link/links18", false);
>
> I haven't checked the sources but is it normal that this is removed?
> Was it a leftover from before?
Yes
>
> Thanks
> -Vincent
>
> _______________________________________________
> devs mailing list
> devs(a)xwiki.org
> http://lists.xwiki.org/mailman/listinfo/devs
>
--
Thomas Mortagne
Hi Sergiu, all
I see in the XWikiHibernateStore that #countDocuments do distinct
documents by language while #searchDocuments does not.
I would have expect both to have the same behavior, so that we can use
them safely using the same query as input (for example for pagination).
Is there a reason for originally doing "select count(*)" versus select
"count(distinct doc.fullName)" ?
I think in any case we should have this API that does not distinct by
language. Should it replace the current behavior ? or should we add a
new API #countDocuments(String wheresql, boolean distinctFullname,
XWikiContext context) ?
Thanks,
Jerome.
Embed HTML elements pose some problems:
* they are loaded asynchronously and any attempt to access even the
simplest DOM property like nodeType through JavaScript raises an
exception if the object is not fully loaded (closed to
https://bugzilla.mozilla.org/show_bug.cgi?id=331672 ).
* they can't be fully controlled from JavaScript. The specific plugin
that handles each of them decides the display and behavior (e.g.
https://bugzilla.mozilla.org/show_bug.cgi?id=250855 a flash movie might
auto start in edit mode and, unless you want to see a movie while
editing, that's not nice).
* they aren't reloaded after they are detached and reattached to the DOM
tree using JavaScript which means that any DOM manipulation involving
one of the ancestors of a embed node can lead to the disappearance of
the embedded object. Sadly, appendChild, insertBefore and replaceChild
detach the target node before attaching it to the new location. As a
consequence there's no way to move an embed node inside the DOM tree
without detaching it.
So I propose we replace the embed HTML elements with static image
placeholders just after the edited document finishes loading. The
placeholder will have the same size as the embedded object in view mode.
Note, ckeditor already does this. You can check by copying the HTML from
http://jira.xwiki.org/jira/browse/XWIKI-3975 to the source of
http://ckeditor.com/demo .
I'm +1.
Thanks,
Marius
Hi Marius,
Thanks for your fast reply!! You were right, in my lib folder I didn't have
the same files I have in enterprise. I can see that when I did mvn install
in \plugins\skinx\target there is xwiki-plugin-skinx-1.12-SNAPSHOT.jar.
Where is meant to configure that xwiki load
xwiki-plugin-skinx-1.12-SNAPSHOT.jar and the other plugins? Because when I
imported war file in eclipse, xwiki-plugin-skinx-1.12-SNAPSHOT.jar does not
appear in plugins folder.
Now my xwiki.cfg has:
xwiki.plugins=\
com.xpn.xwiki.monitor.api.MonitorPlugin,\
com.xpn.xwiki.plugin.calendar.CalendarPlugin,\
com.xpn.xwiki.plugin.feed.FeedPlugin,\
com.xpn.xwiki.plugin.ldap.LDAPPlugin,\
com.xpn.xwiki.plugin.google.GooglePlugin,\
com.xpn.xwiki.plugin.flickr.FlickrPlugin,\
com.xpn.xwiki.plugin.mail.MailPlugin,\
com.xpn.xwiki.plugin.packaging.PackagePlugin,\
com.xpn.xwiki.plugin.query.QueryPlugin,\
com.xpn.xwiki.plugin.svg.SVGPlugin,\
com.xpn.xwiki.plugin.charts.ChartingPlugin,\
com.xpn.xwiki.plugin.fileupload.FileUploadPlugin,\
com.xpn.xwiki.plugin.image.ImagePlugin,\
com.xpn.xwiki.plugin.captcha.CaptchaPlugin,\
com.xpn.xwiki.plugin.userdirectory.UserDirectoryPlugin,\
com.xpn.xwiki.plugin.usertools.XWikiUserManagementToolsImpl,\
com.xpn.xwiki.plugin.zipexplorer.ZipExplorerPlugin,\
com.xpn.xwiki.plugin.autotag.AutoTagPlugin,\
com.xpn.xwiki.plugin.lucene.LucenePlugin,\
com.xpn.xwiki.plugin.diff.DiffPlugin,\
com.xpn.xwiki.plugin.rightsmanager.RightsManagerPlugin,\
com.xpn.xwiki.plugin.skinx.JsSkinExtensionPlugin,\
com.xpn.xwiki.plugin.skinx.JsSkinFileExtensionPlugin,\
com.xpn.xwiki.plugin.skinx.CssSkinExtensionPlugin,\
com.xpn.xwiki.plugin.skinx.CssSkinFileExtensionPlugin
And in \WebContent\WEB-INF\lib I have xwiki-plugin-skinx-1.12-SNAPSHOT.jar
but it occurs the same :(.
Thanks!!
Hi Luis,
Luis Ruiz wrote:
> Hello,
>
> I have compiled xwiki-web-standard-2.1-
SNAPSHOT + Oracle 10G but when I run
> it, everything it's ok but I can see things like this in every page:
>
> $xwiki.jsfx.use('js/scriptaculous/effects.js', true)
> $xwiki.jsfx.use('js/xwiki/widgets/modalPopup.js', true)
> $xwiki.ssfx.use('js/xwiki/widgets/modalPopup.css', true)
> $xwiki.jsfx.use('js/xwiki/widgets/jumpToPage.js', true)
> $xwiki.ssfx.use('js/xwiki/widgets/jumpToPage.css', true)
> $xwiki.jsfx.use('uicomponents/widgets/confirmationBox.js', true)
> $xwiki.ssfx.use('uicomponents/widgets/confirmationBox.css', true)
> $xwiki.jsfx.use('uicomponents/widgets/confirmedAjaxRequest.js', true)
> $xwiki.jsfx.use('uicomponents/widgets/notification.js', true)
> $xwiki.ssfx.use('uicomponents/widgets/notification.css', true)
>
> $xwiki.jsfx.use('js/xwiki/viewers/attachments.js', {'forceSkinAction':
true,
> 'language':
> ${context.language}})$xwiki.ssfx.use('js/xwiki/viewers/attachments.css',
> true
>
>
> I haven't imported an .xar yet. I even tested with a correct xwiki.cfg
from
> an enterprise windows installation but it continues doing the same. I have
> googled and I have read that I must include jsfx and ssfx plugins, but
> where?
In xwiki.cfg, there is a xwiki.plugins property whose value should contain:
com.xpn.xwiki.plugin.skinx.JsSkinExtensionPlugin,\
com.xpn.xwiki.plugin.skinx.JsSkinFileExtensionPlugin,\
com.xpn.xwiki.plugin.skinx.CssSkinExtensionPlugin,\
com.xpn.xwiki.plugin.skinx.CssSkinFileExtensionPlugin,\
Also, can you confirm you have the xwiki-plugin-skinx jar in your
WEB-INF/lib directory?
Hope this helps,
Marius
Hello all,
We need to be able to expose APIs to scripting languages. Following the
idea initially expressed by Vincent in this thread
http://lists.xwiki.org/pipermail/devs/2009-August/013934.html, I would
like to propose the following :
- We add a org.xwiki.script.ScriptService component role, which is an
empty tag interface that services class implements
- A org.xwiki.script.ScriptServiceManager implementation gets all
services injected in a roleHint/service map
- This script service manager gets injected where script bindings are
initialized and is bound "as is" with under "services" name. Currently
in two places : in the XWikiScriptContextInitializer and in the
DefaultVelocityManager (since velocity is treated separetely from JSR223
scripting languages for the moment).
I've uploaded an initial patch on
http://jira.xwiki.org/jira/browse/XWIKI-4551 if you want to give a look.
My +1
Jerome.