[xwiki-users] (no subject)

2016-12-21 Thread Ekku Laukkarinen
Hello,

I recently loaded ~3000 pages into my XWiki (8.2.1) instance. And noticed a
enormous increase in loading times of DocumentTree in my custom navigation
panel, which shows the pages under first level of space hierarchy:

#set( $root = $doc.getDocumentReference().getSpaceReferences().get(0).
toString().replaceAll('([~"])', '~$1').replace("Space ", "document:") +
".WebHome")
{{documentTree showTranslations="false" root="$root" showRoot="true"
showAttachments="false" /}}

Before loading the pages each request took around ~600ms. After adding the
pages load time was around 15 seconds. After bit of googling I found the
JIRA issue:
http://jira.xwiki.org/browse/XWIKI-13700


And decided to upgrade to 8.4.3. However, the issue did not get fixed and
there was no change in load times. Turning on debug prints for hibernate
resulted in the following:

2016-12-21 16:07:36,479 [http://192.168.42.174/xwiki/
bin/get/XWiki/DocumentTree?outputSyntax=plain=
document%3Axwiki%3A2987218.WebHome=false=true&
showTranslations=false=document%3Axwiki%3A2987218.
WebHome=true=children=%23] DEBUG o.h.i.SessionImpl
  - opened session at timestamp: 14823292564

2016-12-21 16:07:36,479 [http://192.168.42.174/xwiki/
bin/get/XWiki/DocumentTree?outputSyntax=plain=
document%3Axwiki%3A2987218.WebHome=false=true&
showTranslations=false=document%3Axwiki%3A2987218.
WebHome=true=children=%23] DEBUG o.h.t.JDBCTransaction
  - begin

2016-12-21 16:07:36,479 [http://192.168.42.174/xwiki/
bin/get/XWiki/DocumentTree?outputSyntax=plain=
document%3Axwiki%3A2987218.WebHome=false=true&
showTranslations=false=document%3Axwiki%3A2987218.
WebHome=true=children=%23] DEBUG o.h.j.ConnectionManager
  - opening JDBC connection

2016-12-21 16:07:36,479 [http://192.168.42.174/xwiki/
bin/get/XWiki/DocumentTree?outputSyntax=plain=
document%3Axwiki%3A2987218.WebHome=false=true&
showTranslations=false=document%3Axwiki%3A2987218.
WebHome=true=children=%23] DEBUG o.h.t.JDBCTransaction
  - current autocommit status: false

2016-12-21 16:07:36,479 [http://192.168.42.174/xwiki/
bin/get/XWiki/DocumentTree?outputSyntax=plain=
document%3Axwiki%3A2987218.WebHome=false=true&
showTranslations=false=document%3Axwiki%3A2987218.
WebHome=true=children=%23] INFO  o.h.d.Dialect
  - Using dialect: org.hibernate.dialect.HSQLDialect

2016-12-21 16:07:36,480 [http://192.168.42.174/xwiki/
bin/get/XWiki/DocumentTree?outputSyntax=plain=
document%3Axwiki%3A2987218.WebHome=false=true&
showTranslations=false=document%3Axwiki%3A2987218.
WebHome=true=children=%23] DEBUG o.h.l.Loader
  - loading entity: [com.xpn.xwiki.doc.XWikiDocument#-
4652072126019899209]

2016-12-21 16:07:36,480 [http://192.168.42.174/xwiki/
bin/get/XWiki/DocumentTree?outputSyntax=plain=
document%3Axwiki%3A2987218.WebHome=false=true&
showTranslations=false=document%3Axwiki%3A2987218.
WebHome=true=children=%23] DEBUG o.h.j.AbstractBatcher
  - about to open PreparedStatement (open PreparedStatements: 0,
globally: 0)

2016-12-21 16:07:36,480 [http://192.168.42.174/xwiki/
bin/get/XWiki/DocumentTree?outputSyntax=plain=
document%3Axwiki%3A2987218.WebHome=false=true&
showTranslations=false=document%3Axwiki%3A2987218.
WebHome=true=children=%23] DEBUG o.h.SQL
  - select xwikidocum0_.XWD_ID as XWD1_0_0_, xwikidocum0_.XWD_FULLNAME
as XWD2_0_0_, xwikidocum0_.XWD_NAME as XWD3_0_0_, xwikidocum0_.XWD_TITLE as
XWD4_0_0_, xwikidocum0_.XWD_LANGUAGE as XWD5_0_0_,
xwikidocum0_.XWD_DEFAULT_LANGUAGE
as XWD6_0_0_, xwikidocum0_.XWD_TRANSLATION as XWD7_0_0_,
xwikidocum0_.XWD_DATE as XWD8_0_0_, xwikidocum0_.XWD_CONTENT_UPDATE_DATE as
XWD9_0_0_, xwikidocum0_.XWD_CREATION_DATE as XWD10_0_0_,
xwikidocum0_.XWD_AUTHOR as XWD11_0_0_, xwikidocum0_.XWD_CONTENT_AUTHOR as
XWD12_0_0_, xwikidocum0_.XWD_CREATOR as XWD13_0_0_, xwikidocum0_.XWD_WEB as
XWD14_0_0_, xwikidocum0_.XWD_CONTENT as XWD15_0_0_,
xwikidocum0_.XWD_VERSION as XWD16_0_0_, xwikidocum0_.XWD_CUSTOM_CLASS as
XWD17_0_0_, xwikidocum0_.XWD_PARENT as XWD18_0_0_,
xwikidocum0_.XWD_CLASS_XML as XWD19_0_0_, xwikidocum0_.XWD_ELEMENTS as
XWD20_0_0_, xwikidocum0_.XWD_DEFAULT_TEMPLATE as XWD21_0_0_,
xwikidocum0_.XWD_VALIDATION_SCRIPT as XWD22_0_0_, xwikidocum0_.XWD_COMMENT
as XWD23_0_0_, xwikidocum0_.XWD_MINOREDIT as XWD24_0_0_,
xwikidocum0_.XWD_SYNTAX_ID as XWD25_0_0_, xwikidocum0_.XWD_HIDDEN as
XWD26_0_0_ from xwikidoc xwikidocum0_ where xwikidocum0_.XWD_ID=?

2016-12-21 16:07:36,480 [http://192.168.42.174/xwiki/
bin/get/XWiki/DocumentTree?outputSyntax=plain=
document%3Axwiki%3A2987218.WebHome=false=true&
showTranslations=false=document%3Axwiki%3A2987218.
WebHome=true=children=%23] DEBUG o.h.j.AbstractBatcher
  - about to open ResultSet (open ResultSets: 0, globally: 0)

2016-12-21 16:07:36,480 [http://192.168.42.174/xwiki/
bin/get/XWiki/DocumentTree?outputSyntax=plain=
document%3Axwiki%3A2987218.WebHome=false=true&
showTranslations=false=document%3Axwiki%3A2987218.
WebHome=true=children=%23] DEBUG o.h.j.AbstractBatcher
  - 

Re: [xwiki-users] How to get top level page node in documentTree?

2016-12-21 Thread Marius Dumitru Florea
On Wed, Dec 21, 2016 at 5:37 PM, matmassa  wrote:

> As you suggested I created a copy of the navigation panel to work on.
>
> My xwiki pages are structured as follows:
> https://url/xwiki/bin/view/Projects/FOO/
> https://url/xwiki/bin/view/Projects/FOO2/
> [...]
>
> Inside "Projects" there are several "main" pages for each project (FOO is
> an
> example of the main page of a project).
> FOO page has a tree structure as you correctly wrote:
> FOO.A.WebHome
> FOO.A.B.WebHome
> FOO.X.Y.Z.WebHome
>
> I thought there were be something similar to manage the new pages logic (an
> easier way to navigate nested pages).
> Your suggestion about creating a new document reference using document
> reference works well, I "played" with substrings:
>
> #set ($index = $openTo.indexOf('xwiki:') +6)
> #set ($index2 = $openTo.indexOf('.',16))
> #set ($subb = $openTo.substring($index,$index2))
> #set ($resultpage= $subb.concat('.WebHome'))
>
>

> Is there a better way to gain this result?
>

Yes.

$services.model.resolveDocument('', 'default', $
doc.documentReference.spaceReferences.get(1))

assuming there are always at least 2 level of space references ("Projects"
and the project itself), but you can do some checks to be safe.

Hope this helps,
Marius


>
> Thank you again,
> -Matteo
>
>
>
>
>
>
> --
> View this message in context: http://xwiki.475771.n2.nabble.
> com/How-to-get-top-level-page-node-in-documentTree-tp7602158p7602176.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
>


Re: [xwiki-users] How to get top level page node in documentTree?

2016-12-21 Thread matmassa
As you suggested I created a copy of the navigation panel to work on.

My xwiki pages are structured as follows: 
https://url/xwiki/bin/view/Projects/FOO/
https://url/xwiki/bin/view/Projects/FOO2/
[...]

Inside "Projects" there are several "main" pages for each project (FOO is an
example of the main page of a project). 
FOO page has a tree structure as you correctly wrote:
FOO.A.WebHome
FOO.A.B.WebHome
FOO.X.Y.Z.WebHome 

I thought there were be something similar to manage the new pages logic (an
easier way to navigate nested pages).
Your suggestion about creating a new document reference using document
reference works well, I "played" with substrings:

#set ($index = $openTo.indexOf('xwiki:') +6) 
#set ($index2 = $openTo.indexOf('.',16))  
#set ($subb = $openTo.substring($index,$index2))  
#set ($resultpage= $subb.concat('.WebHome'))

Is there a better way to gain this result?

Thank you again,
-Matteo






--
View this message in context: 
http://xwiki.475771.n2.nabble.com/How-to-get-top-level-page-node-in-documentTree-tp7602158p7602176.html
Sent from the XWiki- Users mailing list archive at Nabble.com.


Re: [xwiki-users] MyWiki.org: search is broken

2016-12-21 Thread xrichard
Hi Thomas,

Thanks for your quick answers.

The concerned Wiki with Solr broken search is: http://tutos.myxwiki.org

Note: besides the above pb, other rights issues are frequent on myxwiki
- each time after upgrade => pb with PR on search
- default guest access (Read on page) => not always taken into account

Best regards,


Le 21/12/2016 à 10:30, Thomas Mortagne [via XWiki] a écrit :
> Solr works well on myxwiki.org in general.
>
> It's possible the author of the search page on your wiki does not have
> PR in which case it need to be fixed by a myxwiki.org farm admin but I
> would need to know which wiki we are talking about.
>
> On Wed, Dec 21, 2016 at 8:18 AM, xrichard <[hidden email] 
> > wrote:
>
> > Hi,
> >
> >
> > Thanks Thomas ... DB search is working again.
> >
> >
> > Note: DB search is the only search type working on myxwikiorg
> >
> > - Lucene: returns error
> >
> > - Solr: misses some results.
> >
> >
> > Best regards,
> >
> >
> > Le 20/12/2016 à 23:52, Thomas Mortagne [via XWiki] a écrit :
> >> Better ?
> >>
> >> The cause looks like http://jira.xwiki.org/browse/XWIKI-13717, we
> >> really need to upgrade myxwiki.org...
> >>
> >> On Tue, Dec 20, 2016 at 11:36 PM, xrichard <[hidden email]
> >> > wrote:
> >>
> >> > Hi,
> >> >
> >> > Search results on wikis hosted on xxx.myxwiki.org returns:
> >> > "Failed to execute the [velocity] macro. Cause: [The execution of the
> >> > [velocity] script macro is not allowed. Check the rights of its last 
> >> > author
> >> > or the parameters if it's rendered from another script.]."
> >> >
> >> > Thanks for your help, best regards,
> >> >
> >> >
> >> >
> >> > --
> >> > View this message in context:
> >> http://xwiki.475771.n2.nabble.com/MyWiki-org-search-is-broken-tp7602163.html
> >> > Sent from the XWiki- Users mailing list archive at Nabble.com.
> >>
> >>
> >>
> >> --
> >> Thomas Mortagne
> >>
> >>
> >> 
> 
> >> If you reply to this email, your message will be added to the discussion 
> below:
> >> 
> http://xwiki.475771.n2.nabble.com/MyXWiki-org-search-is-broken-tp7602163p7602164.html
> >>
> >> To unsubscribe from MyXWiki.org: search is broken, click here
> >> <
> >> NAML
> >> 
> 
>  
>
> >>
> >
> >
> >
> >
> >
> > --
> > View this message in context: 
> http://xwiki.475771.n2.nabble.com/MyXWiki-org-search-is-broken-tp7602163p7602165.html
> > Sent from the XWiki- Users mailing list archive at Nabble.com.
>
>
>
> -- 
> Thomas Mortagne
>
>
> 
> If you reply to this email, your message will be added to the discussion 
> below:
> http://xwiki.475771.n2.nabble.com/MyXWiki-org-search-is-broken-tp7602163p7602167.html
>  
>
> To unsubscribe from MyXWiki.org: search is broken, click here 
> .
> NAML 
> 
>  
>





--
View this message in context: 
http://xwiki.475771.n2.nabble.com/MyXWiki-org-search-is-broken-tp7602163p7602175.html
Sent from the XWiki- Users mailing list archive at Nabble.com.


Re: [xwiki-users] How to get top level page node in documentTree?

2016-12-21 Thread Marius Dumitru Florea
On Tue, Dec 20, 2016 at 3:47 PM, matmassa  wrote:

> Hi,
>
>

> I modified the Navigation panel menu in order to have a structured tree
> menu
>

I would rather create a new panel, because otherwise you may have to
resolve merge conflicts when upgrading XWiki (if the default Navigation
panel changes in any way).


> that always shows FOO page root and the opened path to reach the current
> node (FOO project has nested pages).
>
> {{velocity}}
> #panelheader("FOO MENU")
> ## Escape special characters in macro parameter values.
> #set ($openTo = $services.model.serialize($doc.documentReference,
> 'default').replaceAll('([~"])', '~$1'))
> {{documentTree showTranslations="false" showAttachments="false"
> compact="true" showRoot="true" openTo="document:$openTo"
> root="document:xwiki:FOO.WebHome" /}}
> #panelfooter()
> {{/velocity}}
>
>

> Considering all my projects are inside Main\projects page, is there a way
> to
>

This part "inside Main\projects page" is not clear. Can you give an example
of a project reference / URL?


> find dinamically the toplevel page node without having to specify the root
> page name (FOO.WebHome)?
>

All pages that are nested inside FOO have "FOO" as part of their reference:

FOO.A.WebHome
FOO.A.B.WebHome
FOO.X.Y.Z.WebHome

You have the reference of the current document, $doc.documentReference. I
guess you need to find the top level parent of the current document. You
need to use the entity reference API in this case. See
http://extensions.xwiki.org/xwiki/bin/view/Extension/Model+Module

Hope this helps,
Marius


>
> Thanks for reply
> -Matteo
>
>
>
>
>
>
>
> --
> View this message in context: http://xwiki.475771.n2.nabble.
> com/How-to-get-top-level-page-node-in-documentTree-tp7602158.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
>


Re: [xwiki-users] Version comment too long to view

2016-12-21 Thread Thomas Mortagne
On Wed, Dec 21, 2016 at 10:28 AM, Gerritjan Koekkoek
 wrote:
> We have editors that modified wiki pages and used the comment option that 
> goes with a version.
>
>
> But when viewing version history we see some comments ending with."..."
>
> This suggests that the rest of the comment is in the database, but not 
> viewable by the version history table

The history displayer does not seems to cut the revision comment but I
don't know it very well.

>
>
> Is there a way to view the full comment made with a version
>

> Is there a maximum text size for version comments

On database side the maximum size (by default) is 1023 characters.

>
>
> Gerritjan Koekkoek
> Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS
> Visit our website
> Facebook
> email
>
>
>



-- 
Thomas Mortagne


Re: [xwiki-users] MyWiki.org: search is broken

2016-12-21 Thread Thomas Mortagne
Solr works well on myxwiki.org in general.

It's possible the author of the search page on your wiki does not have
PR in which case it need to be fixed by a myxwiki.org farm admin but I
would need to know which wiki we are talking about.

On Wed, Dec 21, 2016 at 8:18 AM, xrichard  wrote:
> Hi,
>
>
> Thanks Thomas ... DB search is working again.
>
>
> Note: DB search is the only search type working on myxwikiorg
>
> - Lucene: returns error
>
> - Solr: misses some results.
>
>
> Best regards,
>
>
> Le 20/12/2016 à 23:52, Thomas Mortagne [via XWiki] a écrit :
>> Better ?
>>
>> The cause looks like http://jira.xwiki.org/browse/XWIKI-13717, we
>> really need to upgrade myxwiki.org...
>>
>> On Tue, Dec 20, 2016 at 11:36 PM, xrichard <[hidden email]
>> > wrote:
>>
>> > Hi,
>> >
>> > Search results on wikis hosted on xxx.myxwiki.org returns:
>> > "Failed to execute the [velocity] macro. Cause: [The execution of the
>> > [velocity] script macro is not allowed. Check the rights of its last author
>> > or the parameters if it's rendered from another script.]."
>> >
>> > Thanks for your help, best regards,
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> http://xwiki.475771.n2.nabble.com/MyWiki-org-search-is-broken-tp7602163.html
>> > Sent from the XWiki- Users mailing list archive at Nabble.com.
>>
>>
>>
>> --
>> Thomas Mortagne
>>
>>
>> 
>> If you reply to this email, your message will be added to the discussion 
>> below:
>> http://xwiki.475771.n2.nabble.com/MyXWiki-org-search-is-broken-tp7602163p7602164.html
>>
>> To unsubscribe from MyXWiki.org: search is broken, click here
>> .
>> NAML
>> 
>>
>
>
>
>
>
> --
> View this message in context: 
> http://xwiki.475771.n2.nabble.com/MyXWiki-org-search-is-broken-tp7602163p7602165.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.



-- 
Thomas Mortagne


[xwiki-users] Version comment too long to view

2016-12-21 Thread Gerritjan Koekkoek
We have editors that modified wiki pages and used the comment option that goes 
with a version.


But when viewing version history we see some comments ending with."..."

This suggests that the rest of the comment is in the database, but not viewable 
by the version history table


Is there a way to view the full comment made with a version

Is there a maximum text size for version comments


Gerritjan Koekkoek
Vader van Rai Koekkoek (cdls) en voorzitter vereniging CdLS
Visit our website
Facebook
email