Hi,
I apologize in advance for the lengthy email. I am using XWiki
Enterprise 2.0.24043 now, after upgrading from 1.9.2 recently. I have
some custom classes created a year ago and I have tried to convert all
their pages to 2.0 syntax. There have been quite a few problems I have
been able to solve, but there is one that I am quite confused about.
I need the pages that have these class objects to default to inline edit
mode since that is the only useful way for the users to enter the data.
In the older (pre 2.0) version this happened automatically -- although I
don't know why, it was like magic -- and things were fine. Now when the
user clicks the edit menu it automatically goes to WYSIWYG (or wiki
depending on the user). I thought I could get around this by redirecting
the edit to inline, I think I was able to do this in older versions of
xwiki. I have tried many versions of code like this:
{{velocity filter="none"}}
## check for admin is so that I can still edit pages in wiki as normal,
## but non admin users should get the inline version
#set($hasGlobalAdmin = $xwiki.hasAccessLevel("admin", $context.user,
"XWiki.XWikiPreferences"))
#if($context.action == 'edit' && !$hasGlobalAdmin)
## for redirection, I tried a few different methods like
## $response.sendRedirect($doc.getURL('inline'))
## and this
$response.sendRedirect($xwiki.getURL($doc.name, 'inline'))
## tried with and without the stop
#stop
#else
{{include document="Projects.TestRequestClassSheet"/}}
#end
{{/velocity}}
but instead is does this crazy thing of sending the entire page to a
WYSIWYG editor (meaning the entire xwiki page with the top menus,
panels, everything) with the page I am trying to edit showing as if it
was inline but not actually editable. The URL in the browser doesn't
change at all.
However if I just choose the inline edit mode to start or type in the
url "/xwiki/bin/inline/Projects/mynewtestrequest" for example that works
like it should.
I tried upgrading to XWiki Enterprise 2.0.3.24848 and the behavior
persists. I fear I am going to have to get into the java code to find a
solution, which means a lot more work -- so I am appealing to the group
to see if there is something easier that I am not seeing. It appears to
me that the $redirect support has changed somehow.
TIA for your help!
Regan