Hi,
Following on the model emails, I'd also like to do the following:
* Introduce a new Model component to access the Model objects from the
Execution Context (same as we do for other modules to prevent everyone
from directly accessing the EC). For now I have:
/**
* Allows accessing Model Objects for current objects (current
document, current wiki, current space, etc) placed in
* the Execution Context.
*
* @version $Id$
* @since 2.2M1
*/
@ComponentRole
public interface Model
{
/**
* @return the current document located in the Execution Context
or null if no current document exist
*/
DocumentName getCurrentDocumentName();
}
I'll also like to add getCurrentWikiName() and getCurrentSpaceName()
later on.
* Move *DocumentNameSerializer in Model module (currently in xwiki-core)
* Move *DocumentNameFactory in Model module (currently in xwiki-core)
Here's my +1
Thanks
-Vincent
PS: FYI here's how I have implemented Model for now:
/**
* Default implementation bridging to the old XWiki Context to get
current Model Objects.
*
* @version $Id$
* @since 2.2M1
*/
@Component
public class DefaultModel implements Model
{
/**
* The Execution Context from which we get the old XWiki Context
from which we get the current Model Objects.
*/
@Requirement
private Execution execution;
/**
* {@inheritDoc}
* @see org.xwiki.model.Model#getCurrentDocumentName()
*/
public DocumentName getCurrentDocumentName()
{
DocumentName result = null;
// TODO: This is bridge to the old XWiki Context since we
currently don't store the current document in the
// new Execution Context yet. Remove when we do so.
try {
Map<Object, Object> xcontext =
(Map<Object, Object>)
this.execution.getContext().getProperty("xwikicontext");
Object currentDocument = xcontext.get("doc");
result = (DocumentName)
currentDocument
.getClass().getMethod("getDocumentName").invoke(currentDocument);
} catch (Exception e) {
// Shouldn't happen in normal cases. Could happen if the
context doesn't contain the old XWiki Context
// but that would be a bug in the initialization system
somewhere.
}
return result;
}
}
Hi devs,
I'd like to disable the WYSIWYG sync plugin (the one that adds
experimental support for real time editing) in the WYSIWYG code till we
clean and refactor it. The main reason is to reduce the size of the
JavaScript code generated by GWT:
641.3 KB when enabled
545.2 KB when disabled
The technical explanation:
The sync plugin uses a diff Java library ported by Ludovic to GWT. This
library uses the generic Object class in lots of places. Instances of
classes defined in this library are passed from the client to the server
and back, and so they have to be serialized and deserialized. When
fields of Object type or List<Object> or Object[] are deserialized on
the client, GWT doesn't know the concrete type and thus generates
JavaScript code to handle every possibility (i.e. all classes
implementing IsSerializable tag interface). This increases a lot the
size of the JavaScript code. Here's the warning we get during GWT
compilation:
http://pastebin.com/m61aa381f
mainly:
[WARN] In order to produce smaller client-side code, 'Object' is not
allowed; consider using a more specific type
To disable the WYSIWYG syntax plugin I have to comment one line of code:
// WysiwygEditorFactory.java
pfm.addPluginFactory(SyncPluginFactory.getInstance());
and to remove an import. GWT compiles to JavaScript only the code that
is really used.
Here's my +1
Thanks,
Marius
Hi Asiri,
This is mostly for you but sending here for others to see and comment
if they want. While working on adding support for wiki macro
visibility I have found the following issues in the existing wiki
macro code:
1) Usage of String for document names instead of DocumentName class.
I've fixed this.
2) Printing logs in all methods instead of sending exceptions on
errors. I've fixed this too.
3) Bad test strategy for testing DefaultWikiMacro. It's not needed to
use RenderingTests with test files. I've fixed this.
4) Missing several tests in DefaultWikiMacro. I have not fixed this.
5) Bad strategy for providing user feedback on macro registration. I
believe we shouldn't implement registration as an event listener and
instead have a Wiki Macro management page with register/unregister
buttons and when clicked the result is printed on the page. This
should probably be done as a replacement of the WikiMacros page in the
wiki macro bridge application. WDYT? I've not fixed this.
6) Programming rights required to access macro params. I have not
fixed this.
7) There was a bug with parameter ordering I have fixed a few weeks
ago but I'm mentionning it here for completeness.
8) Context restoration in DefaultWikiMacro. It's currently not in a
finally block and thus it's possible it's not restored if there are
exceptions raised. I have not fixed this.
9) Missing some comments for complex code portions. For ex in
DefaultWikiMacro for the inline macro stuff. I have not fixed this.
10) Systematic setting of null values not required in lots of place. I
have fixed all I saw.
11) DefaultWikiMacro only executes Macro Transformations but not other
Transformations. I think this is a problem. I have not fixed this.
12) Several classes had full javadoc but the checkstyle config wasn't
set in the POM, thus allowing checkstyle errors to creep in unnoticed.
I have only partially fixed this. Please check all classes that can be
added and fix the few that still have errors.
13) Missing tests for the Event Listener but because of 5) I haven't
added them.
14) Missing at least one functional test to prove everything works.
Thanks
-Vincent
Hi,
I have the need to get the current wiki (which is different from the
wiki defined in the current doc for my use case).
I'd like to add a DAB.getCurrentWiki().
Here's my +1
Thanks
-Vincent
Hi,
I'd like to add:
boolean isDocumentEditable(DocumentName documentName);
And deprecate:
boolean isDocumentEditable(String documentName);
Here's my +1
Thanks
-Vincent
The XWiki development team is pleased to announce the release of XWiki
Enterprise and XWiki Enterprise Manager 2.0.5.
This is the last bug fix and enhancement release for 2.0 branch.
It contains several important bugfixes like support of non ASCII
character in Go to, Search and Document Index or proper UTF8 support
when creating a sub wiki.
For more information see the Release notes at:
http://www.xwiki.org/xwiki/bin/view/Main/ReleaseNotesXWikiEnterprise205
and http://www.xwiki.org/xwiki/bin/view/Main/ReleaseNotesXEM205
Thanks
-The XWiki dev team
Hi,
Wiki macros currently require programming rights and thus are limited
and in addition cannot be created in subwikis by the majority of users.
Since I've now almost finished implementing component isolation I'd
like to agree on what we want for wiki macros.
Proposal:
* Modify the wiki macro class to add a "Visibility" field with 2 values:
- visible only in the current wiki
- visible to everyone
* Visible to everyone will require admin rights
* Make the macro available to a user only if that user has view rights
to the wiki macro page. This is to allow making a wiki macro private
(when testing for example). It also allows making a macro visible only
to a given group of users.
Note: I considered having a "visible only to the current user" value
for the Visibility field but I don't think it means much since if
someone else edit the page and saves it, then suddenly the macro
becomes visible only to that person...
WDYT?
Thanks
-Vincent
The XWiki development team is pleased to announce the release of XWiki
Office 1.0.
Go grab it at:
http://www.xwiki.org/xwiki/bin/view/Main/Download#HXWikiOffice
Summary of features for XOffice 1.0:
- Create new wiki pages
- Open and edit existing wiki pages in Word
- Download and edit attachments
- Upload attachments
- Export Word documents to the wiki
- Wiki Explorer
Main changes since XOffice 1.0 RC1:
- Supported XWiki versions are now: 2.0.4, 2.1 and above
- fixed saving issue for XWiki 2.0 syntax
- faster startup
- fixed focus issues
View detailed release notes at:
http://www.xwiki.org/xwiki/bin/view/Main/ReleaseNotesXOffice10
For more information about XOffice visit:
http://xoffice.xwiki.org/xwiki/bin/view/Main/WebHome
Thanks,
-The XWiki dev team
Hi everyone,
Here's a proposal Guillaume and I have prepared for the XE 2.2 roadmap.
- XWiki committers: I have assigned some devs based on past work.
Please confirm if it's ok for you or not. You can also suggest other
stuff you'd like to do if you think you'll have the time
- XWiki contributors: Please let us know if you're willing to
participate and on the topic you're interested in participating to
- XWiki users: Please let us know if we have forgotten something
important
Must have (Priority 1):
- Wiki Macro isolation for XEM (Vincent)
- WCAG (Jean-Vincent + Vincent + Sergiu + Caty)
- User Profile UI (Caty + Jean-Vincent)
- Google Gadgets integration (scope to be defined by Anamaria)
- Bug fix + stabilization (All)
- Patch application (Volunteer needed)
-- Lucene patches
-- Performance patches
- i18 rendering (Thomas)
- Annotations (Anca)
Nice to have (Priority 2):
- ColorTheme UI improvement
- Watchlist UI
- xwiki.org improvements:
-- use new skin + new colors
-- horizontal navigation
-- Home page redesign
-- Download page redesign
-- Project page design
-- Support page redesign
Dates:
- 2.2M1: 28 Dec 2009
- 2.2M2: 18 Jan 2010
- 2.2RC1: 1er Feb 2010
- 2.2 RC2/Finale: 8 Feb 2010
Thanks
-Vincent
The XWiki development team is pleased to announce the release of XWiki
Enterprise and XWiki Enterprise Manager 2.1
Go grab it at http://www.xwiki.org/xwiki/bin/view/Main/Download
Main changes from 2.0.x:
* Re-design of the actions menus
* The Blog application is now using the xwiki/2.0 syntax and the new
WYSIWYG editor
* Allow XWiki.XWikiAllGroup to be an implicit group, containing all
the users without explicitly listing them as objects
* When renaming a page, also update the "parent" field of subpages
(Patch from Caleb James De Lisle)
* Updated translations : de (including WYSIWYG), es, fr (including
WYSIWYG), gl, lv, nl, pl, ro, sv, zh
* New renderer for mathematical formulae based on the Google Chart APIs.
* Lots of improvements and bugfixes in order to conform to the Web
Content Accessibility Guidelines (WCAG).
* Macro parameter pretty names are now displayed in the WYSIWYG
* WYSIWYG editor performance improvement (Minimize and aggregate
WYSIWYG editor stylesheets at build time to reduce the number of HTTP
requests)
* Ability to register a component for the current user or for the
current wiki instead of globally. Note that this will be used in the
near future to allow registering Wiki Macros in multiwiki mode without
the macros being visible in other wikis.
* Upgraded to JbossCache 3.2.1GA version
* Upgraded to Groovy 1.7 Beta 2
For more information see the Release notes at:
http://www.xwiki.org/xwiki/bin/view/Main/ReleaseNotesXWikiEnterprise21http://www.xwiki.org/xwiki/bin/view/Main/ReleaseNotesXEM21
Thanks
-The XWiki dev team
I'd like to suggest borrowing an idea from Gmail and HDWiki. Try
http://www.hudong.com/editdocauth/%E9%A3%8E%E5%8A%9B%E5%8F%91%E7%94%B5
I've created a jira "idea" at http://jira.xwiki.org/jira/browse/XWIKI-4660,
with some screen-shots.
In the current 2.0 editor, it's not convenient to create a wiki link (to an
existing page or a non-existing page alike).
I suggest the following UI flow:
1. Select some text.
2. Click a button "internal link". The selected text will become a wiki link
to a page of the current space, no matter whether the page exists or not.
3. Move the input cursor over the text, a float window will appear beside
it. On it, there are "open" "change", and "remove".
Besides, there can be a shortcut, Ctrl + Q. Just like Ctrl + B or Ctrl + I.
WDYT?
--
-- Zhaolin Feng
-- www.mapbar.com
-- Currahee! We stand alone together!
Hi Devs,
I've looked into Google Guice to find out what's the buzz is all about. But
as far as I can understand (with only about 30 mins scan through their user
guide), XWiki Component management framework is more flexible than Guice.
I'm not a Guice user but being familiar with XWiki Components, the closest
thing I found on Guice was JIT bindings:
http://code.google.com/p/google-guice/wiki/JustInTimeBindings.
With access to ComponentManager, XWiki Component management framework
provides components the ability to lookup for component implementations
dynamically using a component hint, I didn't see anything similar in Guice.
Am I missing something? Are these two frameworks mutually exclusive or
something?
Thanks.
- Asiri
Hi,
When i try to insert a macro when editing a page in wysiwyg mode, i have the
exception below.
i work with virtual wikis, the problem doesn't exist in the main wiki, just
in virtual wikis.
Can you help me ?
<html><head><title>Apache Tomcat/6.0.18 - Rapport
d'erreur</title><style><!--H1
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}
B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
{color : black;}A.name {color : black;}HR {color :
#525D76;}--></style> </head><body><h1>Etat HTTP 500 - </h1><HR
size="1" noshade="noshade"><p><b>type</b> Rapport
d'exception</p><p><b>message</b> <u></u></p><p><b>description</b>
<u>Le serveur a rencontr� une erreur interne () qui l'a emp�ch�
de satisfaire la requ�te.</u></p><p><b>exception</b>
<pre>java.lang.NullPointerException
com.xpn.xwiki.doc.DefaultDocumentNameFactory.getContext(DefaultDocumentNameFactory.java:188)
com.xpn.xwiki.doc.DefaultDocumentNameFactory.getDefaultWikiName(DefaultDocumentNameFactory.java:156)
com.xpn.xwiki.doc.DefaultDocumentNameFactory.createDocumentName(DefaultDocumentNameFactory.java:112)
com.xpn.xwiki.doc.XWikiDocument.setFullName(XWikiDocument.java:3741)
com.xpn.xwiki.XWiki.getDocument(XWiki.java:1407)
com.xpn.xwiki.XWiki.getXWiki(XWiki.java:464)
com.xpn.xwiki.wysiwyg.server.filter.XWikiContextInitializationFilter.initializeXWikiContext(XWikiContextInitializationFilter.java:115)
com.xpn.xwiki.wysiwyg.server.filter.XWikiContextInitializationFilter.doFilter(XWikiContextInitializationFilter.java:80)
com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:117)
com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295)
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
</pre></p><p><b>note</b> <u>La trace compl�te de la cause m�re de
cette erreur est disponible dans les fichiers journaux de Apache
Tomcat/6.0.18.</u></p><HR size="1" noshade="noshade"><h3>Apache
Tomcat/6.0.18</h3></body></html>
--
Farouk Korteby
Hi devs,
FYI Maven 3.0 alpha 5 builds XWiki fine. It wasn't the case with alpha
4 but I reported an issue and they fixed it.
So we're ready for Maven 3.0 when it comes out.
Thanks
-Vincent
Hi xwikiers,
I just tough now that we are currently distribution XEM with MySQL
included in it and that we maybe don't have right to do it actually.
I'm not an expert so not sure what we should do but distribute GPL
stuff in a package declared as LGPL is forbidden AFAIK.
WDYT ?
--
Thomas Mortagne
On 12/06/2009 03:17 PM, tmortagne (SVN) wrote:
> Author: tmortagne
> Date: 2009-12-06 15:17:45 +0100 (Sun, 06 Dec 2009)
> New Revision: 25574
>
> Modified:
> platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/store/DatabaseProduct.java
> platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
> Log:
> XWIKI-4076: Database for a newly created wiki does not support utf8
>
> Modified: platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/store/DatabaseProduct.java
> ===================================================================
> --- platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/store/DatabaseProduct.java 2009-12-06 14:04:05 UTC (rev 25573)
> +++ platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/store/DatabaseProduct.java 2009-12-06 14:17:45 UTC (rev 25574)
> @@ -61,6 +61,11 @@
> public static final DatabaseProduct DB2 = new DatabaseProduct("DB2/");
>
> /**
> + * The product name for MySQL databases.
> + */
> + public static final DatabaseProduct MYSQL = new DatabaseProduct("MySQL");
> +
> + /**
> * Represents an unknown database for which we were not able to find the product name.
> */
> public static final DatabaseProduct UNKNOWN = new DatabaseProduct("Unknown");
> @@ -127,6 +132,8 @@
> } else if (productNameAsString.startsWith(DB2.getProductName())) {
> // See documentation above on why we check starts with for DB2
> product = DB2;
> + } else if (productNameAsString.equalsIgnoreCase(MYSQL.getProductName())) {
> + product = MYSQL;
> } else {
> product = UNKNOWN;
> }
>
> Modified: platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
> ===================================================================
> --- platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java 2009-12-06 14:04:05 UTC (rev 25573)
> +++ platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java 2009-12-06 14:17:45 UTC (rev 25574)
> @@ -241,6 +241,13 @@
> stmt.execute("CREATE SCHEMA " + schema + " AUTHORIZATION DBA");
> } else if (DatabaseProduct.DB2 == databaseProduct) {
> stmt.execute("CREATE SCHEMA " + schema);
> + } else if (DatabaseProduct.MYSQL == databaseProduct) {
> + // TODO: find a proper java lib to convert from java encoding to mysql charset name and collation
> + if (context.getWiki().getEncoding().equals("UTF-8")) {
> + stmt.execute("create database " + schema + " CHARACTER SET utf8 COLLATE utf8_bin");
utf8_bin also means that mysql becomes case sensitive.
> + } else {
> + stmt.execute("create database " + schema);
> + }
> } else {
> stmt.execute("create database " + schema);
> }
Q: Does this also affect the main database, or just virtual wikis?
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
Hi,
I'm trying to run xwiki-enterprise-manager-mysql-2.0.4 jetty version on
mysql db xwiki2, username xwiki2, passw xwiki2, but it keeps trying to
access database xwiki, and not xwiki2.
See exception here:
Wrapped Exception: Access denied for user 'xwiki2'@'localhost' to database
'xwiki'
http://ana-s-private-labs.pastebin.com/m20b049f4
My hibernate.cfg.xml is here:
http://ana-s-private-labs.pastebin.com/m3861ac33
1. <!-- MySQL configuration.
2. Uncomment if you want to use MySQL and comment out other
database configurations.
3. We need to set the sql_mode to a less strict value, see
XWIKI-1945
4. -->
5. <property
name="connection.url">jdbc:mysql://localhost/xwiki2?useServerPrepStmts=false&useUnicode=true&characterEncoding=UTF-8&sessionVariables=sql_mode=''</property>
6. <property name="connection.username">xwiki2</property>
7. <property name="connection.password">xwiki2</property>
8. <property
name="connection.driver_class">com.mysql.jdbc.Driver</property>
9. <property
name="dialect">org.hibernate.dialect.MySQLDialect</property>
10. <property
name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
11. <property name="connection.pool_size">2</property>
12. <property name="statement_cache.size">2</property>
13. <mapping resource="xwiki.hbm.xml"/>
14. <mapping resource="feeds.hbm.xml"/>
15. <mapping resource="activitystream.hbm.xml"/>
I then just changed the hibernate.cfg.xml to try to connect to a xwiki4 db
(without actually creating it), and it tries to connect to db xwiki4,
getting this exception this time:
org.apache.commons.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory (Access denied for user 'xwiki2'@'localhost'
to database 'xwiki4')
http://ana-s-private-labs.pastebin.com/m129d56b2
But after I actually create the database xwiki4, and give all rights to user
xwiki2, I get again the first exception, trying to connect to db xwiki, and
not xwiki4.
What am I doing wrong?
Thanks,
Anamaria
Hi everyone,
Just to let you know I'm creating the 2.1 branches for core, web and
XE. Make sure you commit on both branch + trunk in case you are fixing
a blocking bug that must go in the 2.1 release.
Thanks
-Vincent
The XWiki development team is pleased to announce the release of XWiki
Enterprise 2.1 Release Candidate 1.
Go grab it at http://www.xwiki.org/xwiki/bin/view/Main/Download
It's the first and hopefully only release candidate of the 2.1 version.
Main changes from 2.1 Milestone 1:
* The Blog application is now using the xwiki/2.0 syntax and the new
WYSIWYG editor
* Allow XWiki.XWikiAllGroup to be an implicit group, containing all
the users without explicitly listing them as objects
* When renaming a page, also update the "parent" field of subpages
(Patch from Caleb James De Lisle)
* [Platform] Ability to register a component for the current user or
for the current wiki instead of globally. Note that this will be used
in the near future to allow registering Wiki Macros in multiwiki mode
without the macros being visible in other wikis.
* Updated translations : de (including WYSIWYG), es, fr (including
WYSIWYG), gl, lv, nl, pl, ro, sv, zh
* All Features and Improvements also present in XWiki Enterprise 2.0.4
For more information see the Release notes at:
http://www.xwiki.org/xwiki/bin/view/Main/ReleaseNotesXWikiEnterprise21RC1
Thanks
-The XWiki dev team
Hi devs,
Currently when you attach or delete a new file on a document it does
not produce any document related event. Thing is it does modify the
document but since it bypass XWiki#saveDocument it does not produce
any event.Whic mean currently to know that an attachment as been added
you can only listen to upload action event (and it works only if it
has been done with the UI).
I propose to make attachment modification also produce document
modification events.
WDYT ?
Here is my +1
--
Thomas Mortagne