You are here: Foswiki>Tasks Web>Item1277 (15 Aug 2010, ArthurClemens)Edit Attach

Item1277: Using "Edit data" link of the PersonalInfoAddOn handles TML values not fully correctly

pencil
Priority: Normal
Current State: Closed
Released In:
Target Release: n/a
Applies To: Extension
Component: PersonalInfoAddOn
Branches:
Reported By: IngoKappler
Waiting For:
Last Change By: ArthurClemens
I am using the following values in some form lines:

%FORMFIELD{"FirstName" topic="%BASEWEB%.%BASETOPIC%"}%.%FORMFIELD{"LastName" topic="%BASEWEB%.%BASETOPIC%"}%@company.com

%INCLUDE{ "%USERSWEB%.WikiCodeOneClickPhonebook" section="CallURLWorkPhone" }%

%INCLUDE{ "%USERSWEB%.WikiCodeOneClickPhonebook" section="CallURLWorkPhoneMobile" }%

%INCLUDE{ "%USERSWEB%.WikiCodeOneClickPhonebook" section="CallURLWorkPhoneExtension" }%

On my system this results in a phone number that can be clicked on to trigger a call via Asterisk.

But when using "Edit data" this content is not kept as is and upon saving will be destroyed, resulting in an emptied field from end user perspective.

In fact before saving the related meta data looks like that:

<nope>%META:FIELD{name="WorkEmail" attributes="H" title="<nop>WorkEmail" value="%25FORMFIELD%7b%22FirstName%22 topic=%22%25BASEWEB%25.%25BASETOPIC%25%22%7d%25.%25FORMFIELD%7b%22LastName%22 topic=%22%25BASEWEB%25.%25BASETOPIC%25%22%7d%25@company.com"}%

<nope>%META:FIELD{name="WorkPhone" attributes="H" title="<nop>WorkPhone" value="%25INCLUDE%7b %22%25USERSWEB%25.WikiCodeOneClickPhonebook%22 section=%22CallURLWorkPhone%22 %7d%25"}%

<nope>%META:FIELD{name="WorkPhoneMobile" attributes="H" title="<nop>WorkPhoneMobile" value="%25INCLUDE%7b %22%25USERSWEB%25.WikiCodeOneClickPhonebook%22 section=%22CallURLWorkPhoneMobile%22 %7d%25"}%

<nope>%META:FIELD{name="WorkPhoneExtension" attributes="H" title="<nop>WorkPhoneExtension" value="%25INCLUDE%7b %22%25USERSWEB%25.WikiCodeOneClickPhonebook%22 section=%22CallURLWorkPhoneExtension%22 %7d%25"}%

After saving via "Edit data" it'll look like that (without the <nope>):

<nope>%META:FIELD{name="WorkEmail" attributes="H" title="<nop>WorkEmail" value=""}%

<nope>%META:FIELD{name="WorkPhone" attributes="H" title="<nop>WorkPhone" value="%25INCLUDE%7b %22%25USERSWEB%25.WikiCodeOneClickPhonebook%22 section=%22CallURLWorkPhone%22 %7d%25"}%

<nope>%META:FIELD{name="WorkPhoneMobile" attributes="H" title="<nop>WorkPhoneMobile" value="%25INCLUDE%7b %22%25USERSWEB%25.WikiCodeOneClickPhonebook%22 section=%22CallURLWorkPhoneMobile%22 %7d%25"}%

<nope>%META:FIELD{name="WorkPhoneExtension" attributes="H" title="<nop>WorkPhoneExtension" value="%25INCLUDE%7b %22%25USERSWEB%25.WikiCodeOneClickPhonebook%22 section=%22CallURLWorkPhoneExtension%22 %7d%25"}%

While writing this I discovered that the INCLUDE statements are left intact. I just changed that. This shows a workaround by using an INCLUDE in favor of FORMFIELD so the FORMFIELD stuff is "outsourced" wink from direct editing.

Because the "Edit data" is not exactly doing the same as the normal edit modes I also opened the related support question http://foswiki.org/Support/Question96. The default edit modes didn't have that issue.

-- IngoKappler - 13 Mar 2009

Fixed in addon version 1.6.

-- ArthurClemens - 15 Aug 2010

ItemTemplate edit

Summary Using "Edit data" link of the PersonalInfoAddOn handles TML values not fully correctly
ReportedBy IngoKappler
Codebase 1.0.3
SVN Range Foswiki-1.0.3, Sat, 28 Feb 2009, build 2773
AppliesTo Extension
Component PersonalInfoAddOn
Priority Normal
CurrentState Closed
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn
Topic revision: r2 - 15 Aug 2010, ArthurClemens
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy