Hi Vincent,
Thanks again for your help.
As far as the code goes, I did change the default space for the
FAQClass
to FAQ just as the tutorial stated. The code is earlier in this email
trail:
>>> #set($defaultParent = 'FAQ.WebHome')
>>> #set($defaultSpace = 'FAQ')
Ok I hadn't checked the code you sent. It looks ok. I don't see the
FAQSheet code though.
Anyway let us know how your 3rd try goes.
Thanks
-Vincent
I'm doing this all again from scratch. Maybe 3rd time is a charm.
Thanks,
Mark
BCBS-IL
ph 312-653-4293
mark_marziale(a)bcbsil.com
Vincent Massol <vincent(a)massol.net>
Sent by: users-bounces(a)xwiki.org
11/16/2009 08:46 AM
Please respond to
XWiki Users <users(a)xwiki.org>
To
XWiki Users <users(a)xwiki.org>
cc
Subject
Re: [xwiki-users] problem with FAQ tutorial .. space assignment?
On Nov 16, 2009, at 3:26 PM, Mark_Marziale(a)BCBSIL.COM wrote:
Hi Vincent,
Thanks for your help. I'm sure I'm doing something wrong. My
difficulty is
in finding what it is I'm doing wrong. I'll review the steps again,
this
time paying special attention to the points you raised.
It'd help if you could expand on " .. or have set up some different
configuration for the default wiki syntax for new pages". I installed
xwiki from scratch, then pulled in xwiki-enterprise-wiki-2.0.xar,
then
started typing in the faq example. If that somehow affected the
configuration for default wiki syntax, I'm not aware how.
If you haven't touched the default config then all new pages are
created in XWiki Syntax 2.0 by default, which is fine and matches the
FAQ tutorial expectations.
In
http://platform.xwiki.org/xwiki/bin/view/DevGuide/FAQTutorial#HCreatetheFAQ…
, there's a step where you'll see:
#set($defaultSpace = 'Main')
As described, replace "Main" with the space where you want the docs to
be created, for ex: "FAQ".
Thanks
-Vincent
Point noted on user contributed code.
Thanks,
Mark
BCBS-IL
ph 312-653-4293
mark_marziale(a)bcbsil.com
Vincent Massol <vincent(a)massol.net>
Sent by: users-bounces(a)xwiki.org
11/16/2009 08:17 AM
Please respond to
XWiki Users <users(a)xwiki.org>
To
XWiki Users <users(a)xwiki.org>
cc
Subject
Re: [xwiki-users] problem with FAQ tutorial .. space assignment?
Hi Mark,
On Nov 16, 2009, at 2:42 PM, Mark_Marziale(a)BCBSIL.COM wrote:
Hi Josh,
Thanks for your reply and interest.
Unfortunately I haven't been able to figure out what the heck I'm
doing
wrong in this relatively simple case. Beginning to look at
alternative
wikis.
Definitely xwiki can be used to build 2.0 level of functionality,
but it
seems to me there's a little too much black box. I've tried other
applications as well .. such as the task manager app .. and found
problems
others have found as well right out of the box. My point is it's
all a
little too vague for my comfort.
One thing to note: this task manager app is not written nor supported
by the XWiki dev team. It's been contributed by individuals and is
supported by them or any contributor who wants to help. The quality
of
the code you find on
code.xwiki.org varies a lot. All we can
guarantee
here is the code that is developed by the XWiki dev team.
In general if apps on
code.xwiki.org break it's because they haven't
been updated at the same rate as the XWiki platform and in general
it's really not much to make them work (a few minutes of work).
The FAQ tutorial works well AFAIK. IMO you've probably forgotten some
steps (in one step you must edit the default template to set in which
space new FAQ documents are created - not that it matters, it'll work
wherever they are created) or have set up some different
configuration
for the default wiki syntax for new pages.
Thanks
-Vincent
> I haven't given up, just beginning to look elsewhere as well.
>
> Thanks,
> Mark
>
> BCBS-IL
> ph 312-653-4293
> mark_marziale(a)bcbsil.com
>
>
>
>
>
> Josh <disseminate(a)gmail.com>
> Sent by: users-bounces(a)xwiki.org
> 11/14/2009 03:57 PM
> Please respond to
> XWiki Users <users(a)xwiki.org>
>
>
> To
> XWiki Users <users(a)xwiki.org>
> cc
>
> Subject
> Re: [xwiki-users] problem with FAQ tutorial .. space assignment?
>
>
>
>
>
>
> Hi Mark,
>
> Sorry for the delayed response. I went through the steps of creating
> the
> FAQ application per the tutorial, but I can't reproduce your issue.
> Questions are created in the FAQ space for me, not Main. Your code
> looks
> fine as well.
>
> Were you able to figure it out?
>
> Thanks,
> -Joshua-
>
> Mark_Marziale(a)BCBSIL.COM wrote:
>> Hi Joshua,
>>
>> (I apologize to all if this appears more than once; I haven't been
>> successful posting to the mailing list since before yesterday.
>> Perhaps
>> attachments are prohibited? Trying again without.)
>>
>> Thanks again, your explanation of spaces was very clear and
>> helpful.
>>
>> Now that I have a little better understanding of spaces, I'll
>> present my
>
>> problem. For some reason when I create a FAQ entry, it's not going
>> into
>> the FAQ space but instead into the Main space. Per the tutorial, I
> haven't
>> created a FAQ space explicitly this go round.
>>
>> It seems to me this can only be happening as a result of the code
>> that
>> adds a FAQ, or perhaps in the class definition code which specifies
>> the
>> default space. Looks right to me and jibes with what you've said
>> about
>> spaces. Here it is yanked directly out of my code .. which was
>> simply a
>> copy/paste from the tutorial:
>>
>> FAQClass code:
>> {{velocity}}
>> ## Replace Main with the Space where you want your documents to be
>> created.
>> ## Replace the default parent with the one of your choice and save
>> the
>> document.
>> ##
>> #set($className = $doc.name.substring(0,
>> $doc.name.indexOf("Class")))
>> #set($defaultParent = 'FAQ.WebHome')
>> #set($defaultSpace = 'FAQ')
>> {{/velocity}}
>>
>> {{include document="XWiki.ClassSheet"/}}
>>
>> FAQTemplate code:
>> {{include document="FAQ.FAQSheet"/}}
>>
>> FAQ WebHome code (
>
http://localhost/xwiki/bin/edit/FAQ/WebHome?&editor=wiki
>> ):
>> = Existing FAQ entries =
>>
>> {{velocity}}
>> #set($sql = ", BaseObject as obj where obj.name=doc.fullName and
>> obj.className='FAQ.FAQClass' and
obj.name<>'FAQ.FAQTemplate'")
>> #set($results = $xwiki.searchDocuments($sql))
>> #if($results.empty)
>> No FAQ has been created yet!
>> #else
>> #foreach ($item in $results)
>> #set($faq = $xwiki.getDocument($item))
>> * [[${faq.display("question").replace("<p>",
"").replace("</p>",
>> "")}>>${item}]]
>> #end
>> #end
>> {{/velocity}}
>>
>> {{velocity}}
>> #if("$!request.docName" != '')
>> ## Request for creating a new instance
>> #set($targetDocName = "${request.spaceName}.${request.docName}")
>> #set($targetDocName = $targetDocName.replace("?",
"").replace("#",
>> "").trim())
>> #if(!$xwiki.exists($targetDocName) &&
$xwiki.hasAccessLevel('edit',
>> $context.user, $targetDocName))
>> $response.sendRedirect($xwiki.getURL($targetDocName, 'inline',
>> "template=${request.template}&parent=${request.parent}"))
>> ## Stop processing, since we already sent a redirect.
>> #stop
>> #end
>> #end
>>
>> = Add a new question =
>>
>> #if("$!targetDocName" != '' &&
$xwiki.exists($targetDocName))
>> {{warning}}The target document already exists. Please choose a
> different
>> name, or [[view the existing document>>$targetDocName]]{{/warning}}
>> #elseif("$!targetDocName" != '')
>> {{warning}}You don't have permission to create that
> document{{/warning}}
>> #end
>>
>> {{html}}
>> <form action="" id="newdoc" method="post">
>> <div>
>> <input type="hidden" name="parent"
value="${doc.fullName}"/>
>> <input type="hidden" name="template"
value="FAQ.FAQTemplate"/>
>> <input type="hidden" name="sheet"
value="1"/>
>> <input type="hidden" name="spaceName"
value="FAQ"/>
>> Document: <input type="text" name="docName"
value="Enter your
>> question here" class="withTip" size="50"/>
>> <span class="buttonwrapper"><input type="submit"
value="Create
> this
>> FAQ" class="button"/></span>
>> </div>
>> </form>
>> {{/html}}
>> {{/velocity}}
>>
>> So what am I missing?
>>
>> Thanks,
>> Mark
>>
>>
>>
>>
>>
>> "Rieken, Joshua" <Joshua_Rieken(a)reyrey.com>
>> Sent by: users-bounces(a)xwiki.org
>> 11/10/2009 04:37 PM
>> Please respond to
>> XWiki Users <users(a)xwiki.org>
>>
>>
>> To
>> XWiki Users <users(a)xwiki.org>
>> cc
>>
>> Subject
>> Re: [xwiki-users] problem with FAQ tutorial .. space assignment?
>>
>>
>>
>>
>>
>>
>> Mark,
>>
>> You're very welcome. It's not necessary to explicitly create the
>> WebHome
>
>> in FAQ until later in the tutorial. Question/Answer documents that
>> are
>> created from the FAQ Class page will go into the FAQ space, which
>> "comes
>
>> into existence" the instant any document is placed in it.
>>
>> For example, if you add a question/answer page called
>> "FAQ.Howtoeditapage", you can still get to it regardless of whether
>> "FAQ.WebHome" exists.
>>
>> A space "disappears" when every document that is part of the space
>> is
>> deleted. So a space is just a collection of documents and doesn't
>> really
>
>> exist outside of those documents. It's really just a convenient way
>> to
>> organize your documents.
>>
>> Good luck, and if you have any more questions, please don't
>> hesitate to
>> ask.
>>
>> -Joshua-
>>
>>
>>> -----Original Message-----
>>> From: users-bounces(a)xwiki.org
>>> [mailto:users-bounces@xwiki.org] On Behalf Of
Mark_Marziale(a)BCBSIL.COM
>>>> Sent: Tuesday, November 10, 2009 3:31 PM
>>>> To: XWiki Users
>>>> Cc: XWiki Users; users-bounces(a)xwiki.org
>>>> Subject: Re: [xwiki-users] problem with FAQ tutorial .. space
>>>> assignment?
>>>>
>>>> Hi Joshua,
>>>>
>>>> Thanks very much for your prompt reply. It helps a lot to
>>>> know the history and what WebHome means!
>>>>
>>>> Am I correct then in first creating the FAQ space explicitly,
>>>> even though that's not called for in the tutorial? Like so:
>>>>
>>>> "I've first created the FAQ Space, then built the FAQ Class,
>>>> etc, then put the code into the 'home' page for the space, ie
>>>>
http://localhost/xwiki/bin/view/FAQ/"
>>>>
>>>>
>>>> Thanks,
>>>> Mark
>>>>
>>>> BCBS-IL
>>>> ph 312-653-4293
>>>> mark_marziale(a)bcbsil.com
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> "Rieken, Joshua" <Joshua_Rieken(a)reyrey.com>
>>>> Sent by: users-bounces(a)xwiki.org
>>>> 11/10/2009 03:18 PM
>>>> Please respond to
>>>> XWiki Users <users(a)xwiki.org>
>>>>
>>>>
>>>> To
>>>> XWiki Users <users(a)xwiki.org>
>>>> cc
>>>>
>>>> Subject
>>>> Re: [xwiki-users] problem with FAQ tutorial .. space assignment?
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Hi Mark,
>>>>
>>>>
http://localhost/xwiki/bin/view/FAQ/ actually takes you to
>>>>
http://localhost/xwiki/bin/view/FAQ/WebHome. "WebHome" is the
>>>> home page
>>>> for any given space. The name "WebHome" came from earlier
versions
>>>> of
>>>> XWiki, when a Space was called a Web.
>>>>
>>>> Hope this helps,
>>>> -Joshua-
>>>>
>>>>
>>>>> -----Original Message-----
>>>>> From: users-bounces(a)xwiki.org
>>>>> [mailto:users-bounces@xwiki.org] On Behalf Of
>>>>>
>>>> Mark_Marziale(a)BCBSIL.COM
>>>>
>>>>> Sent: Tuesday, November 10, 2009 3:06 PM
>>>>> To: users(a)xwiki.org
>>>>> Subject: [xwiki-users] problem with FAQ tutorial .. space
>>>>>
>>>> assignment?
>>>>
>>>>> Hi,
>>>>>
>>>>> I've followed along in the tutorial in the dev guide for
>>>>> creating a FAQ at
>>>>>
http://platform.xwiki.org/xwiki/bin/view/DevGuide/FAQTutorial
>>>>>
>>>>> Here's my first point of confusion: in section 'Create a
>>>>> homepage for your application' it states 'Go to the
>>>>> "FAQ.WebHome" page'. I do not see such a page. In the
latest
>>>>> iterations of building the FAQ I've first created the FAQ
>>>>> Space, then built the FAQ Class, etc, then put the code into
>>>>> the 'home' page for the space, ie
>>>>>
>>>>
http://localhost/xwiki/bin/view/FAQ/
>>>>
>>>>> I'm sure my problems stem from my weak understanding of this
>>>>> step and how spaces are created and referenced.
>>>>>
>>>>> Thanks,
>>>>> Mark