On 06/13/2012 06:09 PM, Sergiu Dumitriu wrote:
> On 06/13/2012 09:17 AM, Vincent Massol wrote:
>>
>> On Jun 13, 2012, at 2:52 PM, Anca Luca wrote:
>>
>>> On 06/13/2012 02:44 PM, Vincent Massol wrote:
>>>> On Jun 13, 2012, at 2:39 PM, Anca Luca wrote:
>>>>
>>>>> On 06/13/2012 01:52 PM, Raluca Stavro wrote:
>>>>>> Hi,
>>>>>>
>>>>>> On Wed, Jun 13, 2012 at 2:15 PM, Vincent
>>>>>> Massol<vincent(a)massol.net> wrote:
>>>>>>
>>>>>>> On Jun 13, 2012, at 12:44 PM, Raluca Stavro wrote:
>>>>>>>
>>>>>>>> I'm resending this mail by using the right subject pattern.
>>>>>>>>
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> I am trying to upgrade an old XEM to 3.5.1.
>>>>>>>> In this XEM there are some custom panels which have been
>>>>>>>> converted to 2.0
>>>>>>>> syntax and contain code like this:
>>>>>>>>
>>>>>>>> {{velocity}}
>>>>>>>> {{html}}
>>>>>>>> #panelheader("...")
>>>>>>>> ...
>>>>>>>> #panelfooter()
>>>>>>>> {{/html}}
>>>>>>>> {{/velocity}}
>
> Do the panels really need the {{html}} wrapper?
> If no, then you must remove it.
> If yes, then you should consider rewriting them using wiki syntax
> only, then remove the {{html}} wrapper.
> If you can't do that, then just move the wrapper inside the
> panelheader/footer.
>
> You can do that automatically with a script.
>
>>>>>>>> Because since 2.7.2 panel macros were converted to 2.0 syntax,
>>>>>>>> because
>>>>>>>> panel macros from inside macros.vm were modified by calling
>>>>>>>> {{html}} wiki
>>>>>>>> macro and because we can't use nested {{html}} macros without
>>>>>>>> wiki="true"
>>>>>>>> parameter, I don't know how to fix this issue besides modifying
>>>>>>>> panel
>>>>>>> code.
>
> I don't understand this. Are you saying that in macros.vm #panelheader
> uses {{html}}? That's not true, the panelheader/footer macros only use
> wiki syntax, not {{html}}. The problem isn't that nested {{html}}
> macros don't work, but that wiki syntax doesn't work in {{html}}
> without wiki="true".
>
>>>>>>>> This XEM has more than 70 wikis and this I can't just modify
>>>>>>>> all custom
>>>>>>>> (converted to 2.0 syntax) panels manually.
>>>>>>>> Is there a nice solution to this problem ?
>>>>>>> Idea 1:
>>>>>>> ======
>>>>>>>
>>>>>>> Add a new #panelheaderold macro in macros.vm and replace all
>>>>>>> calls of
>>>>>>> #panelheader to #panelheaderold in your panels (easy to do with
>>>>>>> a XWQL
>>>>>>> query and 3 lines of scripts).
>>>>>>>
>>>>>>> Slowy migrate panels to new syntax.
>>>>>>>
>>>>>>> Note:
>>>>>>> =====
>>>>>>>
>>>>>>> Actually in the future we need to add a new {{panel}} macro,
>>>>>>> something
>>>>>>> like:
>>>>>>>
>>>>>>> {{panel style=".." title="…"}}
>>>>>>> … content here …
>>>>>>> {{/panel}}
>>>>>>>
>>>>>>> Idea 2:
>>>>>>> ======
>>>>>>>
>>>>>>> Create a custom Panel wiki macro (give it a name other than
>>>>>>> "panel"!),
>>>>>>> search for:
>>>>>>> {{velocity}}{{html}}#panelheader….#panelfooter{{/html}}{{/velocity}}
>>>>>>> (use
>>>>>>> a regex)
>>>>>>>
>>>>>>> Replace with your panel macro.
>>>>>>>
>>>>>>>> Should I open an issue on Jira ?
>>>>>>> Nope
>>>>> So this means that none of the macros in macros.vm are API?
>>>>> Which means that there is no API to make a panel header consistent
>>>>> with the panel headers of the default panels?
>>>> Good point. Macros in macros.vm are supposed to be APIs and it
>>>> means we broke the backward compatibility at some point in the past
>>>> (2.7 as suggested by Raluca).
>
> The macros still work for both xwiki/1.0 and xwiki/2.x panels. What
> doesn't work is putting the whole panel content inside a {{html}}
> block, without any wiki parsing.
>
> The problem was that there was a misunderstanding of the macros
> behavior. The macros were supposed to work well in wiki syntax.
> Initially, that meant the only xwiki syntax, which did mix HTML with
> the rest of the wiki and velocity syntax. When new wiki syntaxes were
> introduced and the macros were updated, the behavior remained the
> same: the #panelheader/footer macros work well in both xwiki/1.0 and
> xwiki/2.x syntaxes. But pure HTML isn't really a wiki syntax. The fact
> that for a few releases the macros worked in pure HTML embedded in an
> xwiki/2.0 document, but not directly in a xwiki/2.0 document, was a
> bug, not a contract.
> Unfortunately some developers did rely on this bug.
I wouldn't call it a bug, because if we do so, then we can argue that
it's a bug that has been there for at least one major cycle, and that
macros.vm is still not stable according to
http://jira.xwiki.org/browse/XWIKI-6062 so we might still have "bugs"
about it (and that is for about 2.5 major cycles, which is a bit too
much from my point of view).
What I would say about this is that apparently we don't know / have a
convention about how should the macros in macros.vm be used: with syntax
interpreted or not, in an html macro or not. This is where the confusion
comes from: while the old panelheader macro _needed_ html macro
(potentially with syntax activated), the current one needs _only wiki
syntax_ (potentially in an html macro). There is a context which
satisfies both (html macro with wiki syntax activated) but it was not
documented anywhere, I'm not even sure it is _the rule_ for macros in
macros.vm, so people used "what it worked", in this case a plain simple
html macro whose wiki parameter defaults to false.
The wysiwyg macros in macros.vm, for example, I would say they need to
be called in a html macro with syntax switched off, but it's just a
guess, looking at the code.
I think we need to:
1/ make a decision about what is API from macros.vm
2/ make a decision about what _was_ API from macros.vm and keep it
working as it used to
3/ document how an API macro should be used, either by having a rule or
by at least writing in its own documentation in macros.vm what context
it expects (note that even if we document it, if we cannot enforce it,
chances are that people will use "what it works"...)
To me, all these above are unclear and until they are, from how it feels
to me, it's very hard to call something a bug or a backwards
compatibility break.
Thanks,
Anca
>
>>> 3.2 M1
>>> https://github.com/xwiki/xwiki-platform/commit/2e4b54267b9bf4048c14fdf14b6a…
>>> http://jira.xwiki.org/browse/XWIKI-6504
>>> It's interesting that the API Breakage section of the 3.2M1 release
>>> notes says only "[TODO]"
>>> http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWikiEnterpris…
>>> ... :)
>>
>> bad bad…
>>
>> Who was the RM? :)
>>
>> -Vincent
>>
>>> Anca
>>>
>>>>
>>>> We should probably have introduced new macros instead when we
>>>> introduced the conversion to 2.0 syntax.
>>>>
>>>> Now since this is very old we need to decide what we want to do at
>>>> this point.
>>>>
>>>> Thanks
>>>> -Vincent
>>>>
>>>>> Thanks,
>>>>> Anca
>>>>>
>>>>>> So there is no other way to fix this issue but by modifying the
>>>>>> code inside
>>>>>> panels.
>>>>>> Thank you, Vincent.
>>>>>>
>>>>>> Raluca.
>>>>>>
>>>>>>
>>>>>>> Thanks
>>>>>>> -Vincent
>
>
Hello , I want to trun to both columns layout ,but in the panel wizard the save in new layout and revert button can't be pressed down , I mean I click it but nothing happened. I use XWiki 3.5,loggin in with admin user , and I am sure I havn't done any change about this wizard . It's so strange . Do you have any suggestion about this ? Do I need to change the configuration to do this ? Thank you .
Hello,
i try to test a macro in a maven project created using maven archetype. It has .test files and an IntegrationTests class. Where running, it crashed due to nullpointerexception when trying to, probably, find out current user?
Is ther some configuration i am missing?
java.lang.NullPointerException: null
at com.xpn.xwiki.doc.DefaultDocumentAccessBridge.getCurrentUser(DefaultDocumentAccessBridge.java:981) ~[xwiki-platform-oldcore-3.2.jar:na]
at org.xwiki.component.internal.UserComponentManager.getKey(UserComponentManager.java:74) ~[xwiki-platform-component-multi-3.2.jar:na]
at org.xwiki.component.internal.AbstractGenericComponentManager.getComponentManager(AbstractGenericComponentManager.java:72) ~[xwiki-platform-component-multi-3.2.jar:na]
at org.xwiki.component.internal.DelegateComponentManager.lookup(DelegateComponentManager.java:103) ~[xwiki-platform-component-multi-3.2.jar:na]
at org.xwiki.component.internal.DelegateComponentManager.lookup(DelegateComponentManager.java:103) ~[xwiki-platform-component-multi-3.2.jar:na]
at org.xwiki.rendering.internal.macro.DefaultMacroManager.getMacro(DefaultMacroManager.java:132) ~[xwiki-rendering-transformation-macro-3.2.jar:na]
at org.xwiki.rendering.internal.transformation.macro.MacroTransformation.getHighestPriorityMacro(MacroTransformation.java:232) ~[xwiki-rendering-transformation-macro-3.2.jar:na]
at org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transformOnce(MacroTransformation.java:152) ~[xwiki-rendering-transformation-macro-3.2.jar:na]
at org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transform(MacroTransformation.java:141) ~[xwiki-rendering-transformation-macro-3.2.jar:na]
at org.xwiki.rendering.internal.transformation.DefaultTransformationManager.performTransformations(DefaultTransformationManager.java:81) ~[xwiki-rendering-api-3.2.jar:na]
at org.xwiki.rendering.test.integration.RenderingTest.runTestInternal(RenderingTest.java:133) [xwiki-rendering-test-3.2.jar:na]
at org.xwiki.rendering.test.integration.RenderingTest.execute(RenderingTest.java:103) [xwiki-rendering-test-3.2.jar:na]
David Delbecq
Hello,
To customize our entreprise wiki, we have identified a few plugins / macros that we need to develop. I have checked the online xwiki documentation / tutorial, but i find them quite uncomplete, so here i am with my questions :)
1) It is my understanding that, if my macro need some specific javascript (eg jquery.js) and css, i must use xwiki skin extension. While i can find easily how to create xwiki velocity code that use those extension, i found no explanation on how to do this in java from within "public List<Block> execute(T parameters, String content, MacroTransformationContext context)"? Where can i find example of embedding javascript/css inside a java macro jar or xar?
2) Extensions are provided as xar, maven archetype for xwiki java macro generates a .jar. How do i generate a xar with maven so that in one archive i have both my macro, the css and the js?
3) Most extension referenced on xwiki main site are open source, but where are the source? I can only find the compiled xar files on download
4) Is there some recommanded way to pass complex parameters to macros? I need to create some dynamic menu that will get as parameter a list of node + links + icon to show + subnodes + for each subnodes icons / links + subsubnode etc. Is it good practice to just put some kind of json in the body of macro, something like
{{mymenu width="200px"}}
[
{ name: "node1", link: "MySpace.MyPage1", icon: "somelinktoanattachement"} ,
{ name: "node2", link: "MySpace.MyPage2", icon: "somelinktoanattachement"},
{ name: "node3", link: "MySpace.MyPage3", submenu: [
{ name: "node3.1", link: "MySpace.MyPage31", icon: "somelinktoanattachement"},
{ name: "node3.2", link: "MySpace.MyPage32", icon: "somelinktoanattachement"}
]
}
]
{{/mymenu}}
And in this case, are there already some stock xwiki methode to transform json into objet array?
Thank you,
David Delbecq
Hi Devs,
I'd like to start a discussion about a Connector module for XWiki.
XWiki is a great tool to create, edit and organize information. But
while we can use macros to display external data, many XWiki's
organization (such as the livetable), editing and viewing features can
only be used for data stored in the XWiki System.
However from time to time we've seen that it would be really interesting to:
- allow editing/viewing of data from external systems using the XWiki
form system
- using livetable and search on external data
I've been thinking for a while that we can achieve that in XWiki by
transforming data read using an external API into XWiki Documents and
then use the XWiki APIs to display that data. We can also implement
livetable backends that would transform the livetable filters into
query supported by the external tool. And if all this could be
implemented as a "Connector Interface" most of the presentation code
would be generic and we could develop and install connectors and
magically you could make use of the XWiki development system to
display, present and create forms to edit data.
I've made a prototype for Salesforce and JIRA that shows the concept
and what the API could be (in this case in Groovy) and wrote a design
document that explains the system and the open questions:
http://dev.xwiki.org/xwiki/bin/view/Design/ConnectorModule
In my view this system is super powerfull if we can build it in the
XWiki Core so that the view/edit/save/search can be hooked to the
connector so that from the user experience the system is transparent
to the user.
WDYT ? Could the devs provide some insight of what the right
architecture should be for such a feature.
Ludovic
--
Ludovic Dubost
Founder and CEO
Blog: http://blog.ludovic.org/
XWiki: http://www.xwiki.com
Skype: ldubost GTalk: ldubost
Hi,
I'd like to add staging to our official release process.
For milestone releases, I propose the staging cycle be for "0 time" (this may be revisited later).
For RC or finals, we place the release in staging and immediately call a VOTE to publish the release, this gives our testing team (everybody!) 72 hours to raise a potential issue.
Why:
#1. After some chat on IRC I decided that it is advantageous to move toward a faster release cycle and begin moving away from milestone releases in favor of staging. This will set the stage for the release method we will need.
#2. Staging is easy, I've modified the release script to include staging and with the script, it is a simple matter of about 5 clicks on nexus to "login", "close repository", "release repository".
#3. Staging is safe, the RM need not worry about fat fingers breaking the release, all it costs is time.
#4. The release process should be as close to the same as possible for milestone and RC/final releases. This simplifies scripting of the process, decreases the amount the RM must remember and makes every milestone release a rehearsal.
#5. Everybody else is doing it (is that even a reason?!)
Mandatory?
I would rather impress the RM with how easy and helpful staging can be than bind him with rules.
If I had followed the existing process to the letter, I would not have had any experience with staging to begin with.
In the interest of continuous improvement I would like to make this a strong recommendation, not a strict rule.
Here's my +1
Caleb
Hi devs,
The RM for 3.5.1 (Sergiu?) made a mistake while releasing and "forgot" some profiles.
One consequence is that rendering-standalone hasn't been released in version 3.5.1:
- See http://maven.xwiki.org/releases/org/xwiki/rendering/xwiki-rendering-standal… you'll see that 3.5.1 is missing
- Checkout tag 3.5.1 on rendering and view rendering-standalone/pom.xml, you'll see it has <version>3.5-SNAPSHOT</version> has parent version…
As a consequence I cannot push Rendering 3.5.1 on Maven Central.
Can the RM fix this please?
Thanks
-Vincent
XWiki core development team is proud to announce the availability of XWiki Enterprise 4.1 Release Candidate 1
This is the first and hopefully final release candidate of the 4.1 release cycle. Being a release candidate, this release is sparse on new features concentrating instead on stabilization of the features brought in Milestone 1 and Milestone 2. The 4.1 cycle brings new 3D graphs made with pure XWiki syntax, safer Groovy scripting, and new localization through timezone settings.
Go grab it at http://enterprise.xwiki.org/xwiki/bin/view/Main/Download and let us know what you think.
For more information about the 4.1-rc-1 release, See the Release Notes http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWikiEnterpris…
Thanks to everyone who helped out to make this release great.
Caleb
Hello friends,
Thank you for being so patient with me. Here is a set of mockup with
content etc. and further development:
http://sdrv.ms/LLmQ5i
which extends: (http://sdrv.ms/LO70JI)
The goal is to consolidate everything to a section. (breadcrumbs/where you
are & navigation/supplementary info & content)
eg. the page breadcrumb has been added into the global bread crumb (is this
possible?); all page navigation/meta are in the sidebar (such that, again,
the main area is just content, and the sidebar are all additional infos)
The way i'm envisioning the responsive design for the content is like this:
When the screen is big enough, it will become 2 column. as we hit smaller
screen (eg. tablet) it will become one column. Then finally, the page would
collapse such that only the header is visible for mobile (thus also
becoming a table of contents) until being tapped, which will open the div.
As mentioned before, the same "sidebar" will appear when you click the
navigation hint on mobile (so it will be in a way consistent). Though with
this development i should probably add more than navigation (eg. NAVIGATION
/ INFO / ETC. or something).
What are your guys' thoughts, comments, concerns?
Thanks again!
Best,
Jonathan Solichin