Hi devs,
I would like to modify the xwiki/2.0 renderer to print the group with
a trailing and ending new line:
1.A
(((
* list1
* list 2
)))
instead of
1.B
(((* list1
* list 2)))
for example but it also mean:
2.A
| (((
* list
))) | second cell
instead of
2.B
| (((* list with one item)))
Here are my arguments:
* i tough of that idea at first because it's not very easy/clean to
support well the escaping of an ending ) before a ending group in an
events based renderer, the problem is that you need to bufferize at
least 4 events (if not more) to know when you print the ) character
that it will be followed by end group syntax when printed. For example
it can be the last character of paragraph in the last cell or last row
of a table before the end of the group
* i prefer to "break" 2.A done on purpose than 1.A done on purpose
since it's not possible to support both currently
* even with 2.A it's more readable to have it in its own line IMO
Here is my +1
--
Thomas Mortagne
Hello friends!
I have migrated xwiki testing instance from 1.8 to the 2.0
http://test.odo.lv:8180/xwiki/bin/view/Main/
I could import XAR 2.0 only using hack with stopping 2.0 instance, and
ran updated DB with 1.8 web instance, imported XAR, and svitched back to
web 2.0.
It worked previous times. Though currently there are many regressions:
1. Can't choose different view/edit modes from the menu, only default
ones ar accessible, as drop-down menus aren't shown,
2. Can log in only with superuser. Using other users Xwiki says: "You
are not allowed to view this document or perform this action."
3. Cannot edit neither groups, nor users. When form is opened, it stills
with progress bar and "Loading..." message.
4. Site index doesn't work.
In summary it seems, there ar bunch of pages where either Javascipt
doesn't work properly, or there is global problems with page access.
Site is multi lingual, there are lot of custom objects in some spaces. I
couldn't find anything interesting in tomcat logs.
Can you point some directions, what to check and investigate?
Thanks in advance,
Valdis
Hi,
Since we're upgrading xwiki.org to 2.0 it would be nice to use the new
colibri skin.
So who can design nice and unique color themes for xwiki.org?
Thanks
-Vincent
Hi Devs,
Silvia and I have been working on updating & improving the FAQ tutorial
located at:
http://platform.xwiki.org/xwiki/bin/view/DevGuide/FAQTutorial
Apart from the conversion to 2.0, the most notable change I brought is to
provide some code to be used on the homepage of the FAQ space. This code
removes the need for the user to go to the FAQ.FAQClass page to create new
FAQs documents. It's more in line with our current best practices for
application (very little applications create new items directly from the
class page).
However in doing so I'm not sure I used the most streamlined code. I'd be
glad if some users could try following the tutorial to see whether it meets
their need and if a dev could give it a look in order to improve it further.
Thanks,
Guillaume
--
Guillaume Lerouge
Product Manager - XWiki
Skype: wikibc
Twitter: glerouge
http://guillaumelerouge.com/
On Sep 30, 2009, at 12:00 PM, Anca Paula Luca wrote:
> On 09/30/2009 12:58 PM, mflorea (SVN) wrote:
>> Author: mflorea
>> Date: 2009-09-30 11:58:20 +0200 (Wed, 30 Sep 2009)
>> New Revision: 24144
>>
>> Modified:
>> enterprise/trunk/distribution-test/wysiwyg-tests/src/test/it/com/
>> xpn/xwiki/it/selenium/LineTest.java
>> enterprise/trunk/distribution-test/wysiwyg-tests/src/test/it/com/
>> xpn/xwiki/it/selenium/StandardFeaturesTest.java
>> Log:
>> Fixed some WYSIWYG standard features tests.
>>
>
> [snip]
>
>>
>> - // More the caret between x and y.
>> + // More the caret between x and Y.
Using some other letters might be easier.... like "abc" (or "def" if
"abc" is already used)... ;)
-Vincent
>
> typo
>
> Happy coding,
> Anca
>
>> moveCaret("XWE.body.firstChild.firstChild", 1);
>>
>> // Insert HR in the middle of the paragraph.
I have been testing and analyzing my new loader for a few days now, It seems to be working perfectly.
I have written a comprehensive testing script available here:
http://jira.xwiki.org/jira/browse/XWIKI-2874
There is a change which must be made:
ListProperty.equals must be change to convert null values to empty ArrayList objects in the event that
it is asked to compare to a BaseProperty.
The change looks like this:
Index: core/xwiki-core/src/main/java/com/xpn/xwiki/objects/ListProperty.java
===================================================================
--- core/xwiki-core/src/main/java/com/xpn/xwiki/objects/ListProperty.java (revision 23877)
+++ core/xwiki-core/src/main/java/com/xpn/xwiki/objects/ListProperty.java (working copy)
@@ -145,6 +145,14 @@
return true;
}
+ //The save opperation triggers hibernate to compare the new property to the original
+ //If the property was gotten by a query like "SELECT prop FROM BaseProperty AS prop WHERE..."
+ //and the value stored in the db is null, hibernate thinks the original is a BaseProperty,
+ //thus we may end up comparing a ListProperty to a BaseProperty with value = null.
+ if (list2 == null && obj.getClass().getName().indexOf(".BaseProperty")!=-1){
+ list2 = new ArrayList<String>();
+ }
+
if (list1.size() != list2.size()) {
return false;
}
Why is this necessary?
Because the new loader loads all types of properties at once with a query like
"select prop from BaseProperty prop where prop.id in (:ids)"
(ids being the list of object ids from the objects attached to the document.)
This is okay until the property is saved, then hibernate has to check that the
id of the property is the same. The id of the property is an empty property with
the same name and object id number. Because the property is loaded by a query
for BaseProperty, if the value in the database is null, Hibernate thinks the
property IS a BaseProperty and passes a BaseProperty to the equals method.
If these changes are not made, we get this exception.
java.lang.NullPointerException
at com.xpn.xwiki.objects.ListProperty.equals(ListProperty.java:148)
at org.hibernate.event.def.ProxyVisitor.isOwnerUnchanged(ProxyVisitor.java:44)
at org.hibernate.event.def.OnUpdateVisitor.processCollection(OnUpdateVisitor.java:45)
at org.hibernate.event.def.AbstractVisitor.processValue(AbstractVisitor.java:101)
at org.hibernate.event.def.AbstractVisitor.processValue(AbstractVisitor.java:61)
at org.hibernate.event.def.AbstractVisitor.processEntityPropertyValues(AbstractVisitor.java:55)
at org.hibernate.event.def.AbstractVisitor.process(AbstractVisitor.java:123)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performUpdate(DefaultSaveOrUpdateEventListener.java:293)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsDetached(DefaultSaveOrUpdateEventListener.java:223)
at org.hibernate.event.def.DefaultUpdateEventListener.performSaveOrUpdate(DefaultUpdateEventListener.java:33)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
at org.hibernate.impl.SessionImpl.fireUpdate(SessionImpl.java:564)
at org.hibernate.impl.SessionImpl.update(SessionImpl.java:552)
at org.hibernate.impl.SessionImpl.update(SessionImpl.java:544)
at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiProperty(XWikiHibernateStore.java:1726)
at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiCollection(XWikiHibernateStore.java:1072)
at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:582)
at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:181)
at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:174)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1309)
I suggest we apply the patch to 2.1, but leave the functionality deactivated in xwiki.cfg until 2.2 so there is
time to see if there are any latent issues. I don't expect any but I don't know what it might do with corrupt
data in storage.
Better safe than sorry.
Caleb James DeLisle
Hi,
I'd like to add:
* List<AttachmentName> getAttachments(DocumentName documentName)
throws Exception;
* byte[] getAttachmentContent(AttachmentName attachmentName) throws
Exception;
And deprecate:
* List<String> getAttachmentURLs(DocumentName documentName, boolean
isFullURL) throws Exception;
* byte[] getAttachmentContent(String documentName, String
attachmentName) throws Exception;
I need this fix a bug in the Script Macro when using jarurls parameter
(for 2.0.1).
Here's my +1
Thanks
-Vincent