Re: [xwiki-users] off-line-Version of XWiki
Thanks for the lead - After a quick initial test, it looks like TPP will do exactly what I need. Much easier to use than Wget, and the pages are actually working after download. Best, aaron On Sat, Jan 26, 2013 at 2:17 AM, Roman Muntyanu rmunt...@softserveinc.comwrote: You could try something like http://www.tenmax.com/teleport/pro/home.htm Just make sure the user has read-only rights, because TPP clicks all the links :) -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Ashtar Communications Sent: Saturday, January 26, 2013 05:11 AM To: XWiki Users Subject: Re: [xwiki-users] off-line-Version of XWiki Stephanie, I'm also very interested in anything you come up with, or whether anyone has additional thoughts on making an offline copy. I'm not sure whether my situation is similar to yours or not, but I'll explain a few things I've tried so far in case it helps either of us. Short version - has anyone successfully used Wget to mirror an XWiki instance? What I ultimately would like is an offline archive of an XWiki instance that is totally independent of needing a servlet container or database (even standalone). I understand Arnaud's suggestion to use a standalone XWiki instance to create an offline backup, but unfortunately that is too complicated for most of my users to access. In my circumstance, I have an XWiki instance that needs to reset at the beginning of each year, and then need to keep an archive of each full year's worth of contributions to the wiki. So I end up with a separate XWiki database for each year. This is quickly becoming cumbersome and eating up a lot of server resources to keep all of them online. I would like for an average user to be able to download an archive of a particular year's wiki instance so I no longer need to host it live. One other consideration - almost all of the page content in each wiki instance is stored in objects attached to each page that are then retrieved with velocity and formatted with javascript. And most pages have a large number of attachments. Things I have tried: 1) HTML/PDF export - Like Stephanie, this doesn't work for me since it doesn't maintain navigation or scripting. 2) Standalone XWiki instance - this has proved just too complicated for my users. I'd prefer some type of archive in a flat file/HTML format if at all possible. 3) Wget - This seems to be the most promising option so far, since it's supposed to make a totally offline recursive mirror of the site. My attempts so far have been mixed - I can get some of the page content to download, but struggle with getting a completely working copy. I've also tried a few other offline archiver type programs, but none have worked better than Wget. If someone has successfully used Wget to mirror an XWiki site, I'd love to hear about it. Any other ideas? Thanks, aaron On Fri, Jan 25, 2013 at 8:53 AM, Arnaud bourree arnaud.bour...@gmail.com wrote: Hello, Off-line: XWiki is off-line: you don't need internet to run XWiki excepted for some connected extension. More than Off-line, we may want portable XWiki instance you can put on usb pen-drive. IMO, standalone XWiki is ready for that. OK, You want to put a copy of your XWiki server in you pen-drive ... - made you standalone XWiki read-only to not resynchronize back to your server - after dump of your server database, you have to convert it to Hslqdb, or you write Event listener extension to propagate page update from server to pen-drive. Database conversion looks more easy to do Regards, Arnaud. 2013/1/23 li...@yhmail.de: Hello again! I would like to make a xwiki-instance accessible off-line. I tried to export everything as HTML with rather bad results as the navigation and the scripting isn't exported. So the idea was to somehow export xwiki to some standalone version. Has anyone ever done something like this and wouldn't mind sharing his/her inside thoughts? Thanks for your help, Stephanie ___ 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 ___ 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] off-line-Version of XWiki
Stephanie, I’m also very interested in anything you come up with, or whether anyone has additional thoughts on making an “offline” copy. I’m not sure whether my situation is similar to yours or not, but I’ll explain a few things I’ve tried so far in case it helps either of us. Short version – has anyone successfully used Wget to mirror an XWiki instance? What I ultimately would like is an offline archive of an XWiki instance that is totally independent of needing a servlet container or database (even standalone). I understand Arnaud’s suggestion to use a standalone XWiki instance to create an offline backup, but unfortunately that is too complicated for most of my users to access. In my circumstance, I have an XWiki instance that needs to “reset” at the beginning of each year, and then need to keep an archive of each full year’s worth of contributions to the wiki. So I end up with a separate XWiki database for each year. This is quickly becoming cumbersome and eating up a lot of server resources to keep all of them online. I would like for an average user to be able to download an “archive” of a particular year’s wiki instance so I no longer need to host it “live.” One other consideration – almost all of the page content in each wiki instance is stored in objects attached to each page that are then retrieved with velocity and formatted with javascript. And most pages have a large number of attachments. Things I have tried: 1) HTML/PDF export – Like Stephanie, this doesn’t work for me since it doesn’t maintain navigation or scripting. 2) Standalone XWiki instance – this has proved just too complicated for my users. I’d prefer some type of archive in a flat file/HTML format if at all possible. 3) Wget – This seems to be the most promising option so far, since it’s supposed to make a totally offline recursive mirror of the site. My attempts so far have been mixed – I can get some of the page content to download, but struggle with getting a completely working copy. I’ve also tried a few other “offline archiver” type programs, but none have worked better than Wget. If someone has successfully used Wget to mirror an XWiki site, I'd love to hear about it. Any other ideas? Thanks, aaron On Fri, Jan 25, 2013 at 8:53 AM, Arnaud bourree arnaud.bour...@gmail.comwrote: Hello, Off-line: XWiki is off-line: you don't need internet to run XWiki excepted for some connected extension. More than Off-line, we may want portable XWiki instance you can put on usb pen-drive. IMO, standalone XWiki is ready for that. OK, You want to put a copy of your XWiki server in you pen-drive ... - made you standalone XWiki read-only to not resynchronize back to your server - after dump of your server database, you have to convert it to Hslqdb, or you write Event listener extension to propagate page update from server to pen-drive. Database conversion looks more easy to do Regards, Arnaud. 2013/1/23 li...@yhmail.de: Hello again! I would like to make a xwiki-instance accessible off-line. I tried to export everything as HTML with rather bad results as the navigation and the scripting isn't exported. So the idea was to somehow export xwiki to some standalone version. Has anyone ever done something like this and wouldn't mind sharing his/her inside thoughts? Thanks for your help, Stephanie ___ 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] Registration and Layout settings resetting
I've monitored the wiki for the last 3 days, and the problem is recurring about once every 24 hours. Each time I have run a cache flush to no effect. The only solution I have is to re-enter the missing data each time, which doesn't seem like a sustainable option. If anyone could shed light on this or suggest a fix, I would appreciate it. Since I can't seem to get rid of the problem, would it be better to downgrade, or to backup the wiki and then try a from-scratch install of 4.2m3? I'm not seeing similar behavior on my development server, only the production machine... thanks for all the help, aaron On Fri, Sep 14, 2012 at 12:28 PM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: I ran a flush on the cache immediately after the problem recurred, and the settings were not restored. Any other ideas? Thanks, aaron On Wed, Sep 12, 2012 at 12:46 AM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: Vincent, Thanks for the help. Answers below: Email -- Admin Email and SMTP server. The rest of the settings are maintained. What other setting remains that is not the default value? On the Email page, the Port, Server Username, and Server Password always stay - only the Admin Email and SMTP server are cleared out. Page Elements - All panel settings, reverting to zero displayed panels. Metadata visibility settings are maintained You modified those and they remain? If so the problem is not a cache issue that resets XWikiPreferences. I modified the panel settings to display two panels on the left, and no panels on the right. When the bug occurs, The show left/right panel? settings are set to -- and the Panels to Display are blank. The frequency of occurrence has dropped in the last day - at first it was happening every 15-20 minutes, and today it went most of the day with no apparent problems. The next time it occurs I will try to flush the cache and see if that sheds any light... thanks, aaron One thing you can test to ensure this: When the problem happens do a flush cache in a wiki page: {{velocity}} $xwiki.flushCache() {{/velocity}} And then verify if your settings are back. Thanks -Vincent Registration - Use Email Verification, Active Authentication Check, Validation Email Content, Confirmation Email Content. Everything else is maintained. Several entire Spaces - the wiki has a large number of spaces (~150). They seem to be getting deleted at random. I will leave the page for an hour, come back, and the link to the space homepage will have the question mark icon next to it. The space will no longer appear in the spaces list on the Dashboard. Any other ideas? I'm ready to downgrade back to 3.x - this only started happening with a fresh install of 4.2 and it's obviously a serious problem... thanks, aaron On Sun, Sep 9, 2012 at 3:17 AM, Vincent Massol vinc...@massol.net wrote: On Sep 9, 2012, at 8:11 AM, Dmitry Bakbardin haru_mamb...@mail.ru wrote: +1 vote I had the same problem until set Prevent unregistered users from editing pages, regardless of the page or space rights on. But I don't know still if it is a bug or a feature :-) It's a bug… Fixed in 4.2M3, see http://jira.xwiki.org/jira/browse/XWIKI-8160 -Vincent Kind regards, Dmitry Sun, 9 Sep 2012 01:52:12 -0400 от Ashtar Communications ashtarcommunicati...@gmail.com: Hi, It seems that my wiki is spontaneously resetting several configuration settings, most notably the registration, email, and layout settings. I enter information like the email server, address, and port, which panels to display in the sidebar, or whether to require email verification. After a few hours, I return to the site to find that the panels are turned off, email registration is turned off and the boxes for formatting verification emails, etc are blank, and half of the email settings are cleared. There may also be other configuration options being reset that I haven't found yet. I am the only administrative user on the wiki. It's also definitely not due to vandalism - exactly the same settings disappear every time, and it has now repeated itself 4 times in the last 24 hours. I'm running XEM 4.2m2 on Tomcat with MySQL. Any help would be greatly appreciated... thanks, Aaron ___ 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 ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman
Re: [xwiki-users] Registration and Layout settings resetting
I ran a flush on the cache immediately after the problem recurred, and the settings were not restored. Any other ideas? Thanks, aaron On Wed, Sep 12, 2012 at 12:46 AM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: Vincent, Thanks for the help. Answers below: Email -- Admin Email and SMTP server. The rest of the settings are maintained. What other setting remains that is not the default value? On the Email page, the Port, Server Username, and Server Password always stay - only the Admin Email and SMTP server are cleared out. Page Elements - All panel settings, reverting to zero displayed panels. Metadata visibility settings are maintained You modified those and they remain? If so the problem is not a cache issue that resets XWikiPreferences. I modified the panel settings to display two panels on the left, and no panels on the right. When the bug occurs, The show left/right panel? settings are set to -- and the Panels to Display are blank. The frequency of occurrence has dropped in the last day - at first it was happening every 15-20 minutes, and today it went most of the day with no apparent problems. The next time it occurs I will try to flush the cache and see if that sheds any light... thanks, aaron One thing you can test to ensure this: When the problem happens do a flush cache in a wiki page: {{velocity}} $xwiki.flushCache() {{/velocity}} And then verify if your settings are back. Thanks -Vincent Registration - Use Email Verification, Active Authentication Check, Validation Email Content, Confirmation Email Content. Everything else is maintained. Several entire Spaces - the wiki has a large number of spaces (~150). They seem to be getting deleted at random. I will leave the page for an hour, come back, and the link to the space homepage will have the question mark icon next to it. The space will no longer appear in the spaces list on the Dashboard. Any other ideas? I'm ready to downgrade back to 3.x - this only started happening with a fresh install of 4.2 and it's obviously a serious problem... thanks, aaron On Sun, Sep 9, 2012 at 3:17 AM, Vincent Massol vinc...@massol.net wrote: On Sep 9, 2012, at 8:11 AM, Dmitry Bakbardin haru_mamb...@mail.ru wrote: +1 vote I had the same problem until set Prevent unregistered users from editing pages, regardless of the page or space rights on. But I don't know still if it is a bug or a feature :-) It's a bug… Fixed in 4.2M3, see http://jira.xwiki.org/jira/browse/XWIKI-8160 -Vincent Kind regards, Dmitry Sun, 9 Sep 2012 01:52:12 -0400 от Ashtar Communications ashtarcommunicati...@gmail.com: Hi, It seems that my wiki is spontaneously resetting several configuration settings, most notably the registration, email, and layout settings. I enter information like the email server, address, and port, which panels to display in the sidebar, or whether to require email verification. After a few hours, I return to the site to find that the panels are turned off, email registration is turned off and the boxes for formatting verification emails, etc are blank, and half of the email settings are cleared. There may also be other configuration options being reset that I haven't found yet. I am the only administrative user on the wiki. It's also definitely not due to vandalism - exactly the same settings disappear every time, and it has now repeated itself 4 times in the last 24 hours. I'm running XEM 4.2m2 on Tomcat with MySQL. Any help would be greatly appreciated... thanks, Aaron ___ 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 ___ 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] Registration and Layout settings resetting
Vincent, Thanks for the help. Answers below: Email -- Admin Email and SMTP server. The rest of the settings are maintained. What other setting remains that is not the default value? On the Email page, the Port, Server Username, and Server Password always stay - only the Admin Email and SMTP server are cleared out. Page Elements - All panel settings, reverting to zero displayed panels. Metadata visibility settings are maintained You modified those and they remain? If so the problem is not a cache issue that resets XWikiPreferences. I modified the panel settings to display two panels on the left, and no panels on the right. When the bug occurs, The show left/right panel? settings are set to -- and the Panels to Display are blank. The frequency of occurrence has dropped in the last day - at first it was happening every 15-20 minutes, and today it went most of the day with no apparent problems. The next time it occurs I will try to flush the cache and see if that sheds any light... thanks, aaron One thing you can test to ensure this: When the problem happens do a flush cache in a wiki page: {{velocity}} $xwiki.flushCache() {{/velocity}} And then verify if your settings are back. Thanks -Vincent Registration - Use Email Verification, Active Authentication Check, Validation Email Content, Confirmation Email Content. Everything else is maintained. Several entire Spaces - the wiki has a large number of spaces (~150). They seem to be getting deleted at random. I will leave the page for an hour, come back, and the link to the space homepage will have the question mark icon next to it. The space will no longer appear in the spaces list on the Dashboard. Any other ideas? I'm ready to downgrade back to 3.x - this only started happening with a fresh install of 4.2 and it's obviously a serious problem... thanks, aaron On Sun, Sep 9, 2012 at 3:17 AM, Vincent Massol vinc...@massol.net wrote: On Sep 9, 2012, at 8:11 AM, Dmitry Bakbardin haru_mamb...@mail.ru wrote: +1 vote I had the same problem until set Prevent unregistered users from editing pages, regardless of the page or space rights on. But I don't know still if it is a bug or a feature :-) It's a bug… Fixed in 4.2M3, see http://jira.xwiki.org/jira/browse/XWIKI-8160 -Vincent Kind regards, Dmitry Sun, 9 Sep 2012 01:52:12 -0400 от Ashtar Communications ashtarcommunicati...@gmail.com: Hi, It seems that my wiki is spontaneously resetting several configuration settings, most notably the registration, email, and layout settings. I enter information like the email server, address, and port, which panels to display in the sidebar, or whether to require email verification. After a few hours, I return to the site to find that the panels are turned off, email registration is turned off and the boxes for formatting verification emails, etc are blank, and half of the email settings are cleared. There may also be other configuration options being reset that I haven't found yet. I am the only administrative user on the wiki. It's also definitely not due to vandalism - exactly the same settings disappear every time, and it has now repeated itself 4 times in the last 24 hours. I'm running XEM 4.2m2 on Tomcat with MySQL. Any help would be greatly appreciated... thanks, Aaron ___ 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 ___ 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] Registration and Layout settings resetting
Unfortunately, that does not appear to have fixed the problem. I upgraded to the most recent development snapshot, and made sure the Prevent unregistered users from editing pages with checked, and am still experiencing the same problem. Things that keep disappearing: Email -- Admin Email and SMTP server. The rest of the settings are maintained. Page Elements - All panel settings, reverting to zero displayed panels. Metadata visibility settings are maintained Registration - Use Email Verification, Active Authentication Check, Validation Email Content, Confirmation Email Content. Everything else is maintained. Several entire Spaces - the wiki has a large number of spaces (~150). They seem to be getting deleted at random. I will leave the page for an hour, come back, and the link to the space homepage will have the question mark icon next to it. The space will no longer appear in the spaces list on the Dashboard. Any other ideas? I'm ready to downgrade back to 3.x - this only started happening with a fresh install of 4.2 and it's obviously a serious problem... thanks, aaron On Sun, Sep 9, 2012 at 3:17 AM, Vincent Massol vinc...@massol.net wrote: On Sep 9, 2012, at 8:11 AM, Dmitry Bakbardin haru_mamb...@mail.ru wrote: +1 vote I had the same problem until set Prevent unregistered users from editing pages, regardless of the page or space rights on. But I don't know still if it is a bug or a feature :-) It's a bug… Fixed in 4.2M3, see http://jira.xwiki.org/jira/browse/XWIKI-8160 -Vincent Kind regards, Dmitry Sun, 9 Sep 2012 01:52:12 -0400 от Ashtar Communications ashtarcommunicati...@gmail.com: Hi, It seems that my wiki is spontaneously resetting several configuration settings, most notably the registration, email, and layout settings. I enter information like the email server, address, and port, which panels to display in the sidebar, or whether to require email verification. After a few hours, I return to the site to find that the panels are turned off, email registration is turned off and the boxes for formatting verification emails, etc are blank, and half of the email settings are cleared. There may also be other configuration options being reset that I haven't found yet. I am the only administrative user on the wiki. It's also definitely not due to vandalism - exactly the same settings disappear every time, and it has now repeated itself 4 times in the last 24 hours. I'm running XEM 4.2m2 on Tomcat with MySQL. Any help would be greatly appreciated... thanks, Aaron ___ 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 ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Use Import External Content without editor?
Hi, I'm wondering if it's possible to use the Import External Content tool (triggered by the paste button in the WYSIWYG editor) without loading the entire WYSIWYG editor. Here's what I'd like to accomplish: User is filling out an HTML form which includes a standard HTML textarea. User presses a button, the Import External Content popup appears. User pastes data from the clipboard (very likely from Microsoft Word), and clicks Import The wiki-syntax output from the importer is put into the textarea Any ideas? Thanks much, Aaron ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] WYSIWYG on demand
Marius, Thank you for the reply. The using velocity macros example doesn't work for me at all: http://extensions.xwiki.org/xwiki/bin/view/Extension/WYSIWYG+Editor+Module#HLoadondemandusingvelocitymacros I get an error on the line: #wysiwyg_inputProperty($editedDocument $editedProperty $parameters) The show source text example also doesn't work for me: http://extensions.xwiki.org/xwiki/bin/view/Extension/WYSIWYG+Editor+Module#HLoadondemandandshowsourcetext when I click the Load Editor button it just gets stuck displaying the loading animation, but the editor never finishes loading. The edit in place example works for me for a single object: http://extensions.xwiki.org/xwiki/bin/view/Extension/WYSIWYG+Editor+Module#HEditin-placeanobjectproperty Unfortunately, I can't seem to figure out how to adapt this code for multiple objects/editors on a single page. I have pages with a large number of objects, and I need to be able to edit any of them on-demand. I'm pretty sure that I need to modify the function below to loop through all objects on the page to add an edit button linked to the appropriate div ID. // Insert the edit icons and set the action for the cancel buttons. document.observe('xwiki:dom:loaded', function() { showEditIcon('$editedPropertyId'); $$('.cancel').each(function(item) { var fieldId = item.up('form').down('textarea').id; item.observe('click', function(event) { Event.stop(event); onClose(fieldId); }.bindAsEventListener(window)); }); }); I've tried adding a class to each div, and wrapping the showEditIcon call in various loops through that class (using $$ or for/in), but I can't get it to work. I probably just don't know enough javascript to get the syntax correct... Any help would be appreciated, aaron On Fri, Feb 3, 2012 at 1:54 AM, Marius Dumitru Florea mariusdumitru.flo...@xwiki.com wrote: Hi Aaron, On Wed, Feb 1, 2012 at 10:26 PM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: Does anyone have a working example of loading the WYSIWYG editor on-demand with velocity? Would love to see how you implemented it...I'm having some trouble with porting the code on the xwiki site. You mean http://extensions.xwiki.org/xwiki/bin/view/Extension/WYSIWYG+Editor+Module#HLoadondemandandshowsourcetext doesn't work? Maybe I can help. Marius Thanks, aaron ___ 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] WYSIWYG on demand
Does anyone have a working example of loading the WYSIWYG editor on-demand with velocity? Would love to see how you implemented it...I'm having some trouble with porting the code on the xwiki site. Thanks, aaron ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Attachment Download Count
Hi, This has probably been asked before, but I can't seem to find a clear answer in the archives. Is there a way to configure the statistics extension (or something else in xwiki) to keep track of how many times an attachment is downloaded? Am I stuck doing something like editing htmlheader.vm and attachmentsinline.vm to insert Google Analytics code and keeping track myself? Has anyone out there already done this? Thanks, aaron ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Corrupted WYSIWYG TextArea Property
Hi, answers are below: On Tue, Nov 22, 2011 at 11:41 PM, Marius Dumitru Florea mariusdumitru.flo...@xwiki.com wrote: Hi Aaron, On Tue, Nov 22, 2011 at 5:36 PM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: Marius, Thank you for the feedback - I will start by replacing the code for the delete button with yours, and hopefully this will avoid at least one scenario for corrupting the objects. I am confident there is another mechanism for corruption to occur, and I still don't know what it is. I am not sure whether users are pasting directly or using the paste button on the toolbar, but I suspect that the vast majority are just pasting directly. I can try and encourage them to use the toolbar, but I am sure that many will continue to just paste directly and click save... I have included the errors from the server log below - I do not know whether or not these HTML rendering errors are directly tied to the corruption or are a byproduct. That is, I can only reliably reproduce the html rendering error on pages which already contain corrupted objects. I will continue to do my best to come up with a consistent way to reproduce the corruption error. The HTML rendering error seems totally random - for example, the below errors are from a page which contains already corrupted objects, where if I go to Inline mode and then immediately press Save and View it gives me the HTML rendering error ~75% of the time. The listed object number in the error also changes each time, seemingly at random - sometimes it is one object, sometimes two. And the other 25% of the time, the page saves as normal with no errors. I am doing nothing except clicking the button repeatedly - there is no other change. I do not know much about what the logs below are telling me...When the error occurs, I see two separate events in Lilith: ***EVENT 1** Message: Can't find descriptor for the component [role = [org.xwiki.rendering.renderer.PrintRendererFactory] hint = [default]] This can happen only if the syntax parameter passed to DefaultHTMLConverter.fromHTML(html, syntax) is null. Since ConversionFilter takes the syntax from a request parameter we can deduce that the syntax parameter is missing from the request. At the same time though the RequiresHTMLConversion parameter must be present on the request because otherwise the HTML converter wouldn't be called. So this log suggests that the request has RequiresHTMLConversion=yourTextAreaField but misses yourTextAreaField_syntax=xwiki/2.0. I find this very strange because the WYSIWYG editor adds both parameters almost at the same time, in two consecutive lines of code, and the JavaScript execution can't be stopped by user action like clicking on a button. Anyway, I don't recommend clicking on the Save buttons before the WYSIWYG editor is fully loaded. On some of the pages, there are a large number of objects (20-30+), which means that it frequently takes awhile in Inline mode for all the WYSIWYG editors to load. It is certainly possible sometimes for a user to click save before the editors are finished loading. However, I am still getting the exception on occasion after the page is definitely loaded - such as waiting an hour to click save. One option that might help is if there was a way to display the WYSIWYG editor for only a single object at a time - this would reduce load times on pages with a large number of objects. Is there a convenient way to do this? Since I am using $doc.display in a loop to display all the objects on the page, Inline mode triggers editors for all of them simultaneously - but the object editor only displays the editors as plain text. Do you have any other ideas for what would result in a null parameter being passed? For example, is there a particular kind of content in the textbox that could cause this? I will continue to do my best to come up with a sequence that results in the actual corruption so that hopefully someone else can reproduce it. Logger: org.xwiki.wysiwyg.server.internal.converter.DefaultHTMLConverter Call Location: org.xwiki.wysiwyg.server.internal.converter.DefaultHTMLConverter.fromHTML(DefaultHTMLConverter.java:123) Call Stack: at org.xwiki.wysiwyg.server.internal.converter.DefaultHTMLConverter.fromHTML(DefaultHTMLConverter.java:123) at org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:117) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210
Re: [xwiki-users] Corrupted WYSIWYG TextArea Property
(ApplicationFilterChain.java:210) [catalina.jar:7.0.20] at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112) [xwiki-platform-container-servlet-3.1.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) [catalina.jar:7.0.20] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [catalina.jar:7.0.20] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224) [catalina.jar:7.0.20] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) [catalina.jar:7.0.20] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) [catalina.jar:7.0.20] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) [catalina.jar:7.0.20] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) [catalina.jar:7.0.20] at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929) [catalina.jar:7.0.20] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) [catalina.jar:7.0.20] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405) [catalina.jar:7.0.20] at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:261) [tomcat-coyote.jar:7.0.20] at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515) [tomcat-coyote.jar:7.0.20] at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1773) [tomcat-coyote.jar:7.0.20] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [na:1.6.0_26] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.6.0_26] at java.lang.Thread.run(Unknown Source) [na:1.6.0_26] **END EVENT 2* aaron On Tue, Nov 22, 2011 at 12:40 AM, Marius Dumitru Florea mariusdumitru.flo...@xwiki.com wrote: On Mon, Nov 21, 2011 at 10:37 PM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: Marius, Thank you for the response. Answers to your questions follow. On Mon, Nov 21, 2011 at 12:06 AM, Marius Dumitru Florea mariusdumitru.flo...@xwiki.com wrote: Hi Aaron, On Fri, Nov 18, 2011 at 11:37 PM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: Hi, I am having difficulty locating the source of an error where the contents of a TextArea property for a custom class object on a page ends up rendering in a WYSIWYG box as wiki syntax (as in, displaying the actual code in one long paragraph). Corrupt is probably not the right word for this, as I'm sure it's something I'm doing wrong... Simple explanation: 1) User clicks a button to add a new instance of a class to the page, which also enters the Inline Editing mode. User pastes content into a WYSIWYG editor and saves the page. After save, the TextArea property shows up correctly in view mode with $doc.display(), with headings, formatting, etc... 2) Something happens - I cannot yet reproduce it, but I'm sure the user is doing something. 3) The object starts displaying the property as a single block of text with embedded wiki syntax, mostly what looks like custom parameters containing the formatting info, such as: (% class=MsoNoSpacing %) (% class=tagChar style=font-size: 12pt; %) Is this the text displayed in view mode or the value of the TextArea property as seen when editing the page with the Object editor? I'd like to know the value from the Object editor. It is both. In view mode, $doc.display() returns one long paragraph of text with wiki syntax embedded but no line breaks. Viewing the object in the object editor, the box renders the WYSIWYG data as a plain text box with the same long paragraph - but with a large number of ~ escape characters which do not appear in view mode. This is an important detail. It looks like the WYSIWYG editor is submitting wiki syntax instead of HTML, but I don't see how can this happen because the editor converts the input wiki syntax into HTML before it is loaded and overwrites the value of the replaced plain text area. So if you see the content properly rendered inside the rich text area then you know that the editor will output HTML and not wiki syntax when you save the page. For objects which are not corrupted the WYSIWYG data appears in the object editor as wiki syntax with parameters, but with no escape characters and embedded line breaks - these objects look fine when in view mode. etc... Even in inline edit mode, the contents of the WYSIWYG box have been replaced with this block of code, which does not appear with the actual formatting - just the raw code. Looking into the page history, there is a version of the page saved right before
Re: [xwiki-users] Corrupted WYSIWYG TextArea Property
Marius, Thank you for the response. Answers to your questions follow. On Mon, Nov 21, 2011 at 12:06 AM, Marius Dumitru Florea mariusdumitru.flo...@xwiki.com wrote: Hi Aaron, On Fri, Nov 18, 2011 at 11:37 PM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: Hi, I am having difficulty locating the source of an error where the contents of a TextArea property for a custom class object on a page ends up rendering in a WYSIWYG box as wiki syntax (as in, displaying the actual code in one long paragraph). Corrupt is probably not the right word for this, as I'm sure it's something I'm doing wrong... Simple explanation: 1) User clicks a button to add a new instance of a class to the page, which also enters the Inline Editing mode. User pastes content into a WYSIWYG editor and saves the page. After save, the TextArea property shows up correctly in view mode with $doc.display(), with headings, formatting, etc... 2) Something happens - I cannot yet reproduce it, but I'm sure the user is doing something. 3) The object starts displaying the property as a single block of text with embedded wiki syntax, mostly what looks like custom parameters containing the formatting info, such as: (% class=MsoNoSpacing %) (% class=tagChar style=font-size: 12pt; %) Is this the text displayed in view mode or the value of the TextArea property as seen when editing the page with the Object editor? I'd like to know the value from the Object editor. It is both. In view mode, $doc.display() returns one long paragraph of text with wiki syntax embedded but no line breaks. Viewing the object in the object editor, the box renders the WYSIWYG data as a plain text box with the same long paragraph - but with a large number of ~ escape characters which do not appear in view mode. For objects which are not corrupted the WYSIWYG data appears in the object editor as wiki syntax with parameters, but with no escape characters and embedded line breaks - these objects look fine when in view mode. etc... Even in inline edit mode, the contents of the WYSIWYG box have been replaced with this block of code, which does not appear with the actual formatting - just the raw code. Looking into the page history, there is a version of the page saved right before the property becomes corrupt. So something must be happening to trigger the conversion of the TextArea content into wiki syntax, which then gets saved over the original data. The pages the user is using have multiple objects of the same class, all displaying their TextArea properties in a table. The majority of the time, it displays perfectly. This only applies to some objects on the page - though sometimes all objects on a page will simultaneously exhibit this behavior. The pages also contain buttons to create a new object, as well as a button to delete each object individually. I have one reliable method of producing this error. I used to have the delete this object button display while in Inline Edit mode - clicking it while in that mode would cause to entry to convert. I How can the deleted object become corrupted? I suppose you are referring to the other objects of the same type from the same page. Which one gets corrupted? All? Always all? When in Inline mode, clicking on the delete button fails to delete the object. Instead, it just returns me to view mode with the object still present. Clicking on the delete button in view mode will successfully delete the object, however. I have seen all the objects on the page become corrupted simultaneously, but it is not always all. On some pages, there are several dozen objects, but only 1 or 2 will be corrupted at a time. suppressed the button from displaying unless in view mode, which removed this cause of the error - but there is still some other mechanism for generating the same behavior. Here's an example of the delete button code which I can use to cause similar behavior: #set($delurl = /xwiki/wiki/$doc.getWiki()/objectremove/$doc.getSpace()/$doc.getName()?classname=Sandbox.TestClassclassid=$obj.getNumber()xredirect=$doc.getURL()) Unrelated to your problem, you should never build the URL manually. Use instead $doc.getURL($actionName, $queryString). Thank you, this is good to know. input type=image onclick=location.href='$delurl' value=Delete title=Delete style=float:right; src=/xwiki/resources/icons/silk/cross.gif / Any ideas on what's happening? What do you mean when you say that the entry is converted when you click on the delete button. AFAICS the delete button doesn't submit the inline form (so any changes will be lost) and it redirects to view mode after the object is deleted. Are you saying that the TextArea properties are corrupted as soon as you end up in view mode after the object has been removed? If so, then you should see in the history that the revision that deleted the object also modified the TextArea properties. I doubt
[xwiki-users] Corrupted WYSIWYG TextArea Property
Hi, I am having difficulty locating the source of an error where the contents of a TextArea property for a custom class object on a page ends up rendering in a WYSIWYG box as wiki syntax (as in, displaying the actual code in one long paragraph). Corrupt is probably not the right word for this, as I'm sure it's something I'm doing wrong... Simple explanation: 1) User clicks a button to add a new instance of a class to the page, which also enters the Inline Editing mode. User pastes content into a WYSIWYG editor and saves the page. After save, the TextArea property shows up correctly in view mode with $doc.display(), with headings, formatting, etc... 2) Something happens - I cannot yet reproduce it, but I'm sure the user is doing something. 3) The object starts displaying the property as a single block of text with embedded wiki syntax, mostly what looks like custom parameters containing the formatting info, such as: (% class=MsoNoSpacing %) (% class=tagChar style=font-size: 12pt; %) etc... Even in inline edit mode, the contents of the WYSIWYG box have been replaced with this block of code, which does not appear with the actual formatting - just the raw code. Looking into the page history, there is a version of the page saved right before the property becomes corrupt. So something must be happening to trigger the conversion of the TextArea content into wiki syntax, which then gets saved over the original data. The pages the user is using have multiple objects of the same class, all displaying their TextArea properties in a table. The majority of the time, it displays perfectly. This only applies to some objects on the page - though sometimes all objects on a page will simultaneously exhibit this behavior. The pages also contain buttons to create a new object, as well as a button to delete each object individually. I have one reliable method of producing this error. I used to have the delete this object button display while in Inline Edit mode - clicking it while in that mode would cause to entry to convert. I suppressed the button from displaying unless in view mode, which removed this cause of the error - but there is still some other mechanism for generating the same behavior. Here's an example of the delete button code which I can use to cause similar behavior: #set($delurl = /xwiki/wiki/$doc.getWiki()/objectremove/$doc.getSpace()/$doc.getName()?classname=Sandbox.TestClassclassid=$obj.getNumber()xredirect=$doc.getURL()) input type=image onclick=location.href='$delurl' value=Delete title=Delete style=float:right; src=/xwiki/resources/icons/silk/cross.gif / Any ideas on what's happening? Thanks much, aaron ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] TOC Macro question
Marius, Thank you for the syntax fixes. Your changes work perfectly - I forgot that each item would have the same HTML id if displayed twice. The only problem I am now having is that the TOC macro still seems to not pick up the wiki headings contained in the objects property when using $doc.display. If I add an object with a TextArea property containing wiki syntax, like: =Heading1= ==Heading2== ===Heading3=== Then: {{velocity}} $doc.display('textarea', $doc.getObject('Sandbox.TestClass', 0)) {{toc /}} {{/velocity}} The wiki syntax displays just fine, but the TOC macro doesn't display anything. Is this expected behavior, or am I missing a way to have the TOC macro pick up these headings? Thank you, aaron On Wed, Nov 16, 2011 at 12:51 AM, Marius Dumitru Florea mariusdumitru.flo...@xwiki.com wrote: Hi Aaron, See my comments below, On Sat, Nov 12, 2011 at 7:58 PM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: Marius, I successfully reproduced the steps you followed on XEM 3.1 - $context.getEditorWysiwyg() is being correctly evaluated while in inline mode. However, when the textbox is displayed as part of the non-html table, it still does not render as WYSIWYG. When I follow your steps here, viewing the page as normal just prints the text $context.getEditorWysiwyg() on the page. However, when I switch to inline mode, this changes to: Sandbox.TestClass_0_description This is the expected behavior. On the test Sandbox page, the text box then displays correctly as WYSIWYG. However, when I try this same thing on the page with the table, it doesn't work. When in Inline mode, $context.getEditorWysiwyg() still displays: Sandbox.TestClass_0_description,Sandbox.TestClass_1_description,Sandbox.TestClass_2_description So you added multiple objects of type Sandbox.TestClass to your page. etc... However, the box being displayed in the table still appears as plain text. Try the following code on the same Sandbox page with the TestClass. {{velocity}} $xwiki.jsfx.use(js/xwiki/table/tablefilterNsort.js) $xwiki.ssfx.use(js/xwiki/table/table.css) {{html}} table id=Table1 class=grid sortable doOddEven tr class=sortHeaderthHeader/th/tr trtd$doc.display('description')/td/tr {{/html}} You forgot the closing /table tag which makes the HTML invalid. By default HTML macro cleans its content and if the content is not valid then the result is sometimes unexpected. Also, the $doc.display call outputs wiki syntax (an HTML macro) so you have to add wiki=true to the outer HTML macro in order for it to be rendered properly. (% class=grid sortable doOddEven id=Table2 %)(% class=sortHeader %)|=Header|$doc.display('description') {{toc /}} This needs to be formated properly. ToC macro can't be displayed inline. $context.getEditorWysiwyg(){{/velocity}} For me, this produces two tables. The top table displays a WYSIWG box (two, actually, which is strange). The bottom table displays a PlainText box. The reason is simple: you display the same property of the same object twice, which means you'll have two text areas with the same ID in your page which (1) makes your page HTML-invalid and (2) makes the WYSIWYG editor enhance twice the first text area. I changed your code to: --8-- {{velocity}} $xwiki.jsfx.use(js/xwiki/table/tablefilterNsort.js) $xwiki.ssfx.use(js/xwiki/table/table.css) {{html wiki=true}} table id=Table1 class=grid sortable doOddEven tr class=sortHeaderthHeader/th/tr trtd$doc.display('description', $doc.getObject('Sandbox.TestClass', 0))/td/tr /table {{/html}} (% class=grid sortable doOddEven id=Table2 %)(% class=sortHeader%) |=Header |$doc.display('description', $doc.getObject('Sandbox.TestClass', 1)) {{toc /}} $context.getEditorWysiwyg() {{/velocity}} --8-- and the WYSIWYG editor is loaded for both text areas. Additionally, when there's wiki syntax in the content of the TextBox, it is not being picked up by the TOC macro. I don't think the ToC macro looks for headings inside tables. I think it picks only the headings that are direct children of the xwikicontent DIV (in view mode). Hope this helps, Marius So, it appears that this is somehow related to the table? aaron On Thu, Nov 10, 2011 at 11:39 PM, Marius Dumitru Florea mariusdumitru.flo...@xwiki.com wrote: Hi Aaron, I did the following test with XWiki Enterprise 3.2 and it worked: 1. I created a class Sandbox.TestClass with just one field of type TextArea, setting the Editor property to Wysiwyg (from class edit mode). 2. I added an object of type Sandbox.TestClass to the same page and put some text in the text area (from object edit mode). 3. I set the content of the Sandbox.TestClass page to (from wiki edit mode) --8-- {{velocity}} $doc.display('description') $context.getEditorWysiwyg() {{/velocity}} --8-- 4. I edited Sandbox.TestClass in Inline form
Re: [xwiki-users] TOC Macro question
Marius, I successfully reproduced the steps you followed on XEM 3.1 - $context.getEditorWysiwyg() is being correctly evaluated while in inline mode. However, when the textbox is displayed as part of the non-html table, it still does not render as WYSIWYG. When I follow your steps here, viewing the page as normal just prints the text $context.getEditorWysiwyg() on the page. However, when I switch to inline mode, this changes to: Sandbox.TestClass_0_description On the test Sandbox page, the text box then displays correctly as WYSIWYG. However, when I try this same thing on the page with the table, it doesn't work. When in Inline mode, $context.getEditorWysiwyg() still displays: Sandbox.TestClass_0_description,Sandbox.TestClass_1_description,Sandbox.TestClass_2_description etc... However, the box being displayed in the table still appears as plain text. Try the following code on the same Sandbox page with the TestClass. {{velocity}} $xwiki.jsfx.use(js/xwiki/table/tablefilterNsort.js) $xwiki.ssfx.use(js/xwiki/table/table.css) {{html}} table id=Table1 class=grid sortable doOddEven tr class=sortHeaderthHeader/th/tr trtd$doc.display('description')/td/tr {{/html}} (% class=grid sortable doOddEven id=Table2 %)(% class=sortHeader %)|=Header|$doc.display('description') {{toc /}} $context.getEditorWysiwyg(){{/velocity}} For me, this produces two tables. The top table displays a WYSIWG box (two, actually, which is strange). The bottom table displays a PlainText box. Additionally, when there's wiki syntax in the content of the TextBox, it is not being picked up by the TOC macro. So, it appears that this is somehow related to the table? aaron On Thu, Nov 10, 2011 at 11:39 PM, Marius Dumitru Florea mariusdumitru.flo...@xwiki.com wrote: Hi Aaron, I did the following test with XWiki Enterprise 3.2 and it worked: 1. I created a class Sandbox.TestClass with just one field of type TextArea, setting the Editor property to Wysiwyg (from class edit mode). 2. I added an object of type Sandbox.TestClass to the same page and put some text in the text area (from object edit mode). 3. I set the content of the Sandbox.TestClass page to (from wiki edit mode) --8-- {{velocity}} $doc.display('description') $context.getEditorWysiwyg() {{/velocity}} --8-- 4. I edited Sandbox.TestClass in Inline form edit mode (/xwiki/bin/edit/Sandbox/TestClass?editor=inline). The WYSIWYG editor was loaded and below it I could see Sandbox.TestClass_0_description. As you can see I didn't use the HTML macro, just the Velocity one. I don't understand why it works in your case with the HTML macro and not without it. Are you sure you're using the Inline form edit mode? Note that $doc.display method call outputs the same thing, a plain HTML text area, no matter what editor you set in the class field definition or in your user preferences. The difference comes from the fact that when the editor is set to Wysiwyg the field identifier (e.g. Sandbox.TestClass_0_description) is added (by $doc.display) to a list that can be retrieved with $context.getEditorWysiwyg(). The code that actually loads the WYSIWYG editor is in textarea_wysiwyg.vm template (included in editinline.vm template used by Inline form edit mode), which iterates the list returned by $context.getEditorWysiwyg() and replaces the specified fields with the WYSIWYG editor. If in your case $context.getEditorWysiwyg() is not evaluated (you put it inside the Velocity macro right? and after all $doc.display calls) then it's not surprising that no WYSIWYG editor is loaded. Hope this helps, Marius On Tue, Nov 8, 2011 at 2:26 PM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: Thomas, Putting the line: $context.getEditorWysiwyg() in my sheet just results in that text being displayed on the page. Do I need to do something else to have that picked up by velocity? I'm sure I'm missing some obvious syntax ...it's late...:) The WYSIWYGText property has the default editor set to WYSIWYG, the PlainText property has it set to the plain text editor (obviously). Using the HTML macro, the WYSIWYG editor appears for that property - using wiki syntax, both show up as the Plain Text editor. The code I am using is below: {{velocity}} ##Includes for mktree$xwiki.jsfx.use('js/mktree/mktree.js')$xwiki.ssfx.use('js/mktree/mktree.css', true) ##Includes for table sort$xwiki.jsfx.use(js/xwiki/table/tablefilterNsort.js)$xwiki.ssfx.use(js/xwiki/table/table.css) ##Include for Entry Class CSS$xwiki.ssfx.use('css/entryclass.css', true) #set($objs = $doc.getObjects('Admin.EntryClass')) #set($action = $xcontext.getAction()) (% class=grid sortable doOddEven id=Entry Table %) (% class=sortHeader %)|=#|=Entry|=Entry Date #foreach($entry in $objs) |$doc.display(SortOrder, $entry)|((( (% class=mktree name=tree %) * ((( (% class=title %) =$doc.display(Title, $entry)= ))) ** ((( #if($action != view
Re: [xwiki-users] RESTful API to create a new object of custom class?
Thank you both very much! Your suggestions worked perfectly... aaron On Mon, Nov 7, 2011 at 8:25 AM, Fabio Mancinelli fabio.mancine...@xwiki.com wrote: Hi, you were almost there :) Your request has two things that were wrong: 1) A text/plain content type instead of application/xml 2) The URI for POSTing new object is /wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/objects (and not /wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/objects/{className}) ...And your XML is missing the className element which will tell the REST API what class has to be used. So to sum up, imagine that you want to create on the page Test.Test a new object of the class XWiki.TestClass, supposing that the class has a Text property (like in your example) So you have to do the following: $ curl -u Admin:admin -X POST -H Content-type: application/xml -H Accept: application/xml -d @test.xml http://localhost/xwiki/rest/wikis/xwiki/spaces/Test/pages/Test/objects where test.xml is: object xmlns=http://www.xwiki.org; classNameXWiki.TestClass/className property name=Text valueWhatever you want to put here/value /property /object Alternatively you can use the less verbose application/x-www-form-urlencoded format: $ curl -u Admin:admin -X POST -H Content-type: application/x-www-form-urlencoded -H Accept: application/xml -d @test.txt http://localhost/xwiki/rest/wikis/xwiki/spaces/Test/pages/Test/objects where test.txt contains something like: className=XWiki.TestClassproperty#Test=Whatever+you+want. Or, better, you can use directly curl to specify these parameters using multiple -d switches: $ curl -u Admin:admin -X POST -H Content-type: application/x-www-form-urlencoded -H Accept: application/xml -d className=XWiki.TestClass -d property#Test=Whatever you want http://localhost/xwiki/rest/wikis/xwiki/spaces/Test/pages/Test/objects The advantage of the second approach is that curl will take care of url-encode your content, while if you send a file you are responsible for this. Now some remarks: 1) In the application/x-www-form-urlencoded format the property# is a standard immutable prefix that is used to distinguish attributes referring to properties from the attributes referring to the object. For example if we had className=XYZText=FOO we would have had an ambiguity on className because we couldn't understand if className is a property of the object to be set to XYZ or an attribute that describes the object itself (i.e., its metadata like the className). By having the property# prefix this ambiguity is resolved. 2) The information you get back when you retrieve an object (i.e., all the attribute elements) are useful when clients need to understand the type of data contained in an object (e.g., when they want to display it). They are not necessary when creating an object because the system already has this information. That's why the XML to be sent is smaller. Actually the only information needed is the className and a set of property name=...value elements. 3) How do you know what kind of information you can send with the XML? You can discover it by using the class description URI. If you go to http://localhost:8080/xwiki/rest/wikis/xwiki/classes you will get a list of all the classes defined in the Wiki. By looking at this you will understand what are the properties defined by each class, their types and attributes. In that way you will know what you're allowed to put in the propertyvalue elements of the XML you send. Hope this answers your questions. -Fabio On Sat, Nov 5, 2011 at 9:46 AM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: Hi, Is it possible to create a new object of a custom class using the RESTful API? The documentation page only lists the following POST method, which doesn't accept a class name: /wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/objects[?start=offsetnumber=n] I have tried things like the following: curl -u Admin:admin -X POST -H Content-type: text/plain -H Accept: application/xml -d @test.xml http://localhost/xwiki/rest/wikis/xwiki/spaces/Test/pages/Test/objects/XWiki.TestClass Where test.xml contains some variation on: ?xml version=1.0 encoding=UTF-8 standalone=yes? properties xmlns=http://www.xwiki.org; property type=com.xpn.xwiki.objects.classes.TextAreaClass name=Text attribute value=Text name=name/ attribute value=Test name=prettyName/ attribute value=0 name=unmodifiable/ attribute value=0 name=disabled/ attribute value=100 name=size/ attribute value=10 name=rows/ attribute value= name=customDisplay/ attribute value=Text name=editor/ attribute value=6 name=number/ attribute value=0 name=picker/ attribute value= name=validationMessage/ attribute value= name=validationRegExp/ value This is some text. /value /properties Curl returns this: html head titleStatus page/title /head body h3The method specified in the request is not allowed
Re: [xwiki-users] TOC Macro question
Thomas, Thank for very much for your suggestion. The group syntax was exactly what I needed. However, I am still having some trouble with getting the TOC macro to correctly pick up wiki syntax rendered with $doc.display() that is contained in an object's property. I have also noticed that using wiki syntax instead of html, $doc.display seems to behave differently and overrides the default editor setting. Here is my example - I am using wiki syntax similar to the following (simplified for example's sake): START CODE (% class=grid sortable doOddEven id=Table %) (% class=sortHeader %)|=Field 1|=Field 2 |Data 1|((( (% class=mktree name=tree %) * ((( =$doc.display(String, $object)= ))) ** ((( $doc.display(TextArea, $object) ))) ))) {{toc /}} END CODE The TextArea property contains a large quantity of text formatted in xwiki syntax. The display works just fine - the contents of the property render correctly and display in the table. Two problems: 1) The TOC macro only recognizes the String property that I manually enclose in = Heading 1 syntax. It doesn't seem to be picking up the wiki syntax contained in the object properties. So if I had 3 objects on the page, I get: *String 1 *String 2 *String 3 Instead of: *String 1 **Heading 2 from TextArea** **Heading 2 from TextArea** *String 2 Etc I'm afraid I don't know very much about the order of macro rendering or whether it is even possible to accomplish what I am describing... 2) When I use the Inline editing mode, another TextArea property of the object (not shown in the code above) does not show up with the WYSIWYG editor, even though it is set as the default editor. When using the {{html}} macro and code like this: li$doc.display(TextAreaWYSIWYG, $object)/li The property correctly displays in Inline mode with the WYSIWYG editor. Now that I am using only wiki syntax to display the table, all TextArea properties show up in the Plain Text editor, regardless of their default setting. Am I doing something wrong? Many thanks for all of the help, I have made very significant progress on my project thanks to this list... aaron On Sun, Oct 23, 2011 at 1:50 AM, Thomas Mortagne thomas.morta...@xwiki.com wrote: On Sun, Oct 23, 2011 at 12:27 AM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: Thank you for the feedback - I have been playing with passing custom parameters, and have a few additional clarification questions. It seems that I need to use pure wiki syntax if I want the TOC macro to work right. I am currently relying on the {{html}} macro for two things which I can't figure out how to replace with custom parameters: 1) Nested ul's - I can only get the custom parameter to apply to one line, and can't figure out how to nest another ul. Something like this: (% class=mktree name=tree %) * $doc.display(Title, $obj) velocity code, including an {{html}} block to create an input element **Additional parts of tree ***Additional parts of tree Just returns two different ul's, only the first one of which has the custom parameter. Is this because the additional lines of code before continuing the tree forces the rendering engine to close the first ul? Any way to override that? Here is an example of wiki syntax with custom parameters on each ul: (% param=value %) * toto (% param2=value2 %) ** titi but custom parameters on li is not supported yet. 2) Table Sorter - Unfortunately, the whole set of object display code is wrapped in an {{html}} macro because I am using the old Table Sorter extension code. This is because I want to display multiple properties from each object in a single table cell. Looking at the Live Table macro, it seems that it only supports binding a table to a class and then setting a column to display a single property - where I need a single cell to include multiple properties displayed using custom code. Accomplishing this using the html syntax is simple - I can include an arbitrary amount of code in each td tag. To use wiki syntax for a sortable table, the XWiki Syntax document says I should use this: (% class=grid sortable filterable doOddEven id=tableid %) (% class=sortHeader %)|=Title 1|=Title 2 |Cell 11|Cell 12 |Cell 21|Cell 22 This creates the table fine - but I can't figure out how to include additional multi-line code in a single cell. As soon as I put in a new line, etc...it closes the table. Is there any way to accomplish this using wiki syntax? Should I be trying to use LiveTable instead somehow? You can put as many lines you want without closing the table but it's closed by an empty line. If you need to have several paragraphs you can use group syntax (http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax#HGroups) as in (% class=grid sortable filterable doOddEven id=tableid %) (% class=sortHeader %)|=Title 1|=Title 2 |Cell 11|((( Cell 12 with several paragraphs )))|Cell
Re: [xwiki-users] TOC Macro question
Thomas, Putting the line: $context.getEditorWysiwyg() in my sheet just results in that text being displayed on the page. Do I need to do something else to have that picked up by velocity? I'm sure I'm missing some obvious syntax ...it's late...:) The WYSIWYGText property has the default editor set to WYSIWYG, the PlainText property has it set to the plain text editor (obviously). Using the HTML macro, the WYSIWYG editor appears for that property - using wiki syntax, both show up as the Plain Text editor. The code I am using is below: {{velocity}} ##Includes for mktree$xwiki.jsfx.use('js/mktree/mktree.js')$xwiki.ssfx.use('js/mktree/mktree.css', true) ##Includes for table sort$xwiki.jsfx.use(js/xwiki/table/tablefilterNsort.js)$xwiki.ssfx.use(js/xwiki/table/table.css) ##Include for Entry Class CSS$xwiki.ssfx.use('css/entryclass.css', true) #set($objs = $doc.getObjects('Admin.EntryClass')) #set($action = $xcontext.getAction()) (% class=grid sortable doOddEven id=Entry Table %) (% class=sortHeader %)|=#|=Entry|=Entry Date #foreach($entry in $objs) |$doc.display(SortOrder, $entry)|((( (% class=mktree name=tree %) * ((( (% class=title %) =$doc.display(Title, $entry)= ))) ** ((( #if($action != view) WYSIWYG: #end $doc.display(WYSIWYGText, $entry) ))) ** ((( #if($action != view) Plain Text: #end $doc.display(PlainText, $entry) ))) )))|$doc.display(EntryDate, $entry) #end {{toc /}} {{/velocity}} thanks, aaron On Tue, Nov 8, 2011 at 2:37 AM, Marius Dumitru Florea mariusdumitru.flo...@xwiki.com wrote: Hi Aaron, On Tue, Nov 8, 2011 at 12:08 PM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: Thomas, Thank for very much for your suggestion. The group syntax was exactly what I needed. However, I am still having some trouble with getting the TOC macro to correctly pick up wiki syntax rendered with $doc.display() that is contained in an object's property. I have also noticed that using wiki syntax instead of html, $doc.display seems to behave differently and overrides the default editor setting. Here is my example - I am using wiki syntax similar to the following (simplified for example's sake): START CODE (% class=grid sortable doOddEven id=Table %) (% class=sortHeader %)|=Field 1|=Field 2 |Data 1|((( (% class=mktree name=tree %) * ((( =$doc.display(String, $object)= ))) ** ((( $doc.display(TextArea, $object) ))) ))) {{toc /}} END CODE The TextArea property contains a large quantity of text formatted in xwiki syntax. The display works just fine - the contents of the property render correctly and display in the table. Two problems: 1) The TOC macro only recognizes the String property that I manually enclose in = Heading 1 syntax. It doesn't seem to be picking up the wiki syntax contained in the object properties. So if I had 3 objects on the page, I get: *String 1 *String 2 *String 3 Instead of: *String 1 **Heading 2 from TextArea** **Heading 2 from TextArea** *String 2 Etc I'm afraid I don't know very much about the order of macro rendering or whether it is even possible to accomplish what I am describing... 2) When I use the Inline editing mode, another TextArea property of the object (not shown in the code above) does not show up with the WYSIWYG editor, even though it is set as the default editor. When using the {{html}} macro and code like this: li$doc.display(TextAreaWYSIWYG, $object)/li The property correctly displays in Inline mode with the WYSIWYG editor. Now that I am using only wiki syntax to display the table, all TextArea properties show up in the Plain Text editor, regardless of their default setting. Am I doing something wrong? Can you paste the code that doesn't work? (i.e. without using the HTML macro). Also, can you print this: $context.getEditorWysiwyg() at the end of your sheet. It will display a comma-separated list of field IDs that require WYSIWYG editing. Are your fields listed there when editing in Inline mode? Hope this helps, Marius Many thanks for all of the help, I have made very significant progress on my project thanks to this list... aaron On Sun, Oct 23, 2011 at 1:50 AM, Thomas Mortagne thomas.morta...@xwiki.com wrote: On Sun, Oct 23, 2011 at 12:27 AM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: Thank you for the feedback - I have been playing with passing custom parameters, and have a few additional clarification questions. It seems that I need to use pure wiki syntax if I want the TOC macro to work right. I am currently relying on the {{html}} macro for two things which I can't figure out how to replace with custom parameters: 1) Nested ul's - I can only get the custom parameter to apply to one line, and can't figure out how to nest another ul. Something like this: (% class=mktree name=tree %) * $doc.display(Title, $obj) velocity code, including an {{html
[xwiki-users] RESTful API to create a new object of custom class?
Hi, Is it possible to create a new object of a custom class using the RESTful API? The documentation page only lists the following POST method, which doesn't accept a class name: /wikis/{wikiName}/spaces/{spaceName}/pages/{pageName}/objects[?start=offsetnumber=n] I have tried things like the following: curl -u Admin:admin -X POST -H Content-type: text/plain -H Accept: application/xml -d @test.xml http://localhost/xwiki/rest/wikis/xwiki/spaces/Test/pages/Test/objects/XWiki.TestClass Where test.xml contains some variation on: ?xml version=1.0 encoding=UTF-8 standalone=yes? properties xmlns=http://www.xwiki.org; property type=com.xpn.xwiki.objects.classes.TextAreaClass name=Text attribute value=Text name=name/ attribute value=Test name=prettyName/ attribute value=0 name=unmodifiable/ attribute value=0 name=disabled/ attribute value=100 name=size/ attribute value=10 name=rows/ attribute value= name=customDisplay/ attribute value=Text name=editor/ attribute value=6 name=number/ attribute value=0 name=picker/ attribute value= name=validationMessage/ attribute value= name=validationRegExp/ value This is some text. /value /properties Curl returns this: html head titleStatus page/title /head body h3The method specified in the request is not allowed for the resource identifi ed by the request URI/h3pYou can get technical details a href=http://www.w 3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6here/a.br Please continue your visit at our a href=/home page/a. /p /body /html Simpler syntax without the XML file still fails for me. In fact, I can't seem to even get the basic create object method to work, even without the class. For example: curl -u Admin:admin -X POST http://localhost/xwiki/rest/wikis/xwiki/spaces/Test/pages/Test/objects Just comes back with a malformed syntax error. Is there an example anywhere of how to do this? Thank you, Aaron ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Rendering error
Hi, I am experiencing an error where data saved in properties of attached objects to a page seems to be displaying incorrectly, and seemingly at random. I have a custom class defined with multiple properties, including a TextArea with the editor set to WYSIWYG. Users create new objects of this class attached to a page, and paste various information into the WYSIWYG box in inline edit mode, usually from Microsoft Word. The properties of each object are then displayed on the page in view mode, including the TextArea. This works correctly a high percentage of the time - the text pasted from Word correctly displays after the WYSIWYG editor converts it to wiki syntax. However - on occasion, when you look at the page, the content of that property displays as one long paragraph, with embedded xwiki syntax code that is displaying as code rather than rendering into html. This appears to be destructive - once an object starts displaying in this fashion, I can't get it to go back to displaying correctly. Whether in view mode or in the wysiwyg editor, there is just a block of text with wiki syntax and no line breaks. As an example: 1) User clicks a button to add a new object to the page, and is taken to edit mode 2) User pastes text from Word with embedded heading and style info into the WYSIWYG editor in inline mode, then saves 3) The page then displays the object in view mode - it appears with correctly rendered headings, which have been translated from Word into wiki syntax, opaquely to the user 4) After a while, the user goes back to the page and sees the object displaying as: (% style=border: 3pt solid windowtext; padding: 1pt 4pt; %) ((( = HEADING 1 = ))) (% class=MsoNormal %) == HEADING 2 == Heading 4 text (% class=MsoNormal %) (% class=StyleStyleBold12pt style=font-size: 13pt; %)text(%%)more text text text (% class=StyleStyleBold12pt style=font-size: 13pt; %)7-28(%%)even more text, text, text(% class=MsoNormal %) Etc...etc...etc... for pages at a time of wiki syntax with no line breaks. Going back to inline edit mode, the same text appears in the WYSIWYG editor. This is a serious problem for me, since users are inputting lots of data, seeing it display correctly, and coming back later to find their data completely unreadable. Does anyone have any idea what's going on or how to fix it? Thanks, Aaron ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Rendering error
Additional info: The change in the page is recorded in the version history - so it is at least possible to rollback to a previous version of the page. This must mean the user is doing *something* to result in all the objects being corrupted, but I can't replicate this on my own. One version, everything is fine - the next version of the page, it's wrong. Comparing the versions just shows all the properly rendered text crossed out, replaced with the wiki-syntax mess. thanks, aaron On Wed, Nov 2, 2011 at 1:33 PM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: Hi, I am experiencing an error where data saved in properties of attached objects to a page seems to be displaying incorrectly, and seemingly at random. I have a custom class defined with multiple properties, including a TextArea with the editor set to WYSIWYG. Users create new objects of this class attached to a page, and paste various information into the WYSIWYG box in inline edit mode, usually from Microsoft Word. The properties of each object are then displayed on the page in view mode, including the TextArea. This works correctly a high percentage of the time - the text pasted from Word correctly displays after the WYSIWYG editor converts it to wiki syntax. However - on occasion, when you look at the page, the content of that property displays as one long paragraph, with embedded xwiki syntax code that is displaying as code rather than rendering into html. This appears to be destructive - once an object starts displaying in this fashion, I can't get it to go back to displaying correctly. Whether in view mode or in the wysiwyg editor, there is just a block of text with wiki syntax and no line breaks. As an example: 1) User clicks a button to add a new object to the page, and is taken to edit mode 2) User pastes text from Word with embedded heading and style info into the WYSIWYG editor in inline mode, then saves 3) The page then displays the object in view mode - it appears with correctly rendered headings, which have been translated from Word into wiki syntax, opaquely to the user 4) After a while, the user goes back to the page and sees the object displaying as: (% style=border: 3pt solid windowtext; padding: 1pt 4pt; %) ((( = HEADING 1 = ))) (% class=MsoNormal %) == HEADING 2 == Heading 4 text (% class=MsoNormal %) (% class=StyleStyleBold12pt style=font-size: 13pt; %)text(%%)more text text text (% class=StyleStyleBold12pt style=font-size: 13pt; %)7-28(%%)even more text, text, text(% class=MsoNormal %) Etc...etc...etc... for pages at a time of wiki syntax with no line breaks. Going back to inline edit mode, the same text appears in the WYSIWYG editor. This is a serious problem for me, since users are inputting lots of data, seeing it display correctly, and coming back later to find their data completely unreadable. Does anyone have any idea what's going on or how to fix it? Thanks, Aaron ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Rendering error
Apologies for the spam, but I have a solution for what was happening - unsure if this falls under the category of bug or just poor development on my part (probably the latter), but will report it either way, in case it helps someone. The class sheet contains code to display a button for each object on the page that allowed the user to delete that object. The button's onclick uses location.href to call an /objectremove/ URL for the current object. This works fine while in view mode, but when in inline mode, clicking that button both fails to delete the object and converts all the TextArea properties into aforementioned mess. A couple lines of code to suppress displaying the delete button unless in view mode seems to have solved my problem for the time being... aaron On Wed, Nov 2, 2011 at 2:34 PM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: Additional info: The change in the page is recorded in the version history - so it is at least possible to rollback to a previous version of the page. This must mean the user is doing *something* to result in all the objects being corrupted, but I can't replicate this on my own. One version, everything is fine - the next version of the page, it's wrong. Comparing the versions just shows all the properly rendered text crossed out, replaced with the wiki-syntax mess. thanks, aaron On Wed, Nov 2, 2011 at 1:33 PM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: Hi, I am experiencing an error where data saved in properties of attached objects to a page seems to be displaying incorrectly, and seemingly at random. I have a custom class defined with multiple properties, including a TextArea with the editor set to WYSIWYG. Users create new objects of this class attached to a page, and paste various information into the WYSIWYG box in inline edit mode, usually from Microsoft Word. The properties of each object are then displayed on the page in view mode, including the TextArea. This works correctly a high percentage of the time - the text pasted from Word correctly displays after the WYSIWYG editor converts it to wiki syntax. However - on occasion, when you look at the page, the content of that property displays as one long paragraph, with embedded xwiki syntax code that is displaying as code rather than rendering into html. This appears to be destructive - once an object starts displaying in this fashion, I can't get it to go back to displaying correctly. Whether in view mode or in the wysiwyg editor, there is just a block of text with wiki syntax and no line breaks. As an example: 1) User clicks a button to add a new object to the page, and is taken to edit mode 2) User pastes text from Word with embedded heading and style info into the WYSIWYG editor in inline mode, then saves 3) The page then displays the object in view mode - it appears with correctly rendered headings, which have been translated from Word into wiki syntax, opaquely to the user 4) After a while, the user goes back to the page and sees the object displaying as: (% style=border: 3pt solid windowtext; padding: 1pt 4pt; %) ((( = HEADING 1 = ))) (% class=MsoNormal %) == HEADING 2 == Heading 4 text (% class=MsoNormal %) (% class=StyleStyleBold12pt style=font-size: 13pt; %)text(%%)more text text text (% class=StyleStyleBold12pt style=font-size: 13pt; %)7-28(%%)even more text, text, text(% class=MsoNormal %) Etc...etc...etc... for pages at a time of wiki syntax with no line breaks. Going back to inline edit mode, the same text appears in the WYSIWYG editor. This is a serious problem for me, since users are inputting lots of data, seeing it display correctly, and coming back later to find their data completely unreadable. Does anyone have any idea what's going on or how to fix it? Thanks, Aaron ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] xoffice install not working
It has worked for me recently - though I think it required some extra steps for Word 2010. Did you follow this guide for adding the XWiki repository to your trusted sites? http://xoffice.xwiki.org/xwiki/bin/view/XWord/Install_Guide#HPrerequisites aaron On Sun, Oct 23, 2011 at 7:17 PM, Paul Harris harris...@gmail.com wrote: Hi all, Is anyone able to install XOffice? I get messages re MyComputer is not a trusted zone or similar. Is XOffice going to be dropped going forward? Its the main reason we chose xwiki. Thanks Paul ___ 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] TOC Macro question
Thank you for the feedback - I have been playing with passing custom parameters, and have a few additional clarification questions. It seems that I need to use pure wiki syntax if I want the TOC macro to work right. I am currently relying on the {{html}} macro for two things which I can't figure out how to replace with custom parameters: 1) Nested ul's - I can only get the custom parameter to apply to one line, and can't figure out how to nest another ul. Something like this: (% class=mktree name=tree %) * $doc.display(Title, $obj) velocity code, including an {{html}} block to create an input element **Additional parts of tree ***Additional parts of tree Just returns two different ul's, only the first one of which has the custom parameter. Is this because the additional lines of code before continuing the tree forces the rendering engine to close the first ul? Any way to override that? 2) Table Sorter - Unfortunately, the whole set of object display code is wrapped in an {{html}} macro because I am using the old Table Sorter extension code. This is because I want to display multiple properties from each object in a single table cell. Looking at the Live Table macro, it seems that it only supports binding a table to a class and then setting a column to display a single property - where I need a single cell to include multiple properties displayed using custom code. Accomplishing this using the html syntax is simple - I can include an arbitrary amount of code in each td tag. To use wiki syntax for a sortable table, the XWiki Syntax document says I should use this: (% class=grid sortable filterable doOddEven id=tableid %) (% class=sortHeader %)|=Title 1|=Title 2 |Cell 11|Cell 12 |Cell 21|Cell 22 This creates the table fine - but I can't figure out how to include additional multi-line code in a single cell. As soon as I put in a new line, etc...it closes the table. Is there any way to accomplish this using wiki syntax? Should I be trying to use LiveTable instead somehow? If the above is confusing, here's what I'm really asking: I want to use a sortable table to display multiple objects of the same class on the same page. I would like that table to display multiple properties of each object in certain cells in the row. Some of those properties will contain wiki syntax - which I would like to be readable by the TOC macro after the table has been rendered. Is there a way to accomplish this? Thank you, Aaron On Thu, Oct 20, 2011 at 1:18 PM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: Interesting - I had missed the ability to pass custom parameters using wiki syntax. I will play with that and see if I can get it to output the same html I need. I am in fact using a series of nested ul within each div, that forms a collapsible javascript tree. The js is touchy about the exact formatting of the UL - if I can't get the tags to nest correctly using wiki syntax then I may be back with additional questions. A more accurate but simplified version of each object's display code is: ul class=tree li h2some content/h2 input / input / /li ul liSome velocity code, returns wiki syntax with headings/li liSome velocity code, returns wiki syntax with headings/li liSome velocity code, returns wiki syntax with headings/li /ul /ul Thanks much, aaron On Thu, Oct 20, 2011 at 12:52 PM, Thomas Mortagne thomas.morta...@xwiki.com wrote: On Thu, Oct 20, 2011 at 7:10 PM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: That makes sense, thank you for the clarification. Unfortunately, I am using the HTML macro to generate the final output - this is because I need to use ul's with a javascript to make the div's into collapsible trees. Does that mean I'm out of luck? ul ? I don't see much lists in your example, did you mean div ? You can get div with custom parameters in pure wiki syntax the following way: (% class=somecssclass %) ((( div content ))) which produces div class=somecssclassdiv content/div And if you really mean list, list most of the wiki elements list support custom parameters too: (% class=somecssclass %) * mylist element 1 * mylist element 2 which produces ul class=somecssclass limylist element 1/li limylist element 2/li /ul You can put anything you want in custom parameters and html renderer will print them as you provided them depending of the element. Using the html macro should always be the last resort, usually when you get some html you don't really have control on that you need to display or when you need to display elements not supported by the wiki syntax (yet) like form related stuff. On Thu, Oct 20, 2011 at 12:45 AM, Thomas Mortagne thomas.morta...@xwiki.com wrote: On Thu, Oct 20, 2011 at 8:02 AM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: One more tonight... It seems that I am unable to use the built-in TOC macro for wiki content which is generated
[xwiki-users] TOC Macro question
One more tonight... It seems that I am unable to use the built-in TOC macro for wiki content which is generated dynamically from a Class Sheet {{include}}. I assume this is because the TOC macro is rendered before (or simultaneously with) the include macro which actually displays the objects on the page, so as far as the TOC macro knows, there are no wiki headings on the page (yet) to create an outline from. Does anyone have any suggestions on how to parse through the final rendered output of the wiki page to generate a table of contents for dynamically generated wiki content? If I'm missing something with the existing macro, that would be great... What I am looking to do is write some code (preferably in a panel, I think), which creates a TOC-style index of all the wiki-syntax headings contained on the fully rendered page, after the content has been generated from TextArea properties of a set of attached objects to the page. I have written custom display code that loops through every object of a custom class attached to a page and then displays some of that objects properties in a series of collapsible div's. Each object contains two TextArea properties - one for WYSIWYG data, and one for plain text, which would be formatted in wiki syntax. The result is a list of each objects name with an expandable div full of the wiki-rendered content contained in the TextArea properties. I would like to generate a TOC which reads through that content and comes up with a list of only the relevant headings under each displayed object For example, on a page with 3 objects, the custom display code in the Class Sheet results in this (the wiki syntax appears fully rendered, obviously): Object 1 Name - Click to expand **Hidden until clicked ==Heading 2== ===Heading 3=== Normal text, etc... Object 2 Name - Click to expand **Hidden until clicked ==Heading 2== ===Heading 3=== Normal text, etc... Object 3 Name - Click to expand **Hidden until clicked ==Heading 2== ===Heading 3=== Normal text, etc... I would like the TOC to return: Object 1 Heading 2 Heading 3 Object 2 Heading 2 Heading 3 Object 3 Heading 2 Heading 3 Even when all the div's are initially collapsed/hidden. It would be ideal if the TOC was clickable and went to the relevant anchor... I can obviously use getValue() with each TextArea property to return a string with that objects wiki syntax - but I don't have an easy way to parse that string to only return the heading levels... Any guidance would be appreciated. Thanks, aaron ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] TOC Macro question
That makes sense, thank you for the clarification. Unfortunately, I am using the HTML macro to generate the final output - this is because I need to use ul's with a javascript to make the div's into collapsible trees. Does that mean I'm out of luck? On Thu, Oct 20, 2011 at 12:45 AM, Thomas Mortagne thomas.morta...@xwiki.com wrote: On Thu, Oct 20, 2011 at 8:02 AM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: One more tonight... It seems that I am unable to use the built-in TOC macro for wiki content which is generated dynamically from a Class Sheet {{include}}. I assume this is because the TOC macro is rendered before (or simultaneously with) the include macro which actually displays the objects on the page, so as far as the TOC macro knows, there are no wiki headings on the page (yet) to create an outline from. Actually no, there is a concept of priority in macros and TOC macro priority is very low specifically to support use case like that. But TOC only support (generated or not) real wiki content which mean if you have anything in a html macro it will not support it because html macro produce a RawBlock which is a black box containing html syntax for other macros. So if you use case is just what you described it should work well. Does anyone have any suggestions on how to parse through the final rendered output of the wiki page to generate a table of contents for dynamically generated wiki content? If I'm missing something with the existing macro, that would be great... What I am looking to do is write some code (preferably in a panel, I think), which creates a TOC-style index of all the wiki-syntax headings contained on the fully rendered page, after the content has been generated from TextArea properties of a set of attached objects to the page. I have written custom display code that loops through every object of a custom class attached to a page and then displays some of that objects properties in a series of collapsible div's. Each object contains two TextArea properties - one for WYSIWYG data, and one for plain text, which would be formatted in wiki syntax. The result is a list of each objects name with an expandable div full of the wiki-rendered content contained in the TextArea properties. I would like to generate a TOC which reads through that content and comes up with a list of only the relevant headings under each displayed object For example, on a page with 3 objects, the custom display code in the Class Sheet results in this (the wiki syntax appears fully rendered, obviously): Object 1 Name - Click to expand **Hidden until clicked ==Heading 2== ===Heading 3=== Normal text, etc... Object 2 Name - Click to expand **Hidden until clicked ==Heading 2== ===Heading 3=== Normal text, etc... Object 3 Name - Click to expand **Hidden until clicked ==Heading 2== ===Heading 3=== Normal text, etc... I would like the TOC to return: Object 1 Heading 2 Heading 3 Object 2 Heading 2 Heading 3 Object 3 Heading 2 Heading 3 Even when all the div's are initially collapsed/hidden. It would be ideal if the TOC was clickable and went to the relevant anchor... Are the divs done using html macro or using wiki syntax ? I can obviously use getValue() with each TextArea property to return a string with that objects wiki syntax - but I don't have an easy way to parse that string to only return the heading levels... Any guidance would be appreciated. Thanks, aaron ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users -- Thomas Mortagne ___ 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] TOC Macro question
Interesting - I had missed the ability to pass custom parameters using wiki syntax. I will play with that and see if I can get it to output the same html I need. I am in fact using a series of nested ul within each div, that forms a collapsible javascript tree. The js is touchy about the exact formatting of the UL - if I can't get the tags to nest correctly using wiki syntax then I may be back with additional questions. A more accurate but simplified version of each object's display code is: ul class=tree li h2some content/h2 input / input / /li ul liSome velocity code, returns wiki syntax with headings/li liSome velocity code, returns wiki syntax with headings/li liSome velocity code, returns wiki syntax with headings/li /ul /ul Thanks much, aaron On Thu, Oct 20, 2011 at 12:52 PM, Thomas Mortagne thomas.morta...@xwiki.com wrote: On Thu, Oct 20, 2011 at 7:10 PM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: That makes sense, thank you for the clarification. Unfortunately, I am using the HTML macro to generate the final output - this is because I need to use ul's with a javascript to make the div's into collapsible trees. Does that mean I'm out of luck? ul ? I don't see much lists in your example, did you mean div ? You can get div with custom parameters in pure wiki syntax the following way: (% class=somecssclass %) ((( div content ))) which produces div class=somecssclassdiv content/div And if you really mean list, list most of the wiki elements list support custom parameters too: (% class=somecssclass %) * mylist element 1 * mylist element 2 which produces ul class=somecssclass limylist element 1/li limylist element 2/li /ul You can put anything you want in custom parameters and html renderer will print them as you provided them depending of the element. Using the html macro should always be the last resort, usually when you get some html you don't really have control on that you need to display or when you need to display elements not supported by the wiki syntax (yet) like form related stuff. On Thu, Oct 20, 2011 at 12:45 AM, Thomas Mortagne thomas.morta...@xwiki.com wrote: On Thu, Oct 20, 2011 at 8:02 AM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: One more tonight... It seems that I am unable to use the built-in TOC macro for wiki content which is generated dynamically from a Class Sheet {{include}}. I assume this is because the TOC macro is rendered before (or simultaneously with) the include macro which actually displays the objects on the page, so as far as the TOC macro knows, there are no wiki headings on the page (yet) to create an outline from. Actually no, there is a concept of priority in macros and TOC macro priority is very low specifically to support use case like that. But TOC only support (generated or not) real wiki content which mean if you have anything in a html macro it will not support it because html macro produce a RawBlock which is a black box containing html syntax for other macros. So if you use case is just what you described it should work well. Does anyone have any suggestions on how to parse through the final rendered output of the wiki page to generate a table of contents for dynamically generated wiki content? If I'm missing something with the existing macro, that would be great... What I am looking to do is write some code (preferably in a panel, I think), which creates a TOC-style index of all the wiki-syntax headings contained on the fully rendered page, after the content has been generated from TextArea properties of a set of attached objects to the page. I have written custom display code that loops through every object of a custom class attached to a page and then displays some of that objects properties in a series of collapsible div's. Each object contains two TextArea properties - one for WYSIWYG data, and one for plain text, which would be formatted in wiki syntax. The result is a list of each objects name with an expandable div full of the wiki-rendered content contained in the TextArea properties. I would like to generate a TOC which reads through that content and comes up with a list of only the relevant headings under each displayed object For example, on a page with 3 objects, the custom display code in the Class Sheet results in this (the wiki syntax appears fully rendered, obviously): Object 1 Name - Click to expand **Hidden until clicked ==Heading 2== ===Heading 3=== Normal text, etc... Object 2 Name - Click to expand **Hidden until clicked ==Heading 2== ===Heading 3=== Normal text, etc... Object 3 Name - Click to expand **Hidden until clicked ==Heading 2== ===Heading 3=== Normal text, etc... I would like the TOC to return: Object 1 Heading 2 Heading 3 Object 2 Heading 2 Heading 3 Object 3
Re: [xwiki-users] TOC Macro question
After checking, I suppose I'm not using div's at all - just ul's for each object. On Thu, Oct 20, 2011 at 12:53 PM, Thomas Mortagne thomas.morta...@xwiki.com wrote: On Thu, Oct 20, 2011 at 9:52 PM, Thomas Mortagne thomas.morta...@xwiki.com wrote: On Thu, Oct 20, 2011 at 7:10 PM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: That makes sense, thank you for the clarification. Unfortunately, I am using the HTML macro to generate the final output - this is because I need to use ul's with a javascript to make the div's into collapsible trees. Does that mean I'm out of luck? ul ? I don't see much lists in your example, did you mean div ? You can get div with custom parameters in pure wiki syntax the following way: (% class=somecssclass %) ((( div content ))) which produces div class=somecssclassdiv content/div It's more div class=somecssclasspdiv content/p/div actually. And if you really mean list, list most of the wiki elements list support custom parameters too: (% class=somecssclass %) * mylist element 1 * mylist element 2 which produces ul class=somecssclass limylist element 1/li limylist element 2/li /ul You can put anything you want in custom parameters and html renderer will print them as you provided them depending of the element. Using the html macro should always be the last resort, usually when you get some html you don't really have control on that you need to display or when you need to display elements not supported by the wiki syntax (yet) like form related stuff. On Thu, Oct 20, 2011 at 12:45 AM, Thomas Mortagne thomas.morta...@xwiki.com wrote: On Thu, Oct 20, 2011 at 8:02 AM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: One more tonight... It seems that I am unable to use the built-in TOC macro for wiki content which is generated dynamically from a Class Sheet {{include}}. I assume this is because the TOC macro is rendered before (or simultaneously with) the include macro which actually displays the objects on the page, so as far as the TOC macro knows, there are no wiki headings on the page (yet) to create an outline from. Actually no, there is a concept of priority in macros and TOC macro priority is very low specifically to support use case like that. But TOC only support (generated or not) real wiki content which mean if you have anything in a html macro it will not support it because html macro produce a RawBlock which is a black box containing html syntax for other macros. So if you use case is just what you described it should work well. Does anyone have any suggestions on how to parse through the final rendered output of the wiki page to generate a table of contents for dynamically generated wiki content? If I'm missing something with the existing macro, that would be great... What I am looking to do is write some code (preferably in a panel, I think), which creates a TOC-style index of all the wiki-syntax headings contained on the fully rendered page, after the content has been generated from TextArea properties of a set of attached objects to the page. I have written custom display code that loops through every object of a custom class attached to a page and then displays some of that objects properties in a series of collapsible div's. Each object contains two TextArea properties - one for WYSIWYG data, and one for plain text, which would be formatted in wiki syntax. The result is a list of each objects name with an expandable div full of the wiki-rendered content contained in the TextArea properties. I would like to generate a TOC which reads through that content and comes up with a list of only the relevant headings under each displayed object For example, on a page with 3 objects, the custom display code in the Class Sheet results in this (the wiki syntax appears fully rendered, obviously): Object 1 Name - Click to expand **Hidden until clicked ==Heading 2== ===Heading 3=== Normal text, etc... Object 2 Name - Click to expand **Hidden until clicked ==Heading 2== ===Heading 3=== Normal text, etc... Object 3 Name - Click to expand **Hidden until clicked ==Heading 2== ===Heading 3=== Normal text, etc... I would like the TOC to return: Object 1 Heading 2 Heading 3 Object 2 Heading 2 Heading 3 Object 3 Heading 2 Heading 3 Even when all the div's are initially collapsed/hidden. It would be ideal if the TOC was clickable and went to the relevant anchor... Are the divs done using html macro or using wiki syntax ? I can obviously use getValue() with each TextArea property to return a string with that objects wiki syntax - but I don't have an easy way to parse that string to only return the heading levels... Any guidance would be appreciated. Thanks, aaron ___ users mailing list users@xwiki.org
[xwiki-users] Changing multiple objects index order
Hi, Can't quite seem to figure this one out on my own... Is there any way to change the index number of multiple objects of the same class attached to a page? I have a custom class with a number of properties, and a document with a number of instances of that class attached. I then have some custom display code on the Class Sheet which loops through all objects of the custom class to display them in order. The problem is that this is limited to displaying them in the order they were created. When I use the class editor on the page, I get the list: TestClass 0: Name TestClass 1: Name TestClass 2: Name etc The velocity loop which does the displaying always returns the objects in that order - 0,1, 2, etc #set($objs = $doc.getObjects('Admin.TestClass')) #foreach($obj in $objs) do some custom display stuff with each $obj #end Is it possible to programmatically change the order of these objects? Ultimately, I would like for the user to be able to drag and drop the order of objects to manually set the display order in a persistent way - much like the built-in Class Editor does for re-ordering multiple properties of a class. One workaround I have thought of is to include a property of the custom Class for something like sort order and then allow the user to modify this property, while leaving the underlying index order untouched. This seems clunky to me, though... Any thoughts? As always, help is much appreciated. Aaron ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Another XEM installation problem
Any other ideas? I'm at a total loss... aaron On Tue, Aug 2, 2011 at 12:14 PM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: Yep, When I connect with: xxx.xxx.xxx.xxx:9001/xwiki I just get a 404. Changing it back to the domain name, I get the same 500 error. Connecting to my IP:9001 brings up my Tomcat administration page just fine - so I can verify that the servlet is running on that port at that IP. I have the following file in my xwiki/WEB-INF/lib directory: mysql-connector-java-5.1.17-bin.jar Very confusing... aaron On Tue, Aug 2, 2011 at 11:52 AM, Guillaume Fenollar guillaume.fenol...@xwiki.com wrote: Hi aaron, It seems to be a mysql-java-connector issue. Since you're sure to have added the mysql-java-connector.jar file in xwiki/WEB-INF/lib, I barely understand what is happening. Can you try to access the wiki using the ip address instead of name? Guillaume 2011/8/2 Ashtar Communications ashtarcommunicati...@gmail.com Sorry, forgot: Yes, I did install the mysql jar in the lib directory. aaron On Tue, Aug 2, 2011 at 11:40 AM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: Thank you for the suggestion. Yes, I am trying to set up XEM. I ultimately will need to run a farm of wikis. I have not yet tried installing the basic XE and then manually setting up virtual wikis, because I would prefer to use the built-in management tools if possible. I changed the xwiki.cfg file to reflect my database name, but the error stays exactly the same. Any other ideas? Thanks, aaron On Tue, Aug 2, 2011 at 7:12 AM, Sergiu Dumitriu ser...@xwiki.com wrote: On 2011-08-01 12:41 AM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: Hi, I am trying to get XEM set up and am running into an HTTP 500 error that I am unsure how to resolve. I originally went through the XEM installation tutorial without any results, and thought the problem was related to port configuration. My hosting provider said that my tomcat instance was running on port 9001 and could not be changed. Now, connecting to host.com:9001/xwiki brings up the following: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Error number 3 in 0: Could not initialize main XWiki context Wrapped Exception: Error number 3001 in 3: Cannot load class com.xpn.xwiki.store.migration.hibernate.XWikiHibernateMigrationManager from param xwiki.store.migration.manager.class Wrapped Exception: Error number 0 in 3: Exception while hibernate execute Wrapped Exception: Could not create a DBCP pool. There is an error in the hibernate configuration file, please review it. org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:535) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:433) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) javax.servlet.http.HttpServlet.service(HttpServlet.java:627) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:129) org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:152) com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68) org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:218) org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112) root cause com.xpn.xwiki.XWikiException: Error number 3 in 0: Could not initialize main XWiki context Wrapped Exception: Error number 3001 in 3: Cannot load class com.xpn.xwiki.store.migration.hibernate.XWikiHibernateMigrationManager from param xwiki.store.migration.manager.class Wrapped Exception: Error number 0 in 3: Exception while hibernate execute Wrapped Exception: Could not create a DBCP pool. There is an error in the hibernate configuration file, please review it. com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:424) com.xpn.xwiki.XWiki.getXWiki(XWiki.java:493) com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:135) com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414
Re: [xwiki-users] Another XEM installation problem
Thank you for the suggestion. Yes, I am trying to set up XEM. I ultimately will need to run a farm of wikis. I have not yet tried installing the basic XE and then manually setting up virtual wikis, because I would prefer to use the built-in management tools if possible. I changed the xwiki.cfg file to reflect my database name, but the error stays exactly the same. Any other ideas? Thanks, aaron On Tue, Aug 2, 2011 at 7:12 AM, Sergiu Dumitriu ser...@xwiki.com wrote: On 2011-08-01 12:41 AM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: Hi, I am trying to get XEM set up and am running into an HTTP 500 error that I am unsure how to resolve. I originally went through the XEM installation tutorial without any results, and thought the problem was related to port configuration. My hosting provider said that my tomcat instance was running on port 9001 and could not be changed. Now, connecting to host.com:9001/xwiki brings up the following: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Error number 3 in 0: Could not initialize main XWiki context Wrapped Exception: Error number 3001 in 3: Cannot load class com.xpn.xwiki.store.migration.hibernate.XWikiHibernateMigrationManager from param xwiki.store.migration.manager.class Wrapped Exception: Error number 0 in 3: Exception while hibernate execute Wrapped Exception: Could not create a DBCP pool. There is an error in the hibernate configuration file, please review it. org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:535) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:433) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) javax.servlet.http.HttpServlet.service(HttpServlet.java:627) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:129) org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:152) com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68) org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:218) org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112) root cause com.xpn.xwiki.XWikiException: Error number 3 in 0: Could not initialize main XWiki context Wrapped Exception: Error number 3001 in 3: Cannot load class com.xpn.xwiki.store.migration.hibernate.XWikiHibernateMigrationManager from param xwiki.store.migration.manager.class Wrapped Exception: Error number 0 in 3: Exception while hibernate execute Wrapped Exception: Could not create a DBCP pool. There is an error in the hibernate configuration file, please review it. com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:424) com.xpn.xwiki.XWiki.getXWiki(XWiki.java:493) com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:135) com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) javax.servlet.http.HttpServlet.service(HttpServlet.java:627) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:129) org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:152) com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68) org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:218) org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112) I have double-checked my hibernate cfg file and think it looks correct. I have commented out the default configuration and have this: property name=connection.urljdbc:mysql://localhost/xwiki?useServerPrepStmts=falseamp;useUnicode=trueamp;characterEncoding=UTF-8amp;sessionVariables=sql_mode=''/property property name=connection.usernameuser_xwiki/property property name=connection.passwordpassword1*/property property name=connection.driver_classcom.mysql.jdbc.Driver/property property name=dialectorg.hibernate.dialect.MySQLDialect/property property name=connection.provider_classcom.xpn.xwiki.store.DBCPConnectionProvider/property property name
Re: [xwiki-users] Another XEM installation problem
Sorry, forgot: Yes, I did install the mysql jar in the lib directory. aaron On Tue, Aug 2, 2011 at 11:40 AM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: Thank you for the suggestion. Yes, I am trying to set up XEM. I ultimately will need to run a farm of wikis. I have not yet tried installing the basic XE and then manually setting up virtual wikis, because I would prefer to use the built-in management tools if possible. I changed the xwiki.cfg file to reflect my database name, but the error stays exactly the same. Any other ideas? Thanks, aaron On Tue, Aug 2, 2011 at 7:12 AM, Sergiu Dumitriu ser...@xwiki.com wrote: On 2011-08-01 12:41 AM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: Hi, I am trying to get XEM set up and am running into an HTTP 500 error that I am unsure how to resolve. I originally went through the XEM installation tutorial without any results, and thought the problem was related to port configuration. My hosting provider said that my tomcat instance was running on port 9001 and could not be changed. Now, connecting to host.com:9001/xwiki brings up the following: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Error number 3 in 0: Could not initialize main XWiki context Wrapped Exception: Error number 3001 in 3: Cannot load class com.xpn.xwiki.store.migration.hibernate.XWikiHibernateMigrationManager from param xwiki.store.migration.manager.class Wrapped Exception: Error number 0 in 3: Exception while hibernate execute Wrapped Exception: Could not create a DBCP pool. There is an error in the hibernate configuration file, please review it. org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:535) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:433) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) javax.servlet.http.HttpServlet.service(HttpServlet.java:627) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:129) org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:152) com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68) org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:218) org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112) root cause com.xpn.xwiki.XWikiException: Error number 3 in 0: Could not initialize main XWiki context Wrapped Exception: Error number 3001 in 3: Cannot load class com.xpn.xwiki.store.migration.hibernate.XWikiHibernateMigrationManager from param xwiki.store.migration.manager.class Wrapped Exception: Error number 0 in 3: Exception while hibernate execute Wrapped Exception: Could not create a DBCP pool. There is an error in the hibernate configuration file, please review it. com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:424) com.xpn.xwiki.XWiki.getXWiki(XWiki.java:493) com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:135) com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) javax.servlet.http.HttpServlet.service(HttpServlet.java:627) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:129) org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:152) com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68) org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:218) org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112) I have double-checked my hibernate cfg file and think it looks correct. I have commented out the default configuration and have this: property name=connection.urljdbc:mysql://localhost/xwiki?useServerPrepStmts=falseamp;useUnicode=trueamp;characterEncoding=UTF-8amp;sessionVariables=sql_mode=''/property property name=connection.usernameuser_xwiki/property property name=connection.passwordpassword1*/property property name=connection.driver_classcom.mysql.jdbc.Driver/property
Re: [xwiki-users] Another XEM installation problem
Yep, When I connect with: xxx.xxx.xxx.xxx:9001/xwiki I just get a 404. Changing it back to the domain name, I get the same 500 error. Connecting to my IP:9001 brings up my Tomcat administration page just fine - so I can verify that the servlet is running on that port at that IP. I have the following file in my xwiki/WEB-INF/lib directory: mysql-connector-java-5.1.17-bin.jar Very confusing... aaron On Tue, Aug 2, 2011 at 11:52 AM, Guillaume Fenollar guillaume.fenol...@xwiki.com wrote: Hi aaron, It seems to be a mysql-java-connector issue. Since you're sure to have added the mysql-java-connector.jar file in xwiki/WEB-INF/lib, I barely understand what is happening. Can you try to access the wiki using the ip address instead of name? Guillaume 2011/8/2 Ashtar Communications ashtarcommunicati...@gmail.com Sorry, forgot: Yes, I did install the mysql jar in the lib directory. aaron On Tue, Aug 2, 2011 at 11:40 AM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: Thank you for the suggestion. Yes, I am trying to set up XEM. I ultimately will need to run a farm of wikis. I have not yet tried installing the basic XE and then manually setting up virtual wikis, because I would prefer to use the built-in management tools if possible. I changed the xwiki.cfg file to reflect my database name, but the error stays exactly the same. Any other ideas? Thanks, aaron On Tue, Aug 2, 2011 at 7:12 AM, Sergiu Dumitriu ser...@xwiki.com wrote: On 2011-08-01 12:41 AM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: Hi, I am trying to get XEM set up and am running into an HTTP 500 error that I am unsure how to resolve. I originally went through the XEM installation tutorial without any results, and thought the problem was related to port configuration. My hosting provider said that my tomcat instance was running on port 9001 and could not be changed. Now, connecting to host.com:9001/xwiki brings up the following: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Error number 3 in 0: Could not initialize main XWiki context Wrapped Exception: Error number 3001 in 3: Cannot load class com.xpn.xwiki.store.migration.hibernate.XWikiHibernateMigrationManager from param xwiki.store.migration.manager.class Wrapped Exception: Error number 0 in 3: Exception while hibernate execute Wrapped Exception: Could not create a DBCP pool. There is an error in the hibernate configuration file, please review it. org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:535) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:433) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) javax.servlet.http.HttpServlet.service(HttpServlet.java:627) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:129) org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:152) com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68) org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:218) org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112) root cause com.xpn.xwiki.XWikiException: Error number 3 in 0: Could not initialize main XWiki context Wrapped Exception: Error number 3001 in 3: Cannot load class com.xpn.xwiki.store.migration.hibernate.XWikiHibernateMigrationManager from param xwiki.store.migration.manager.class Wrapped Exception: Error number 0 in 3: Exception while hibernate execute Wrapped Exception: Could not create a DBCP pool. There is an error in the hibernate configuration file, please review it. com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:424) com.xpn.xwiki.XWiki.getXWiki(XWiki.java:493) com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:135) com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) javax.servlet.http.HttpServlet.service(HttpServlet.java:627) javax.servlet.http.HttpServlet.service(HttpServlet.java:729
Re: [xwiki-users] Another XEM installation problem
I have also now tried installing basic XE instead of XEM, and get exactly the same error. On Tue, Aug 2, 2011 at 12:14 PM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: Yep, When I connect with: xxx.xxx.xxx.xxx:9001/xwiki I just get a 404. Changing it back to the domain name, I get the same 500 error. Connecting to my IP:9001 brings up my Tomcat administration page just fine - so I can verify that the servlet is running on that port at that IP. I have the following file in my xwiki/WEB-INF/lib directory: mysql-connector-java-5.1.17-bin.jar Very confusing... aaron On Tue, Aug 2, 2011 at 11:52 AM, Guillaume Fenollar guillaume.fenol...@xwiki.com wrote: Hi aaron, It seems to be a mysql-java-connector issue. Since you're sure to have added the mysql-java-connector.jar file in xwiki/WEB-INF/lib, I barely understand what is happening. Can you try to access the wiki using the ip address instead of name? Guillaume 2011/8/2 Ashtar Communications ashtarcommunicati...@gmail.com Sorry, forgot: Yes, I did install the mysql jar in the lib directory. aaron On Tue, Aug 2, 2011 at 11:40 AM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: Thank you for the suggestion. Yes, I am trying to set up XEM. I ultimately will need to run a farm of wikis. I have not yet tried installing the basic XE and then manually setting up virtual wikis, because I would prefer to use the built-in management tools if possible. I changed the xwiki.cfg file to reflect my database name, but the error stays exactly the same. Any other ideas? Thanks, aaron On Tue, Aug 2, 2011 at 7:12 AM, Sergiu Dumitriu ser...@xwiki.com wrote: On 2011-08-01 12:41 AM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: Hi, I am trying to get XEM set up and am running into an HTTP 500 error that I am unsure how to resolve. I originally went through the XEM installation tutorial without any results, and thought the problem was related to port configuration. My hosting provider said that my tomcat instance was running on port 9001 and could not be changed. Now, connecting to host.com:9001/xwiki brings up the following: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Error number 3 in 0: Could not initialize main XWiki context Wrapped Exception: Error number 3001 in 3: Cannot load class com.xpn.xwiki.store.migration.hibernate.XWikiHibernateMigrationManager from param xwiki.store.migration.manager.class Wrapped Exception: Error number 0 in 3: Exception while hibernate execute Wrapped Exception: Could not create a DBCP pool. There is an error in the hibernate configuration file, please review it. org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:535) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:433) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) javax.servlet.http.HttpServlet.service(HttpServlet.java:627) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:129) org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:152) com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68) org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:218) org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112) root cause com.xpn.xwiki.XWikiException: Error number 3 in 0: Could not initialize main XWiki context Wrapped Exception: Error number 3001 in 3: Cannot load class com.xpn.xwiki.store.migration.hibernate.XWikiHibernateMigrationManager from param xwiki.store.migration.manager.class Wrapped Exception: Error number 0 in 3: Exception while hibernate execute Wrapped Exception: Could not create a DBCP pool. There is an error in the hibernate configuration file, please review it. com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:424) com.xpn.xwiki.XWiki.getXWiki(XWiki.java:493) com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:135) com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doGet
[xwiki-users] Another XEM installation problem
Hi, I am trying to get XEM set up and am running into an HTTP 500 error that I am unsure how to resolve. I originally went through the XEM installation tutorial without any results, and thought the problem was related to port configuration. My hosting provider said that my tomcat instance was running on port 9001 and could not be changed. Now, connecting to host.com:9001/xwiki brings up the following: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Error number 3 in 0: Could not initialize main XWiki context Wrapped Exception: Error number 3001 in 3: Cannot load class com.xpn.xwiki.store.migration.hibernate.XWikiHibernateMigrationManager from param xwiki.store.migration.manager.class Wrapped Exception: Error number 0 in 3: Exception while hibernate execute Wrapped Exception: Could not create a DBCP pool. There is an error in the hibernate configuration file, please review it. org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:535) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:433) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) javax.servlet.http.HttpServlet.service(HttpServlet.java:627) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:129) org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:152) com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68) org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:218) org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112) root cause com.xpn.xwiki.XWikiException: Error number 3 in 0: Could not initialize main XWiki context Wrapped Exception: Error number 3001 in 3: Cannot load class com.xpn.xwiki.store.migration.hibernate.XWikiHibernateMigrationManager from param xwiki.store.migration.manager.class Wrapped Exception: Error number 0 in 3: Exception while hibernate execute Wrapped Exception: Could not create a DBCP pool. There is an error in the hibernate configuration file, please review it. com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:424) com.xpn.xwiki.XWiki.getXWiki(XWiki.java:493) com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:135) com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) javax.servlet.http.HttpServlet.service(HttpServlet.java:627) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:129) org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:152) com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68) org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:218) org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112) I have double-checked my hibernate cfg file and think it looks correct. I have commented out the default configuration and have this: property name=connection.urljdbc:mysql://localhost/xwiki?useServerPrepStmts=falseamp;useUnicode=trueamp;characterEncoding=UTF-8amp;sessionVariables=sql_mode=''/property property name=connection.usernameuser_xwiki/property property name=connection.passwordpassword1*/property property name=connection.driver_classcom.mysql.jdbc.Driver/property property name=dialectorg.hibernate.dialect.MySQLDialect/property property name=connection.provider_classcom.xpn.xwiki.store.DBCPConnectionProvider/property property name=connection.pool_size2/property property name=statement_cache.size2/property mapping resource=xwiki.hbm.xml/ mapping resource=feeds.hbm.xml/ mapping resource=activitystream.hbm.xml/ My database username is user_xwiki instead of xwiki - I cannot change this, but could it be the problem? I am able to manually connect to mysql using SSH and the username/password in the hibernate cfg, and have granted that user all permissions in my control panel. Poking around the archives, I also saw errors related to the hosts file
Re: [xwiki-users] XEM Installation Question
I installed basic XE instead of XEM, but there is no change - my web browser still does not bring up XWiki. I looked a bit into the http/tomcat connector issue - it seems like this is a likely culprit given that I don't even have access to the Tomcat logs. I assumed that my hosting provider would have installed mod_jk, but now I am not sure. I will check with them about this and making sure 8080 is forwarded through the firewall. If that fails to resolve the problem, I will re-ask with more info. Thank you for the help so far, aaron On Mon, Jul 18, 2011 at 9:03 PM, Sergiu Dumitriu ser...@xwiki.com wrote: On 07/18/2011 06:25 PM, Ashtar Communications wrote: I am checking by pointing my browser to: mysite.com:8080 mysite.com:8080/xwiki mysite.com/xwiki Specifying the port gives me a can't connect error, the last one just gives me a 404 (it's obviously being handled on port 80 by apache) If 8080 doesn't work, then it's blocked by the firewall, you could try to check if you can allow 8080 out of the firewall. If the 404 is a classic apache httpd response, then there's no bridge connecting httpd and tomcat, so it's not an XWiki issue but a httpd-tomcat connector one. I do not think I have access to the Tomcat logs since it is a shared container - they do not show up anywhere that I can find on my filesystem through SSH. Try looking ini in /var/log/tomcat* or /usr/local/tomcat*/logs/ aaron On Mon, Jul 18, 2011 at 1:24 PM, Sergiu Dumitriuser...@xwiki.com wrote: On 07/18/2011 03:32 PM, Ashtar Communications wrote: Someday, I will not be clueless... I have successfully installed a local development copy of xwiki on Windows, but I'm having some trouble getting XEM installed on my shared linux server. I'm running on a shared Tomcat (5.027) container. Following both the tutorial for XEM and for XE, I have done the following: 1) Since it is a shared hosting environment and java is enabled, I assume I do not have to manually install either java or MySQL. I have created a MySQL database with the name xwikidb through my hosting control panel with username xwikidb. I do not have the ability to add full privileges to the user, but I was told this would not prevent basic installation of XEM. 2) Renamed the xwiki-enterprise-installer-generic-3.1-standard.war file to xwiki.war and uploaded to my server. It exploded as expected when the server restarted to a subdirectory called xwiki. 3) I downloaded the MySQL Java Connector and put mysql-connector-java-5.1.17-bin.jar in my /xwiki/WEB-INF/lib folder 4) Modified the hibernate.cfg.xml file to uncomment the MySQL section and comment out the default. Changed the username and password fields to my information. 5) Checked to make sure localhost was defined in /etc/hosts OK, this should be enough. 6) Now what? There's no .sh file in the WAR...What do I start? I have already waited for Tomcat to restart, but it doesn't appear that xwiki is running. How are you checking? Is there an error message displayed when trying to access the application? Are there any errors in the tomcat logs? Sure that I'm missing something obvious. Relative newbie to linux servers... -- Sergiu Dumitriu http://purl.org/net/sergiu/ ___ 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] XEM Installation Question
Someday, I will not be clueless... I have successfully installed a local development copy of xwiki on Windows, but I'm having some trouble getting XEM installed on my shared linux server. I'm running on a shared Tomcat (5.027) container. Following both the tutorial for XEM and for XE, I have done the following: 1) Since it is a shared hosting environment and java is enabled, I assume I do not have to manually install either java or MySQL. I have created a MySQL database with the name xwikidb through my hosting control panel with username xwikidb. I do not have the ability to add full privileges to the user, but I was told this would not prevent basic installation of XEM. 2) Renamed the xwiki-enterprise-installer-generic-3.1-standard.war file to xwiki.war and uploaded to my server. It exploded as expected when the server restarted to a subdirectory called xwiki. 3) I downloaded the MySQL Java Connector and put mysql-connector-java-5.1.17-bin.jar in my /xwiki/WEB-INF/lib folder 4) Modified the hibernate.cfg.xml file to uncomment the MySQL section and comment out the default. Changed the username and password fields to my information. 5) Checked to make sure localhost was defined in /etc/hosts 6) Now what? There's no .sh file in the WAR...What do I start? I have already waited for Tomcat to restart, but it doesn't appear that xwiki is running. Sure that I'm missing something obvious. Relative newbie to linux servers... Thanks, Aaron ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] XEM Installation Question
I am checking by pointing my browser to: mysite.com:8080 mysite.com:8080/xwiki mysite.com/xwiki Specifying the port gives me a can't connect error, the last one just gives me a 404 (it's obviously being handled on port 80 by apache) I do not think I have access to the Tomcat logs since it is a shared container - they do not show up anywhere that I can find on my filesystem through SSH. aaron On Mon, Jul 18, 2011 at 1:24 PM, Sergiu Dumitriu ser...@xwiki.com wrote: On 07/18/2011 03:32 PM, Ashtar Communications wrote: Someday, I will not be clueless... I have successfully installed a local development copy of xwiki on Windows, but I'm having some trouble getting XEM installed on my shared linux server. I'm running on a shared Tomcat (5.027) container. Following both the tutorial for XEM and for XE, I have done the following: 1) Since it is a shared hosting environment and java is enabled, I assume I do not have to manually install either java or MySQL. I have created a MySQL database with the name xwikidb through my hosting control panel with username xwikidb. I do not have the ability to add full privileges to the user, but I was told this would not prevent basic installation of XEM. 2) Renamed the xwiki-enterprise-installer-generic-3.1-standard.war file to xwiki.war and uploaded to my server. It exploded as expected when the server restarted to a subdirectory called xwiki. 3) I downloaded the MySQL Java Connector and put mysql-connector-java-5.1.17-bin.jar in my /xwiki/WEB-INF/lib folder 4) Modified the hibernate.cfg.xml file to uncomment the MySQL section and comment out the default. Changed the username and password fields to my information. 5) Checked to make sure localhost was defined in /etc/hosts OK, this should be enough. 6) Now what? There's no .sh file in the WAR...What do I start? I have already waited for Tomcat to restart, but it doesn't appear that xwiki is running. How are you checking? Is there an error message displayed when trying to access the application? Are there any errors in the tomcat logs? Sure that I'm missing something obvious. Relative newbie to linux servers... -- Sergiu Dumitriu http://purl.org/net/sergiu/ ___ 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] XEM Installation Question
I will retry with basic XE and then get back to you after the container restarts tonight. I tried to make the database name xwiki but it was already in use on my shared host, so it forced me to choose another name. Eventually, I think I will have to move off the shared hosting... Thanks, aaron On Mon, Jul 18, 2011 at 3:50 PM, Ludovic Dubost ludo...@xwiki.com wrote: Shared hosting can be tricky. Logs are really necessary. I would suggest trying with XE first to make sure the basic XE is working. This will avoid database specific issues (I think the main DB should be called 'xwiki' with XEM otherwise there might be some issues). Ludovic 2011/7/19 Ashtar Communications ashtarcommunicati...@gmail.com: I am checking by pointing my browser to: mysite.com:8080 mysite.com:8080/xwiki mysite.com/xwiki Specifying the port gives me a can't connect error, the last one just gives me a 404 (it's obviously being handled on port 80 by apache) I do not think I have access to the Tomcat logs since it is a shared container - they do not show up anywhere that I can find on my filesystem through SSH. aaron On Mon, Jul 18, 2011 at 1:24 PM, Sergiu Dumitriu ser...@xwiki.com wrote: On 07/18/2011 03:32 PM, Ashtar Communications wrote: Someday, I will not be clueless... I have successfully installed a local development copy of xwiki on Windows, but I'm having some trouble getting XEM installed on my shared linux server. I'm running on a shared Tomcat (5.027) container. Following both the tutorial for XEM and for XE, I have done the following: 1) Since it is a shared hosting environment and java is enabled, I assume I do not have to manually install either java or MySQL. I have created a MySQL database with the name xwikidb through my hosting control panel with username xwikidb. I do not have the ability to add full privileges to the user, but I was told this would not prevent basic installation of XEM. 2) Renamed the xwiki-enterprise-installer-generic-3.1-standard.war file to xwiki.war and uploaded to my server. It exploded as expected when the server restarted to a subdirectory called xwiki. 3) I downloaded the MySQL Java Connector and put mysql-connector-java-5.1.17-bin.jar in my /xwiki/WEB-INF/lib folder 4) Modified the hibernate.cfg.xml file to uncomment the MySQL section and comment out the default. Changed the username and password fields to my information. 5) Checked to make sure localhost was defined in /etc/hosts OK, this should be enough. 6) Now what? There's no .sh file in the WAR...What do I start? I have already waited for Tomcat to restart, but it doesn't appear that xwiki is running. How are you checking? Is there an error message displayed when trying to access the application? Are there any errors in the tomcat logs? Sure that I'm missing something obvious. Relative newbie to linux servers... -- Sergiu Dumitriu http://purl.org/net/sergiu/ ___ 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 -- Ludovic Dubost Founder and CEO Blog: http://blog.ludovic.org/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost ___ 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] XEM Installation Question
I am trying to get XEM installed on my shared hosting provider, and am running into some trouble with the MySQL user permissions part. The tutorial says: In order for XEM to be able to create new wikis on demand, you will need to give all rights to your database user. For example for MySQL, execute: mysql -u root -e grant all privileges on *.* to xwiki@127.0.0.1 identified by 'xwiki' This command does not work when run on my SSH client. I contacted my hosting provider to ask whether it was possible to assign admin privileges, and they said: It is not possible to change privileges for a database user. The database uses have the most commonly needed privileges set by default. Instead of creating a user as explained in those instructions, you should just be able to use provide the user of the database you created through your Hosting Control Center. Am I right that this response means that XEM will not install correctly, despite their assurances that I have commonly needed privileges? Has anyone had success setting up XEM on a GoDaddy hosting account? If not, it might be time to switch... Thank you, Aaron Hardy ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Display Objects help
Hi, At the outset - I admit to being a complete and total newbie at this. Apologize for asking what are probably dumb questions - and likely to be lots more than one. Any help people would be willing to give me would be much appreciated. I have been through all the tutorials, the API JavaDoc, and as many examples of code as I could find, but I still can't seem to find anything that looks directly applicable or works when I try to adapt it. What I'm ultimately trying to do seems pretty straightforward. I would like to have a set of pages which each contain structured data that can be modified, added, or deleted one object at a time, and which display in reverse chronological order. I would like each of those objects to be displayed with specific HTML formatting. Eventually, I will also need to be able to interact with those objects using the REST API. My current understanding of the process I need to use to get started is this: 1) Create a new Class (We'll call it Entry) with specific properties 2) Create the Class Sheet and Template. The Template includes a link to the Class Sheet for displaying instances of the class. 3) Edit the Class Sheet to get the attached objects to display properly 4) Create a new page from the Template, add several instances of the class to it - they should then display on the new page. First two steps are easy - but the first place that I am hung up is figuring out how to get the Class Sheet to display multiple objects of the same class attached to the same page. I have a page with 3 objects of the Entry class attached (with different info in the properties). Ultimately the info and formatting will need to be more complex, but I can't even get the basics to work - this is what I have tried so far: START CODE #foreach($entry in $doc.getObjects(XWiki.EntryClass)) #foreach($prop in $entry.properties) : $doc.display($prop.getName()) #end #end END CODE*** The problem is that this code displays the info for the first object three times, instead of the unique properties for each class. The fact that it displays three times seems to indicate that the loop is correctly going through each object in the document - but it is obviously not incrementing the properties to the next $entry. Sure it's a simple syntax error, but don't know what it is. I also can't tell from the JavaDoc enough about how to use .display() or the properties of a vector to know how to do basic things like display the number of objects or the name of each one. Can't figure out how to interact with objects very well, basically. Side question - Should I be using one object per page and then including pages instead of having multiple objects on one page? I have worked my way through the TOC demo, and it seems that each TOC entry is saved on a separate page - and the livetable macro is then used on the display page to populate the table with all the entries. Thank you in advance, Aaron ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Display Objects help
Guillaume, Thanks for the lead and the quick response. The BB application does indeed look like it does something very close to what I need to replicate. I will spend some time digging through the code until I understand it and will post again if I can't figure it out. Looks very promising. I have already discovered that the main thing I was missing in my previous code were the getProperties() and getProperty() methods. This code solved my initial problem: #foreach($entry in $doc.getObjects('XWiki.EntryClass')) #foreach($prop in $entry.getProperties()) $entry.getProperty($prop.getName()).getValue() #end #end Thanks again, aaron On Tue, Jun 28, 2011 at 3:59 PM, Guillaume Lerouge guilla...@xwiki.comwrote: Hi Aaron, the bulletin board application does this on topic pages: http://extensions.xwiki.org/xwiki/bin/view/Extension/Bulletin+Board+Application#HTopics You can download it, install it locally and look at its code to see how it's done. In any case, you can definitely have several objects on the page. You can also edit your code as such in order to get each individual object and then act on it: #foreach($entry in $doc.getObjects(XWiki.EntryClass)) #set($entryObj = $doc.getObject($entry)) $entry.prop1 $entry.prop2 #end Hope this helps, Guillaume On Tue, Jun 28, 2011 at 23:59, Ashtar Communications ashtarcommunicati...@gmail.com wrote: Hi, At the outset - I admit to being a complete and total newbie at this. Apologize for asking what are probably dumb questions - and likely to be lots more than one. Any help people would be willing to give me would be much appreciated. I have been through all the tutorials, the API JavaDoc, and as many examples of code as I could find, but I still can't seem to find anything that looks directly applicable or works when I try to adapt it. What I'm ultimately trying to do seems pretty straightforward. I would like to have a set of pages which each contain structured data that can be modified, added, or deleted one object at a time, and which display in reverse chronological order. I would like each of those objects to be displayed with specific HTML formatting. Eventually, I will also need to be able to interact with those objects using the REST API. My current understanding of the process I need to use to get started is this: 1) Create a new Class (We'll call it Entry) with specific properties 2) Create the Class Sheet and Template. The Template includes a link to the Class Sheet for displaying instances of the class. 3) Edit the Class Sheet to get the attached objects to display properly 4) Create a new page from the Template, add several instances of the class to it - they should then display on the new page. First two steps are easy - but the first place that I am hung up is figuring out how to get the Class Sheet to display multiple objects of the same class attached to the same page. I have a page with 3 objects of the Entry class attached (with different info in the properties). Ultimately the info and formatting will need to be more complex, but I can't even get the basics to work - this is what I have tried so far: START CODE #foreach($entry in $doc.getObjects(XWiki.EntryClass)) #foreach($prop in $entry.properties) : $doc.display($prop.getName()) #end #end END CODE*** The problem is that this code displays the info for the first object three times, instead of the unique properties for each class. The fact that it displays three times seems to indicate that the loop is correctly going through each object in the document - but it is obviously not incrementing the properties to the next $entry. Sure it's a simple syntax error, but don't know what it is. I also can't tell from the JavaDoc enough about how to use .display() or the properties of a vector to know how to do basic things like display the number of objects or the name of each one. Can't figure out how to interact with objects very well, basically. Side question - Should I be using one object per page and then including pages instead of having multiple objects on one page? I have worked my way through the TOC demo, and it seems that each TOC entry is saved on a separate page - and the livetable macro is then used on the display page to populate the table with all the entries. Thank you in advance, Aaron ___ 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