[xwiki-users] Defining a macro for the confluence syntax

2015-09-17 Thread Paul Libbrecht
Hello XWiki experts,

I'm porting confluence-syntax-pages from a confluence to my shiny new xwiki.
I've made a little tool to grasp the attachments (by hand) and am
copying the page content.
These pages were using two macros that I am try to reprogramme but am
failing thus far.

I succeeded creating the macro with the easy tutorial here
http://platform.xwiki.org/xwiki/bin/view/DevGuide/WikiMacroTutorial,
including content or parameters references in the XWiki 2.1 syntax but
in the confluence syntax I am failing:
- how can I specify macro parameters there?
- confluence macros do not have open and close tags. Does it mean it
cannot have content? If the macro requires content, an error is
displayed constantly that the content is missing.

thanks

Paul



___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Defining a macro for the confluence syntax

2015-09-17 Thread vinc...@massol.net
Hi Paul,


On 17 Sep 2015 at 09:36:30, Paul Libbrecht 
(p...@hoplahup.net(mailto:p...@hoplahup.net)) wrote:

> Hello XWiki experts,
>  
> I'm porting confluence-syntax-pages from a confluence to my shiny new xwiki.
> I've made a little tool to grasp the attachments (by hand) and am
> copying the page content.
> These pages were using two macros that I am try to reprogramme but am
> failing thus far.

BTW do you know that we have a Confluence importer? :)

http://extensions.xwiki.org/xwiki/bin/view/Extension/Filter+Confluence+XML+module#HTutorial

> I succeeded creating the macro with the easy tutorial here
> http://platform.xwiki.org/xwiki/bin/view/DevGuide/WikiMacroTutorial,
> including content or parameters references in the XWiki 2.1 syntax but
> in the confluence syntax I am failing:
> - how can I specify macro parameters there?
> - confluence macros do not have open and close tags. Does it mean it
> cannot have content? If the macro requires content, an error is
> displayed constantly that the content is missing.

If you’re interested in the Confluence grammar: 
https://github.com/xwiki/xwiki-rendering/blob/ae956128c40efd0445e15d531d2bf0a2e1ac34d5/xwiki-rendering-wikimodel/src/main/javacc/ConfluenceWikiScanner.jj

So you can have params for example: {color:red}…{color}

From the grammar file it seems only some macros may be recognized… I don’t know 
why the grammar doesn’t have a generic way to recognize a macro, this should 
probably be improved.

Thanks
-Vincent

> thanks
>  
> Paul
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Defining a macro for the confluence syntax

2015-09-17 Thread vinc...@massol.net
 




On 17 Sep 2015 at 09:53:31, vinc...@massol.net 
(vinc...@massol.net(mailto:vinc...@massol.net)) wrote:

> Hi Paul,
>  
>  
> On 17 Sep 2015 at 09:36:30, Paul Libbrecht 
> (p...@hoplahup.net(mailto:p...@hoplahup.net)) wrote:
>  
> > Hello XWiki experts,
> >
> > I'm porting confluence-syntax-pages from a confluence to my shiny new xwiki.
> > I've made a little tool to grasp the attachments (by hand) and am
> > copying the page content.
> > These pages were using two macros that I am try to reprogramme but am
> > failing thus far.  
>  
> BTW do you know that we have a Confluence importer? :)  
>  
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Filter+Confluence+XML+module#HTutorial
>   
>  
> > I succeeded creating the macro with the easy tutorial here
> > http://platform.xwiki.org/xwiki/bin/view/DevGuide/WikiMacroTutorial,
> > including content or parameters references in the XWiki 2.1 syntax but
> > in the confluence syntax I am failing:
> > - how can I specify macro parameters there?
> > - confluence macros do not have open and close tags. Does it mean it
> > cannot have content? If the macro requires content, an error is
> > displayed constantly that the content is missing.  
>  
> If you’re interested in the Confluence grammar:  
> https://github.com/xwiki/xwiki-rendering/blob/ae956128c40efd0445e15d531d2bf0a2e1ac34d5/xwiki-rendering-wikimodel/src/main/javacc/ConfluenceWikiScanner.jj
>  
> So you can have params for example: {color:red}…{color}  
>  
> From the grammar file it seems only some macros may be recognized… I don’t 
> know why the grammar doesn’t have a generic way to recognize a macro, this 
> should probably be improved. 

Forget that, I misread. The grammar says:

    | <#MACRO_PARAMS: (  | ~["}"]  )* >
    | <#MACRO: "{"   "}” >
    | <#MACRO_CONTENT: (  |  |  | | 
 ) >
    | <#MACRO_BLOCK: "{" 
        ( 
              "color"               // TODO: {color:xx} paragraph {color}
…
         )
         
        "}"
      >

so it should work fine. I also see in ConfluenceWikiScanner.splitMacroParams() 
the code to split the parameters.

I haven’t tried it for real though :)

Now I’d recommend that once you have a page in Confluence syntax inside XWiki, 
you convert it to XWiki Syntax 2.1 and then you won’t have any problem in using 
any wiki macro or the WYSIWYG editor and all features of XWiki in general.

Note: It’s still interesting to me to make macros work well in the confluence 
syntax so if you want to continue on that path I’m happy to help as I can.

Thanks
-Vincent

> Thanks 
> -Vincent
>  
> > thanks
> >
> > Paul
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Fwd: XWiki initialization failed! with xwiki-enterprise-web-7.2 ?

2015-09-17 Thread Clemens Klein-Robbenhaar
Hi *,

> Hi Mohit,
> 
> 
> On 1 Sep 2015 at 15:32:48, Mohit Gupta 
> (motgu...@gmail.com(mailto:motgu...@gmail.com)) wrote:
> 
>> Hi Vincet,
>>  
>> I took the latest war file(xwiki-enterprise-web-7.2-20150828.151901-292.war
>> )
>> from the link
>> http://maven.xwiki.org/snapshots/org/xwiki/enterprise/xwiki-enterprise-web/7.2-SNAPSHOT/
>> but getting exception when i hit the wiki url in browser. Here is the full
>> stack trace
> 
> [snip]
> 
>> java.lang.NullPointerException
>> org.hibernate.hql.ast.HqlSqlWalker.lookupProperty(HqlSqlWalker.java:560)
> 
> Strange, I don’t remember seeing this error before. It looks like an 
> Hibernate bug. 
> 

Has been reported as such, and usually rejected, e.g.:
  https://hibernate.atlassian.net/browse/HHH-3715

I feel that the problem is that the XWQL-Query is not translated to HQL properly

> The query we send is:
> 
> "where doc.object(XWiki.XWikiServerClass).server = :wikiAlias and doc.name 
> like 'XWikiServer%’"
> 

This is a XWQL query, however, and the HQL that is created from it (I guess its 
created from the query, as that is what is shown in the error message):

select doc.fullName from XWikiDocument as doc , BaseObject as _o1 where ( 
doc.object ( XWiki.XWikiServerClass ) . server = :wikiAlias
   and doc.name like 'XWikiServer%' ) and doc.fullName=_o1.name and 
_o1.className='XWiki.XWikiServerClass'

Of course the "( doc.object ( XWiki.XWikiServerClass ) . server" is not proper 
HQL, something must have gone amiss when translating the XWQL to HQL.

What puzzles me is why this has something to do with the Oracle driver (It is 
no general bug for sure, otherwise it would have blocked any development ...)
I just checked and I get basically the same error message when I try to execute 
the generated HQL "manually" (from a groovy script in a page),
but of course no such error when executing the XWQL (would not have been able 
to start the server then).


Is it possible to direct the installation temporarily to e.g. HSQL-DB 
(something along 
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationHSQL )
 - just for testing if the issue goes away then? (It is sure not useful for 
production use that way until switched back to Oracle ...)
If the issue does not go away, then it must be something else ...


> Do you still have the problem?
> 
> Could you provide the exact JDBC driver and Oracle versions you use?
> 
> Thanks
> -Vincent
> 
> [snip]
> 
> ___
> 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


[xwiki-users] XAR

2015-09-17 Thread Peter Huisman
Hi,

Is there a way to generate XAR’s using XWiki’s scheduling function? I’m not 
looking for a DB based backup but merely for a backup of spaces / pages.

With kind regards,

Peter
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Migration away from TikiWiki - Forms based question.

2015-09-17 Thread HadleysHope
Ok so I have been away and run through the FAQ tutorial.  I have to say the
app in minutes is by far the easiest way to do it, I honestly started to
loose the will to live running through the other method, I can see that
xwiki is incredibly incredibly powerful in its flexibility in that way but
am glad there is another way to get things done because the learning curve
would otherwise be too steep for us to consider using xwiki.

Ok, so I have manged to create two new apps one contains states and cities
i.e.

Washington, Tacoma
Washington, Seattle
Texas,Houston
Taxas,Dallas
Kansas,Wichita

And one that references the values stored in the first.  My question is, is
there a way, without coding, that I can select "Washington" in one field and
it only displays the cities in Washington in another field.

With Tiki this is accomplished with something called "Dynamic Lists" where
it looks at a field (linked, remote) to then populate a list based on
another (remote) field.

Thanks again for your help.




--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Migration-away-from-TikiWiki-Forms-based-question-tp7595997p7596044.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] XAR

2015-09-17 Thread Eduard Moraru
Hi Peter,

Of course, though you might want to think a bit on the approach.

1) If you want to do it in XWiki using the scheduler plugin, you have to
write some groovy script [1] in the scheduled task that you create in order
to use the filter module [2] (or the old packager module [3], whichever you
choose) in order to export the pages you are interested in and save the
result (on the filesystem or as an attachment in a page).

As inspiration, you could check out the source code (in java) of the export
action [4] which is exactly what is going on when you are exporting a page
from the UI.

2) A simpler choice, IMO, would be to schedule a cron [5] task on a linux
machine (possible the same one running the XWiki instance) and have that
task simply download (using something like cURL [6]) the result of a
manually crafter export URL (as detailed in our documentation [7])
containing the list of pages to export.

Hope this helps,
Eduard

--
[1] http://platform.xwiki.org/xwiki/bin/view/DevGuide/Scripting
[2] http://extensions.xwiki.org/xwiki/bin/view/Extension/Filter+Module
[3]
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/plugin/packaging/PackageAPI.java
[4]
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/ExportAction.java#L244
[5] https://en.wikipedia.org/wiki/Cron
[6] https://en.wikipedia.org/wiki/CURL
[7] http://platform.xwiki.org/xwiki/bin/view/Features/Exports#HXARExport


On Thu, Sep 17, 2015 at 3:49 PM, Peter Huisman  wrote:

> Hi,
>
> Is there a way to generate XAR’s using XWiki’s scheduling function? I’m
> not looking for a DB based backup but merely for a backup of spaces / pages.
>
> With kind regards,
>
> Peter
> ___
> 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


Re: [xwiki-users] Databasetree seems to be missing

2015-09-17 Thread vinc...@massol.net
Hi,

On 17 Sep 2015 at 19:41:35, HadleysHope 
(justin.scott-ex...@bannerhealth.com(mailto:justin.scott-ex...@bannerhealth.com))
 wrote:

> This post has NOT been accepted by the mailing list yet.

It was accepted, see http://markmail.org/message/4ybqodc7j7bizqvb

Why did you think it wasn’t accepted?

> I can manually add if I edit the class (but then I get a ton of errors) but
> its not in the field pallet (assume it would be in the advanced section
> under Database List).
> Does it need to be added to the pallet? if so how would I go about that?
>  
> Thx
>  
> HH

Not sure what you’re talking about, I’m missing some context.

Thanks
-Vincent

> View this message in context: 
> http://xwiki.475771.n2.nabble.com/Databasetree-seems-to-be-missing-tp7596047.html

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Databasetree seems to be missing

2015-09-17 Thread HadleysHope
Sorry I cut and paste from the rejection message I got! DOH!

So I am trying to do a "app in minutes" and use database tree as a field but
it is not in the field pallet to drag and drop, yet if I edit the class I
can manually add it in but then I get a ton of errors.  What do I need to do
to enable it so it shows up on the field pallet (again, I am assuming under
Database List in the advanced section).

Thanks





--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Databasetree-seems-to-be-missing-tp7596047p7596049.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Databasetree seems to be missing

2015-09-17 Thread HadleysHope
This post has NOT been accepted by the mailing list yet.
I can manually add if I edit the class (but then I get a ton of errors) but
its not in the field pallet (assume it would be in the advanced section
under Database List). 

Does it need to be added to the pallet? if so how would I go about that? 

Thx 

HH



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Databasetree-seems-to-be-missing-tp7596047.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Migration away from TikiWiki - Forms based question.

2015-09-17 Thread HadleysHope
Thomas, do you think I would need to use a HQL query to do this? do you know
of any examples I might look at for querying other fields to perform the
filter? I am entirely unfamiliar with HQL and as of right now struggling not
to just uninstall this and move on.



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Migration-away-from-TikiWiki-Forms-based-question-tp7595997p7596051.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Using LDAP for page access rights with Kerberos auth

2015-09-17 Thread Debajit Adhikary
I have an XWiki setup that uses Kerberos for authentication.

I would like to continue using Kerberos, but use LDAP groups for
controlling page access rights.

How could I do this?

(If you could point me in the right direction, or to any appropriate
documentation, that would be a big help)

Thanks in advance
—Debajit
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users