Hi
With a seemingly futile attempt I finally was able to create blog documents with 2.0 syntax. The blog is displaying the the entries as well as the blog web home nicely. The only thing I noticed is that the document of the blog entry is still marked xwiki/1.0.
For now except the Blog.WebHome all the changed documents contain a '2' prefix so that it is possible to compare them when needed. I am sure that there is more to be done but for now I am happy that at least the first step is done.
As soon as I am back home I will export the blog documents and zip up the changed files. Because I cannot upload them onto this mailing list I was wondering if I should create a JIRA report and attached there.
Have fun
Andreas Schaefer
CEO of Madplanet.com Inc.
EMail: andreas.schaefer(a)madplanet.com
schaefera(a)me.com
Twitter: andy_mpc
AIM: schaefera(a)me.com
Using the XWiki blog quite often I am sometimes frustrated by the fact that still in 2.0 M1 the syntax based on 1.0.
Beside the fact that nobody found time and/or urge to attack that is there any other reason why this cannot be done ?
In case it is possible and someone could tell me where to start looking into it I would try to accomplish that. For now I cannot promise anything because my time is very limited and free time is quite unpredictable.
Cheers
Andreas Schaefer
CEO of Madplanet.com Inc.
EMail: andreas.schaefer(a)madplanet.com
schaefera(a)me.com
Twitter: andy_mpc
AIM: schaefera(a)me.com
Is there anything like the Xwiki-feed-plugin except that instead of fetching
a feed, it would fetch an HTML document via HTTP, returning a DOM structure
that can be scanned or filtered by API-calls, e.g.:
$fetchedDom = $xwiki.FetchPlugin.getDocumentDOM("http://nielsmayer.com")
$images = $fetchedDom.getImgList()
$media = $fetchedDom.getAnchorHREFsByExtension([".mp3", ".mv4", ".mp4"])
$content = $fetchedDom.getDivListById(['xwikicontent, 'container',
'content'])
Since this would happen on the server, you'd probably need to "fake" being a
real browser (or just capture the user's browser configuration and pass it
via the call to the hypothetical "getDocumentDOM()" in order to capture an
accurate scraped representation of a modern site.)
The existing examples I've seen store an Xwiki document in the database
first. I was hoping there was an "in memory" option that would allow for the
document to be maintained in the app's context for long enough to process
the remaining stream of plugin calls such as "getDivListById()" or
"getAnchorHREFsByExtension()" and then appropriately dispose the DOM when no
longer referenced, via garbage collection. Maybe compared to the
implementation headaches -- of retrieving a potentially large document into
memory incrementally, parsing it into a DOM incrementally, making that
available in the context, etc -- maybe I should just write the damn document
into the database, scrape it, and delete it.
Since I would use Xwiki to store a JSON "scrape" of the document in the DB
(as a xwiki doc), I could store it in XWiki.JavaScriptExtension[0] of the
retrieved document, and then just delete the wiki-contents after
scraping.... So actually, if anybody has any suggestions for "scraping" with
a retrieved document, stored as Xwiki doc, please, suggest as well! This
seems like an area potentially fraught with peril that many people have
already dealt with, so I would appreciate advice.
Thanks,
Niels
http://nielsmayer.com
Hi
Well, right now it is 1 step forward and 2 steps back.
After much trial and error I finally did this:
Convert to 2.0:
- BlogSheet
- CreatePost
- BlogPostTemplate
- BlogPostSheet
This enables me to create a 2.0 blog entry but the display of that
entry fails miserable.
For example the Edit Tools (Publish/Hide, Edit, Delete) are having
comment added to it because 2.0 adds comments of what it is doing into
the HTML page but when that is inside a string ("") and the code
contains double quotes as well all hell breaks loose.
But when I tried to convert BlogCode (which contains the creation of
the Edit Tools) then the panels start to fail. In turn these panels
are still 1.0 and so I cannot convert all of them.
Any idea how to fix that?
Thanks - Andy
Hi
Because of all the issues I have trying to convert XWiki Blog to 2.0 I was wondering if it wouldn't be better to rewrite it in Groovy than trying to convert it?
Any feedback is welcomed.
Thanks - Andy Schaefer
Hi
When I try to convert BlogCode (at least that is what I think) I get this strange error:
Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'searchDocuments' in class com.xpn.xwiki.api.XWiki threw exception com.xpn.xwiki.XWikiException: Error number 3223 in 3: Exception while searching documents with SQL [select distinct doc.space, doc.name, doc.name and isPublished.value = 1 and hidden.value <> 1 and isPublished.value = 0 order by publishDate.value from XWikiDocument as doc , BaseObject obj where (doc.hidden <> true or doc.hidden is null) and obj.name = doc.fullName and obj.className = 'Blog.CategoryClass' order by doc.name and isPublished.value = 1 and hidden.value <> 1 and isPublished.value = 0 order by publishDate.value desc]
Wrapped Exception: unexpected token: from near line 1, column 148 [select distinct doc.space, doc.name, doc.name and isPublished.value = 1 and hidden.value <> 1 and isPublished.value = 0 order by publishDate.value from com.xpn.xwiki.doc.XWikiDocument as doc , com.xpn.xwiki.objects.BaseObject obj where (doc.hidden <> true or doc.hidden is null) and obj.name = doc.fullName and obj.className = 'Blog.CategoryClass' order by doc.name and isPublished.value = 1 and hidden.value <> 1 and isPublished.value = 0 order by publishDate.value desc] at Blog.Test 2b[line 4, column 35]
It seems for whatever reason XWiki is mixing up some SQL statements. Any ideas how I can figure out where this happens (the stacktrace is not helpful) and then what is going wrong.
I personally think that somehow the velocity template is messed up but I could be completely wrong.
Thank you - Andy Schaefer
Currently I am working on converting the Blog application to XWiki Syntax 2.0. After having spent quite some time trying to figure out how everything works together I figured out that the automatic conversion tools makes many mistakes with Velocity code (BlogCode, CreatePost).
To resolve that I have to copy away the old code, convert to 2.0, take the new code and run a diff on it to figure out what has changed and then undo some of the changes. Because I will not be the only one trying to do that I was wondering if there is a tool out that that could automate this process:
- Save the old code
- Convert to 2.0
- Display a diff where the user can do final adjustments
What do you think?
-Andy Schaefer
Hello,
I have upgraded XE from 1.8 to 1.9 and i'm facing this problem:
- the documents added as attachments are not usable anymore (images can't be
viewed anymore as well as .ppt presentations).
Is there a fix available for this problem?
--
View this message in context: http://n2.nabble.com/Upgrade-from-XE-1.8-to-1.9-problems-tp3174142p3174142.…
Sent from the XWiki- Dev mailing list archive at Nabble.com.
Hi,
On Thu, Jul 2, 2009 at 2:50 PM, Anca Paula Luca
<ancapaula.luca(a)xwiki.com>wrote:
>
> alexmaru (SVN) wrote:
> > Author: alexmaru
> > Date: 2009-07-01 18:16:45 +0200 (Wed, 01 Jul 2009)
> > New Revision: 21750
> >
> > Added:
> > sandbox/gsoc/widgets/src/main/XWikiFox/
> > sandbox/gsoc/widgets/src/main/XWikiFox/XWikiFox.xpi
>
> This is not needed. Redundant is bad because it takes up unneeded space,
> brings
> unneeded complexity to the sources tree, and it can cause unsynchronized
> sources
> with packed versions. You should have a maven build create this pack for
> you.
>
> > sandbox/gsoc/widgets/src/main/XWikiFox/chrome.manifest
> > sandbox/gsoc/widgets/src/main/XWikiFox/chrome/
> > sandbox/gsoc/widgets/src/main/XWikiFox/chrome/XWikiFox.jar
>
> Neither is this, same, you can have a maven build create it for you. Or,
> for the
> start, use just the sources, it's not mandatory to pack them in a .jar.
>
Have a look at
http://svn.xwiki.org/svnroot/xwiki/platform/xwiki-tools/trunk/foxwiki/
specially:
http://svn.xwiki.org/svnroot/xwiki/platform/xwiki-tools/trunk/foxwiki/distr…
I created a maven assembly to bundle foxwiki.xpi (with help from vincent)
long time ago. you just have to use it.
Thanks.
- Asiri