Hi (Thomas),
I’ve found a regression while analyzing why http://ci.xwiki.org/job/xwiki-platform/org.xwiki.platform$xwiki-platform-re… is failing.
The inline action works fine and correctly sets the cdoc (which contains the template content copied to the new doc).
The issue is that when inline.vm executes (evaluateTemplate()), this calls getVelocityContext() which calls XWikiScriptContextInitializer and this line (added in rev 955505595b95784876777a7059fb3bc725c01776) is executed:
setDocument(scriptContext, "cdoc", cdoc, xcontext);
This line executes:
private void setDocument(ScriptContext scriptContext, String key, XWikiDocument document, XWikiContext xcontext)
{
Document previousDoc = (Document) scriptContext.getAttribute(key);
if (previousDoc == null || !previousDoc.getDocumentReference().equals(document.getDocumentReference())) {
Document apiDocument = document.newDocument(xcontext);
scriptContext.setAttribute(key, apiDocument, ScriptContext.ENGINE_SCOPE);
}
}
And since there’s a previousDoc, it’s set as the cdoc and thus then editinline.vm executes the cdoc is the original one and not the one modified by the InlineAction.java code (ie with the template copied).
Apparently this commit was done in:
https://github.com/xwiki/xwiki-platform/commit/955505595b95784876777a7059fb…
@Thomas: could I let you handle this? (since I don’t know this code and its logic).
Thanks
-Vincent
Hello devs,
Since Nested Spaces has been introduced in XWiki, the need of configuring
some applications at space level has also appeared.
There are already some configurable sections at space level: Look & Feel
(Presentation, Page Elements, PanelWizard), Users & Groups (Rights: Page &
Children, Rights: Page) but they are not using the configurable class and
they are defined in
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwi…
having perSpace key.
The new installed applications that have a configuration page, can't be
configured now at space level and what I'm proposing in order to ease the
way this can be achieved is to add a new boolean property perSpace to the
XWiki.ConfigurableClass class.
Another idea would be to create a mix between this non-existing property
and existing configureGlobally property and to create a new one with some
options: Wiki, Wiki & space, Space but this involves a lot of changes tha
might not worth the effort.
WDYT?
Thanks,
Alex
Hi devs (especially Thomas),
Just making sure we agree about the future of exports:
* Rewrite our various Exports (PDF, HTML, etc) code to use the FilterStream Module
* Modify the Page Export UI to use the FilterStream API/script service + and add an extension point (or an XClass) so that extension can contribute new Export types in the UI
* Modify the Admin Export UI to do the same
* Register the PDF, HTML, XAR, etc exports to register against those extension points
* Modify the XFF extension to do the same
Do we agree?
Thanks
-Vincent
Hi devs
http://jira.xwiki.org/browse/XWIKI-13623
I would like to discuss the suggested solution, before I start implementing
it:
*I suggest the following solution:*
Introducing a nested DocumentLoader class which loads the document calling
the basestore loadXWikiDoc in a synchronized getDocOrLoad method. The
DocumentLoader objects gets instantiated in the cacheStore on a cache miss.
It then gets stored in a ConcurrentHashMap using the same key which is used
for the document cache (DocumentReference including language). Using
putIfAbsent to insert the DocumentLoader and calling the synchronized load
method on the object in the map solves the memory visibility issue and
moreover ensures that the same XWikiDocument is not loaded multiple times
concurrently from the database. It is still possible to load different
documents in parallel. A DocumentLoader will load the XWikiDocument only
once and the returns the identical document object on any following call of
the synchronized getDocOrLoad method.
WDYT?
Kind Regards,
Fabian
Hi, Fitz,
As you probably know (from Google's mail), the final evaluation is coming
up.
We`d like you to start getting ready for it and let us know what you have
been up to in the last period.
As Google suggests, it would also be a good idea to ask for some feedback
before submitting the final evaluation and URL to the work done (from your
part), just to make sure everything is in order.
It would also be a good idea to resume communication, since it`s been a bit
low lately and we are not getting enough feedback from you recently.
Hope to hear from you soon!
-Eduard
Hi Thomas and all,
Back from holidays! :)
I’ve noticed that the new feature of counting installed extensions on e.x.o is having a drawback: it saturates the activity stream, making it very hard to see real edits by users. Every day the scheduler modifies lots of wiki pages to set the new install count. See for example: http://www.xwiki.org/xwiki/bin/view/Main/News
I think a simple change would be for the scheduler to make modifications as minor edits. This should prevent the edits from being visible in the AS.
WDYT?
Now this is going to cause another real issue very soon: pages will soon start to have a lot of revisions and we know this is currently a performance issue. It’s also hiding real edits in the history making the history a bit less clean.
I guess an option would be for the scheduler to delete the last revision after it updates a page. Although not very nice, it could work for now. WDYT?
Thanks
-Vincent
Hello XWiki devs,
I was wondering if there is an Event which gets published when an
XWikiDocument first gets loaded, or a good way of adding such an event? I
have been looking for such an event, but one does not appear to exist and
to add one looks like it would require making changes to the
XWikiHibernateStore to have it fire events on load.
I am looking for a way to intercept documents when they are first being
loaded so I can populate some of their objects from an external source and
avoid the issue of having many joins when working with documents with a
large number of objects. My other thought is to use a custom hibernate
mapping to get this data for a custom table I can populate in other ways,
but I would prefer the event driven approach.
Thanks!
~Vincent