Item13208: Unable to set parent from edit URL.
Priority: Urgent
Current State: Closed
Released In: n/a
Target Release:
Working through the
TestCaseAmISane, discovered that the path:
<a href='%SCRIPTURL{"edit"}%/%WEB%/QuickScriptsCheck?topicparent=TestCaseAmISane&onlynewtopic=1&text=TEST%20PASSED%20-please%20save%20the%20topic"&t=%GMTIME{"$epoch"}%'>click here</a>
Followed by clicking "Save" on
NatEdit panel fails to apply the topicParent.
Reviewing the firebug net trace, the post to Save fails to copy the topicParent from the urlparams to the post.
--
GeorgeClark - 13 Jan 2015
Use of topicparent isn't completely documented, but reading the code in Foswiki::UI::Edit and Foswiki::UI::Save, the following applies
- If topicparent is a string, then it's validated and set as the topic. Topic does not have to exist.
- If topicparent is present, but empty, it's ignored. Topic parent remains as is
- If topicparent is set to
none
, then the parent is removed.
Two problems were found.
- The nat edit template does not include topicparent in the "save" form submission.
- The nat edit javascript changes empty topicparent to
none
, unsetting the parent if #1 is fixed.
Michael this needs review. My first try at fixing this was to add a new value 'same' and apply it as the URLPARAM default, but results were inconsistent. I fought with that for a while, but the easiest solution is to go with what UI::Save and UI::Edit already have coded. and remove the hack from natedit javascript that changes the empty string to none.
Please review. Thanks
--
GeorgeClark - 13 Jan 2015
Setting the topicparent in
NatSkin is broken now.
Having to enter "none" into a
topicparent
formfield to remove the topic parent is a usability problem that NatEdit is working around using javascript.
The problem we have
now stems from the fact that we completely disabled the "Settings" tab holding the
topicparent
formfield which normally is being used to set things like the topic parent.
As the settings tab under
PatternSkin is barely empty only containing the set-topic-parent feature we removed it ... and with it the
topicparent
formfield now missing.
The proper solution is to use the
formparameters
TMPL:DEF from the base skin and redefine it differently in
NatSkin required to bring back setting the topicparent as part of the edit interface.
--
MichaelDaum - 13 Jan 2015
We've been trying to figure out why the settings tab disappeared in
NatEdit under pattern skin. We used it a lot, and found editing the parent while changing content very natural. A note about this in the change history would have been useful.
--
JacobEtches - 25 Nov 2015