I ended up reverting the change on master which was setting the context
wiki whenever the context doc was set. This was causing issues in the wiki
creation process, but I`m sure there would have been other places as well
since we`ve been exploiting this desynchronization between context wiki and
context document in many places and it has become impractical to apply such
a catch-all solution.
For the moment, I`ve applied the same fix on master as I did on the 7.4.x
branch for the translations issue, which consisted of manually setting the
context wiki when the context doc is changed to make sure they are
synchronized.
I suggest we recommend this as a best practice whenever dealing with the
context document. We might even try to come up with some helper method or
something similar with the SUExecutor component to wrap code that should be
executed with a different context wiki or document.
Thanks,
Eduard
On Tue, Mar 1, 2016 at 5:16 PM, Marius Dumitru Florea <
mariusdumitru.florea(a)xwiki.com> wrote:
+1
Thanks,
Marius
On Thu, Feb 25, 2016 at 1:08 PM, Eduard Moraru <enygma2002(a)gmail.com>
wrote:
Hi devs,
I`ve noticed that we have an issue in our context API that allows setting
the context wiki and the context document independently, thus creating
(by
design) a desynchronization between the 2.
The downside is that you can set the context document to something from a
different wiki while the context wiki will not be updated and still
report
the old wiki. Any system/component that relies on
the current context
wiki
will not behave as expected since it will work
with the outdated wiki
instead of using the newly set context document's wiki.
Please see
http://jira.xwiki.org/browse/XWIKI-13138 for more details,
but
what I am proposing here is to make the first
step in that direction and
ensure that at least the context wiki is updated when the context
document
is updated (what I call 1-way sync) to avoid
problems.
Here's my +1.
Also, Thomas has already expressed his concerns that this might be a
risky
change to introduce in 7.4.x, so it will only be
pushed on the 8.x
(master)
branch and for 7.4.x we`ll just set the context
wiki in the right places
to
fix the translations issue.
Thanks,
Eduard
P.S.: I will push this change in master ASAP and, should there be any -1,
revert it.
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs