Re: [xwiki-users] Immediate Child Document Query

2016-04-11 Thread Personal
Figured it out over the weekend: 

where doc.parent = ‘Parent Full Name’

Guess I was trying to make it more complicated than it actually was.

Regards,

Jesse


> On Apr 8, 2016, at 7:51 AM, Personal  wrote:
> 
> Per the Query Module documentation:
> 
> List of child spaces: select 
> space.name from XWikiSpace as space where space.parent = 'Parent Space’
> List of all nested documents in a space:  where doc.space like 'Space' or 
> doc.space like 'Space.%’
> 
> The first gives me the correct spaces but I want the documents (WebHome) and 
> the second gives me every single document in every space below ‘Space’. How 
> do you query for just the documents in the immediate child spaces? Anything I 
> do to narrow the results seems to give me no results and no error. Thanks for 
> any help.
> 
> Regards,
> 
> Jesse
> ___
> 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] Immediate Child Document Query

2016-04-08 Thread Personal
Per the Query Module documentation:

List of child spaces:   select 
space.name from XWikiSpace as space where space.parent = 'Parent Space’
List of all nested documents in a space:where doc.space like 'Space' or 
doc.space like 'Space.%’

The first gives me the correct spaces but I want the documents (WebHome) and 
the second gives me every single document in every space below ‘Space’. How do 
you query for just the documents in the immediate child spaces? Anything I do 
to narrow the results seems to give me no results and no error. Thanks for any 
help.

Regards,

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


[xwiki-users] Macro Parameter as Array

2016-04-02 Thread Personal
Is it possible to pass an array as a macro parameter? So far my attempts have 
failed.

Macro code:
#set( $a = $xcontext.macro.params.array)
$a

#foreach($i in $a)
  $i
#end


Page code:
#set( $array = ['Chapter 1', 'Chapter 2', 'Chapter 3'])
$array

#foreach($i in $array)
  $i
#end

{{test array=$array/}}


The array processed in the page works as expected. The array passed to the 
macro only prints up to the first space between Chapter and 1. I have also 
tried to enter the array as a string which passes the string but the macro does 
not treat it as an array, which doesn’t surprise me. The comments from Stefan 
and Vincent on 
http://platform.xwiki.org/xwiki/bin/view/DevGuide/WikiMacroTutorial seem to 
touch on this issue but I do not understand the answer provided. Thank you for 
any clarification to this issue you can provide.

Regards,

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


Re: [xwiki-users] Image Reference Shortcut

2016-03-30 Thread Personal
Thanks for the information. I think i might turn off icon transformation, I 
didn’t realize that was an option.
After further investigation my issue with escaping appears to be related to 
using CKEditor. When I use the WYSIWYG or WIKI editor it seems to work every 
time but the CKEditor gave mixed results when I tested using version 1.3. After 
updating to version 1.4 I am having trouble reasonably reproducing the error. 
Thanks again for your help!

Regards,

Jesse Bright

> On Mar 30, 2016, at 9:14 AM, Vincent Massol  wrote:
> 
> Hi Jesse,
> 
>> On 30 Mar 2016, at 18:03, Jesse Bright  wrote:
>> 
>> I have pages which include the text: (i)
>> The Xwiki syntax is converting this into: image:icon:information
>> 
>> I have tried the following in an attempt to escape this text:
>> ~(i~) which is completely ignored. 
> 
> Yes this is ignored because transformations happen after the content is 
> parsed and converted into an AST (we call it an XDOM). Then the icon 
> transformation runs and it’ll find a SpecialSymbolBlock (the “(“), followed 
> by a WordBlock (the “i”), followed by a SpecialSymbolBlock (the “)“) and 
> it’ll transform it into an image.
> 
>> {{{(i)}}} which leaves only a blank space
> 
> This is the solution and it works fine for me.
> 
>> Any suggestions on how I can get the desired plain text? Thanks for your 
>> time. 
> 
> Only other options I know are to:
> * turn off the icon transformation
> * configure the icon transformation to not transform (i)
> 
> Thanks
> -Vincent
> 
>> Regards,
>> 
>> Jesse
> 
> ___
> 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] Set Parent in XWiki 8.0

2016-03-25 Thread Personal
Thank you Matthias! I know it wasn’t intentional but I am working on a similar 
issue and your code example was extremely useful.

Regards,

Jesse Bright

> On Mar 25, 2016, at 3:10 PM, Matthias Wegner  wrote:
> 
> Hi Vincent,
> 
> thanks, now it is clear and works. But i used a query like
> 
> #set($hql = "where doc.parent='Book.WebHome' and not 
> doc.name='WebPreferences' order by doc.title asc")
> #set($chapters = $xwiki.searchDocuments($hql, 0, 0))
> 
> to get all Documents in den Space "Book" (old model). It shows all 
> documents, even the nested ones. How can i query recursively starting 
> with the parent document "Book.WebHome"?
> 
> Regards,
> Matthias
> 
> 
> 
> Am 25.03.2016 um 14:17 schrieb vmassol [via XWiki]:
>> Hi Matthias,
>> i used a query like
>>> On 25 Mar 2016, at 13:21, Matthias Wegner <[hidden email] 
>> > wrote:
>>> 
>>> Hi Users,
>>> 
>>> i added over 500 Pages to the new XWiki and now want to sort it in 
>> depth.
>>> But i cant find the "Change Parent" Symbol in Edit-Mode. Where can i 
>> change
>>> the Parent of a Page?
>> 
>> See 
>> http://platform.xwiki.org/xwiki/bin/view/Features/PageEditing#HSettingthepageparent
>> 
>> This page should lead you to 
>> http://platform.xwiki.org/xwiki/bin/view/Features/ContentOrganization/ which 
>> in turn should lead you to 
>> http://platform.xwiki.org/xwiki/bin/view/Features/ContentOrganization/NestedPagesMigration/
>> 
>> Thanks
>> -Vincent
>> 
>>> Regards,
>>> Matthias
>> 
>> ___
>> users mailing list
>> [hidden email] 
>> http://lists.xwiki.org/mailman/listinfo/users 
>> 
>> 
>> 
>> 
>> If you reply to this email, your message will be added to the 
>> discussion below:
>> http://xwiki.475771.n2.nabble.com/Set-Parent-in-XWiki-8-0-tp7598643p7598644.html
>>  
>> 
>>  
>> 
>> To unsubscribe from Set Parent in XWiki 8.0, click here 
>> >  
>> >.
>> NAML 
>> >  
>> >
>>  
>> 
> 
> 
> 
> 
> 
> --
> View this message in context: 
> http://xwiki.475771.n2.nabble.com/Set-Parent-in-XWiki-8-0-tp7598643p7598667.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 
> 
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Creating Nested Page Hierarchies

2016-03-25 Thread Personal
So after looking through the API docs I see that $xwiki.searchDocuments is also 
deprecated so I have updated my code to:

{{velocity}}
#set($query="where doc.space='$doc.getSpace()'")
#set($results = false)
#set($results = $services.query.xwql($query).execute())
#foreach($docname in $results)
#set($rdoc = $xwiki.getDocument($docname))
[[$rdoc.getDisplayTitle()>>$rdoc.fullName]]
#end
{{/velocity}}

The query service works as intended providing pages in order (of creation or 
ascending I a not sure) but the parent is also listed. After looking over the 
documents Vincent referenced for nested pages again I can understand why the 
WebHome page is listed as also located within it’s own space. Any advice on how 
to remove it from my query results or processing by the foreach loop?

Regards,

Jesse Bright

> On Mar 24, 2016, at 7:36 AM, Personal  wrote:
> 
> I am attempting to utilize the example code from the links I mentioned 
> earlier but update it to reflect that the parent-child relationship is 
> deprecated under the new Nested Pages concept. This is the code I have so far:
> 
> {{velocity}}
> #set($query="where doc.space='$doc.getSpace()'")
> #set($results = false)
> #set($results = $xwiki.searchDocuments($query, 10, 0))
> #set($first = true)
> #foreach($docname in $results)
> #set($rdoc = $xwiki.getDocument($docname).getTranslatedDocument())
> [[$rdoc.getDisplayTitle()>>$rdoc.fullName]]
> #end
> {{/velocity}}
> 
> It works to a point but the results look like this:
> 
> Test Child 2 <http://localhost:8081/xwiki/bin/view/Test/Test+Child+2>
> Test Child 6 <http://localhost:8081/xwiki/bin/view/Test/Test+Child+6>
> Test <http://localhost:8081/xwiki/bin/view/Test/>
> Test Child 1 <http://localhost:8081/xwiki/bin/view/Test/Test+Child+1>
> Test Child 3 <http://localhost:8081/xwiki/bin/view/Test/Test+Child+3>
> Test Child 5 <http://localhost:8081/xwiki/bin/view/Test/Test+Child+5>
> Test Child 0 <http://localhost:8081/xwiki/bin/view/Test/Test+Child+0>
> Test Child 4 <http://localhost:8081/xwiki/bin/view/Test/Test+Child+4>
> 
> The ‘Test’ page listed represents the page containing the code which I would 
> consider the parent or container page and the nested pages are in no 
> discernible order. These nested pages were all generated with a script (if 
> helpful I can provide the code) using an array of names and a foreach loop, 
> so I would expect that they were created in the order the names were provided 
> in the array which was ascending order. Also I notice that alphanumeric sort 
> order seems to be the default in Xwiki so I am a little surprised by these 
> results.
> 
> Any helpful advice you can provide to remove the container page and sort the 
> results would be appreciated.
> 
> Regards,
> 
> Jesse Bright
> 
> 
>> On Mar 20, 2016, at 5:26 PM, Jesse Bright  wrote:
>> 
>> Never mind, I found these after I posted:
>> 
>> http://platform.xwiki.org/xwiki/bin/view/DevGuide/APIGuide#HCreateanewDocument
>> http://extensions.xwiki.org/xwiki/bin/view/Extension/Immediate+Children+Pages
>> 
>> I had search for this before but without including 'velocity' in the search 
>> I was only getting the more basic instructions. 
>> 
>> Regards,
>> 
>> Jesse
>> 
>>> On Mar 19, 2016, at 1:55 PM, Personal  wrote:
>>> 
>>> I am creating a knowledge base for a local municipal code which follows a 
>>> typical book hierarchy. I plan on using nested pages to create a pages 
>>> hierarchy for navigating and searching the code text at different levels. 
>>> For example each end page would have a space path like so:
>>> 
>>> Title 19.Part 2.Chapter 4.Section 100
>>> Title 19.Part 2.Chapter 4.Section 200
>>> etc.
>>> 
>>> Currently I am using a Velocity macro to create links to each child page 
>>> and at the chapter level I also start including the child pages. I then 
>>> follow the links to make the child pages. This works relatively well but 
>>> has a couple of disadvantages. 1) It is slow to create each page by 
>>> repeatedly following the links, selecting the template and pasting the next 
>>> tier of code. 2) It hardcodes the child page names which if changed (say 
>>> due to a typo) must be updated by hand each time.
>>> 
>>> I am wondering if there is a more efficient way that I can automate the 
>>> page and link creation process. Ideally I would have a way to create the 
>>> complete page hierarchy by providing the names and levels of each page with 
>>> the same code in eac

Re: [xwiki-users] Creating Nested Page Hierarchies

2016-03-24 Thread Personal
I am attempting to utilize the example code from the links I mentioned earlier 
but update it to reflect that the parent-child relationship is deprecated under 
the new Nested Pages concept. This is the code I have so far:

{{velocity}}
#set($query="where doc.space='$doc.getSpace()'")
#set($results = false)
#set($results = $xwiki.searchDocuments($query, 10, 0))
#set($first = true)
#foreach($docname in $results)
#set($rdoc = $xwiki.getDocument($docname).getTranslatedDocument())
[[$rdoc.getDisplayTitle()>>$rdoc.fullName]]
#end
{{/velocity}}

It works to a point but the results look like this:

Test Child 2 <http://localhost:8081/xwiki/bin/view/Test/Test+Child+2>
Test Child 6 <http://localhost:8081/xwiki/bin/view/Test/Test+Child+6>
Test <http://localhost:8081/xwiki/bin/view/Test/>
Test Child 1 <http://localhost:8081/xwiki/bin/view/Test/Test+Child+1>
Test Child 3 <http://localhost:8081/xwiki/bin/view/Test/Test+Child+3>
Test Child 5 <http://localhost:8081/xwiki/bin/view/Test/Test+Child+5>
Test Child 0 <http://localhost:8081/xwiki/bin/view/Test/Test+Child+0>
Test Child 4 <http://localhost:8081/xwiki/bin/view/Test/Test+Child+4>

The ‘Test’ page listed represents the page containing the code which I would 
consider the parent or container page and the nested pages are in no 
discernible order. These nested pages were all generated with a script (if 
helpful I can provide the code) using an array of names and a foreach loop, so 
I would expect that they were created in the order the names were provided in 
the array which was ascending order. Also I notice that alphanumeric sort order 
seems to be the default in Xwiki so I am a little surprised by these results.

Any helpful advice you can provide to remove the container page and sort the 
results would be appreciated.

Regards,

Jesse Bright


> On Mar 20, 2016, at 5:26 PM, Jesse Bright  wrote:
> 
> Never mind, I found these after I posted:
> 
> http://platform.xwiki.org/xwiki/bin/view/DevGuide/APIGuide#HCreateanewDocument
> http://extensions.xwiki.org/xwiki/bin/view/Extension/Immediate+Children+Pages
> 
> I had search for this before but without including 'velocity' in the search I 
> was only getting the more basic instructions. 
> 
> Regards,
> 
> Jesse
> 
>> On Mar 19, 2016, at 1:55 PM, Personal  wrote:
>> 
>> I am creating a knowledge base for a local municipal code which follows a 
>> typical book hierarchy. I plan on using nested pages to create a pages 
>> hierarchy for navigating and searching the code text at different levels. 
>> For example each end page would have a space path like so:
>> 
>> Title 19.Part 2.Chapter 4.Section 100
>> Title 19.Part 2.Chapter 4.Section 200
>> etc.
>> 
>> Currently I am using a Velocity macro to create links to each child page and 
>> at the chapter level I also start including the child pages. I then follow 
>> the links to make the child pages. This works relatively well but has a 
>> couple of disadvantages. 1) It is slow to create each page by repeatedly 
>> following the links, selecting the template and pasting the next tier of 
>> code. 2) It hardcodes the child page names which if changed (say due to a 
>> typo) must be updated by hand each time.
>> 
>> I am wondering if there is a more efficient way that I can automate the page 
>> and link creation process. Ideally I would have a way to create the complete 
>> page hierarchy by providing the names and levels of each page with the same 
>> code in each page providing a link to each child of that page. Then I could 
>> paste the content text into each page at the end of the branch. I have done 
>> something similar to this using Jeykell but that is much simpler as it is 
>> static content based on the file structure. If I am going about this all the 
>> wrong way I am open to other suggestions.
>> 
>> Regards,
>> 
>> Jesse
>> 
>> ___
>> 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


[xwiki-users] Creating Nested Page Hierarchies

2016-03-19 Thread Personal
I am creating a knowledge base for a local municipal code which follows a 
typical book hierarchy. I plan on using nested pages to create a pages 
hierarchy for navigating and searching the code text at different levels. For 
example each end page would have a space path like so:

Title 19.Part 2.Chapter 4.Section 100
Title 19.Part 2.Chapter 4.Section 200
etc.

Currently I am using a Velocity macro to create links to each child page and at 
the chapter level I also start including the child pages. I then follow the 
links to make the child pages. This works relatively well but has a couple of 
disadvantages. 1) It is slow to create each page by repeatedly following the 
links, selecting the template and pasting the next tier of code. 2) It 
hardcodes the child page names which if changed (say due to a typo) must be 
updated by hand each time.

I am wondering if there is a more efficient way that I can automate the page 
and link creation process. Ideally I would have a way to create the complete 
page hierarchy by providing the names and levels of each page with the same 
code in each page providing a link to each child of that page. Then I could 
paste the content text into each page at the end of the branch. I have done 
something similar to this using Jeykell but that is much simpler as it is 
static content based on the file structure. If I am going about this all the 
wrong way I am open to other suggestions.

Regards,

Jesse

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


Re: [xwiki-users] Require Password Change

2016-03-19 Thread Personal
Oh well, I can understand that this would be of limited use. Thanks for getting 
back to me!

Regards,

Jesse


> On Mar 18, 2016, at 4:27 PM, Vincent Massol  wrote:
> 
> 
>> On 18 Mar 2016, at 20:01, Jesse Bright  wrote:
>> 
>> I thought I remember seeing the option to require a user to change their 
>> password at the next login using the 8.0 Milestone 1 but I am running the 
>> latest 8.0  and I don't see it. Am I imagining this?
> 
> I think you are :) At least I’m not aware of any such feature.
> 
> Thanks
> -Vincent
> 
> ___
> 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] Error When Updating to Xwiki 8.0

2016-03-15 Thread Personal
I thought I would give updating to Xwiki 8.0 a go tonight but ran into an 
error. I just updated to 7.4.2 the other day so I wasn’t expecting an issue but 
when I run:

sudo apt-get update

I get the following error at the end of the update:

...
Get:46 http://security.ubuntu.com trusty-security/universe Translation-en [73.8 
kB]
Ign http://maven.xwiki.org stable/ Translation-en_US   
Ign http://maven.xwiki.org stable/ Translation-en  
Fetched 5,290 kB in 3s (1,626 kB/s)
Reading package lists... Error!
E: Problem parsing dependency Conflicts
E: Error occurred while processing xwiki-mysql-common (NewVersion2)
E: Problem with MergeList /var/lib/apt/lists/maven.xwiki.org_stable_Packages
E: The package lists or status file could not be parsed or opened.

I tried deleting all the files from /var/lib/apt/lists/ as suggested in some 
askubunu post but the error continues.

I don’t know that this error actually has anything to do with the recent update 
but it is stopping me from updating. Any help is appreciated. Thanks!

Regards, 

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


[xwiki-users] Changing Global Text Style Settings

2016-03-03 Thread Personal
I have been looking around for this but coming up blank. Can anyone point me in 
the right direction as to how you change the default text styles? I am just 
looking to tweak the header and body font sizes and font family across the 
entire wiki. I don’t want to change the text for other elements like the 
drawer, buttons, panels etc.

Thanks for any information that you can provide.

regards,

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


Re: [xwiki-users] Include Macro Usage

2016-02-28 Thread Personal
After experimenting with the include macro further I have discovered that I can 
only include terminal pages. Is this functioning as intended? It seems a 
strange limitation to enforce and is not mentioned in the documentation from 
what I can see. Perhaps I am doing something wrong?

Regards,

Jesse
 
> On Feb 16, 2016, at 7:12 AM, Jesse Bright  wrote:
> 
> That did the trick! Thanks, I will be more careful with my syntax. 
> 
> Regards,
> 
> Jesse
> 
>> On Feb 16, 2016, at 6:38 AM, "vinc...@massol.net"  wrote:
>> 
>> Hi Jesse,
>> 
>>> On 16 Feb 2016 at 15:34:57, Jesse Bright 
>>> (je...@abrightfamily.com(mailto:je...@abrightfamily.com)) wrote:
>>> 
>>> As a test of this extension I have added the following to the end of 
>>> Sandbox Test Page 2:
>>> 
>>> {{include reference="Sandbox.testpage1"/}}
>>> 
>>> The inclusion is shown on the information panel at the right but no text is 
>>> shown in view mode. It appears I am missing something, any help is 
>>> appreciated. Thanks!
>> 
>> It’s probably just that the page you referenced does not exist: 
>> Sandbox.testpage1
>> 
>> By default the sandbox app has a page named ”Sandbox.TestPage1”, maybe 
>> that’s the one you wanted to use instead?
>> 
>> Page names are case-sensitive in XWiki.
>> 
>> Thanks
>> -Vincent
>> 
>>> Regards,
>>> 
>>> Jesse
>> 
>> ___
>> 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


Re: [xwiki-users] Making Changes to the Editor

2016-02-21 Thread Personal
I have found the solutions to my issues so I thought I would share.

> I am looking to modify the editor in two ways:
> 
> 1) I would like to change the default editor to the new CKEditor per these 
> instructions: 
> http://extensions.xwiki.org/xwiki/bin/view/Extension/CKEditor+Integration#HReplacetheDefaultEditor
>  I get stuck at: "In order to open the CKEditor by default (i.e. replace the 
> default editor) you can edit the CKEditor.EditMenuEntry page in Objects mode…”

This page is hidden but can be navigated to in the address bar for example: 
localhost:8080/xwiki/bin/view/CKeditor/EditMenuEntry
At this point you can select Edit>Objects then replace the code as instructed.

> 2) I would like to change the “Is Minor Edit” to checked by default and these 
> are the only instructions I can find: 
> http://lists.xwiki.org/pipermail/users/2009-August/012857.html I can locate 
> many files in the /usr/lib/xwiki/templates folder that start with the word 
> ‘edit’ but none of them are ‘editactions.vm’.

The users post referenced appears to be dated. I don’t know of the terminology 
has changed over time but the current location is within the skins folder not 
templates and it also can be navigated to in the address bar at: 
localhost:8080/xwiki/skins/flamingo/editactions.vm
Ultimately I used the Overridded Templates feature of the Skins Application to 
modify the file. I did this to the default skin which I do not think is 
entirely correct (it may get overwritten with an update) but my attempts to 
override the whole skin utterly failed with permission errors, blank pages and 
multiple wipe/re-rolls of my test vagrant box.

If anyone has suggestions for proper implementation of modifications to the 
skin I would welcome them. I have read the documentation thoroughly but the 
distinction between the current and deprecated approaches is a bit fuzzy. I 
found that following the directions exactly did not produce the results 
indicated.

Regards,

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