On 21/3/19 8:37 am, Brian Burch wrote:
On 21/3/19 8:00 am, Dirk Frederickx wrote:
Hi Brian,
As far as I can see, nothing has changed on the plain editor w.r.t. the
_editedtext parameter name.
You can still use it to overwrite the content of the edit area.
Thanks very much, Dirk. You have helped me to decide which of the two
possible problem determination "trees" to follow first.
Well! I have just solved the problem...
Murphy would have been pleased - out of my TWO alternatives, it was the
THIRD one!
I thought about Dirk's comment about the URL and planned to apologise
for re-typing it in parts from my written notes. Instead, I took his
comment about the _editedtext parameter still being supported.
I started with very simple examples of primer text to creat the new page
with Edit.jsp. I was quite surprised to see that my URL Encoding of
space and single quote characters were expanded properly in the new wiki
page...
Next, I took the five special characters in my in the primer text
generated by my plugin. I don't remember why, but these have never been
URL-encoded. Any one of these characters was sufficient to break the
page creation process, generating the HTTP 400 This Page is Not Working
error from tomcat.
The characters are backslash, open and close braces, open and close
square brackets. One I replaced then in my hand-coded _editedtext URL,
the new page generation process worked perfectly!
I haven't done the research, but I strongly suspect my plugin was broken
after 8 years of stability by a tomcat CVE intended to prevent malicious
URL constructions.
So I need to make a code change to my plugin and all will be well again..
Thanks for your help, Dirke, you saved me a lot of wasted time.
Brian
One of my first new JIRAs (hopefully this weekend) is about the recent
"change" in tomcat8 classloading behaviour, which means our "old" advice
about putting your extra wiki jars into WEB-INF/lib/ no longer works.
However, I have a much neater workaround (no war surgery) where I think
I can get it loaded in time by the most appropriate class loader and
before it needs to be used. (That logic changed or was clarified in the
TC docs late last year).
I will work on my problem today with a lot of focus and optimism after
your very helpful reply.
Brian
However, I would have expected to see another edit URL, i.e. without
/wiki
:
https://my.web.server/Edit.jsp?page=<pageIdentification>&_editedtext=<my
plugin
invocation>
Hope this helps a bit,
dirk
On Wed, Mar 20, 2019 at 8:03 AM Brian Burch <br...@pingtoo.com> wrote:
Janne Jalkanen helped me resolve this requirement of my PhotoCollection
plugin in February 2009! I have not needed to make a change since that
time and use the "feature" all the time.
It stopped working on my production wiki late in 2018, along with some
other things not directly related to JSPWiki for which I will open and
hopefully close JIRAs very soon.
It might be related to my in-place upgrade to jspwiki-2.10.3-git-32, but
perhaps not. I ought to RTFM, but I thought a quick question might
produce an obvious answer to one of the developers and thus would be
usefully documented in the mailing list archives. If not, I will do more
research and answer the question myself in due course.
I decided it was best to open a new thread, rather than try to revive
one that is 10 years old!!!
Janne told me the following:-
On 26/2/09 6:28 am, Janne Jalkanen wrote:>>
>> Why do you feel _editedtext should not be an officially supported
>> feature? Is there a better way to do something similar, or are you
>> hoping to develop something better in the future?
>
> It only works with the current incarnation of the plain editor.
If you
> use FCK, the parameter is different.
>
> Because it is a part of JSPWiki internals, it's currently not
officially
> supported or documented. My comment should not be taken as a value
> judgement as to its potential worthiness as an official supported
> feature later on. I was just simply stating a fact of its
current level
> of support. If we want to make it an officially supported feature, I
> think it needs a bit more discussion as to whether this is the
correct way.
>
> But it's stayed the same for the last three major versions, and
is not
> seen to change in 3.0 either.
>
> /Janne
When I append &_editedtext="mystuff" to the automatically generated url,
e.g.
https://my.web.server/wiki/Edit.jsp?page=<pageIdentification>&_editedtext='<my
plugin invocation>'
I get back the following error message:-
HTTP error 400 - this is not working
Not surprisingly, if I remove the _editedtext parameter and its data, I
drop straight into being asked to create a new page and (obviously) have
no help from the plugin to insert the correct INSERT stuff.
Can I hear any distant bells ringing??
Yours hopefully, but puzzled,
Brian