• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item5922: $formfield data not being displayed in formatted searches

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Urgent Closed   patch 4.2.4

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

In testing an upgrade from 4.1.2 to 4.2.2 I've found that formatted %SEARCHes are not showing $formfield() data. e.g.

%SEARCH{ "Back to\:__ ProcurementTracking" casesensitive="on" type="regex" nosearch="on" nototal="on" format="|$formfield(Description)|$topic|"}%

returns this

||ProcurementReq0002|
||ProcurementReq0003|
||ProcurementReq0004|

The topics are found but the Description form field isn't being displayed. This is a simplified example--no matter which fields I try none of them will display. he form data shows up fine on the topics themselves.

This worked fine in 4.1.2. I ported over all my topics for the test, so I haven't yet tried creating a topic with a new form from scratch and %SEARCHing for it.

-- TWiki:Main/BillGunter - 13 Aug 2008

Ah, this behavior is observed when the 'H' attribute is set on the field in the form definition.

-- TWiki:Main.BillGunter - 13 Aug 2008

caused by http://develop.twiki.org/~twiki4/cgi-bin/view/Bugs/Item5668 it seems

-- TWiki:Main.SvenDowideit - 13 Aug 2008

Ah, it bit me too (broke the BlogAddOn). I propose the following fix:

  • when formatted search calls $meta->renderFormFieldForDisplay it adds a new attribute showhidden to the $attrs parameter
  • the check for the H attribute in renderForDisplay is skipped if showhidden is there
I append the patch formfield-hiddens-v1.patch for you to test on this topic. Apply via
patch -p0 <formfield-hiddens-v1.patch
And see if it fixes correctly this bug

-- TWiki:Main.ColasNahaboo - 15 Aug 2008

I cannot see from above that Bill is working on a fix. So being Worked On by Bill seems a wrong assessment.

-- KennethLavrsen - 19 Aug 2008

Well, my patch seem from my test to correct the bug and not introduce other bugs, so I put myself back in Waiting For, and will commit on SVN (trunk & 4.2)

-- TWiki:Main.ColasNahaboo - 20 Aug 2008

Commited as SVN revision 17458 (trunk) and 17459 (branches/TWikiRelease04x02)

-- TWiki:Main.ColasNahaboo - 26 Aug 2008

I've recently upgraded from 4.2.0 to 4.2.3 using the TWiki-4.2.3-upgrade.tgz and I'm experiencing the same issue with hidden fields not being addressable by the formfield variable in formatted searches. I've tried the patch listed above, but it didn't seem to make any difference. Is there anything else I should be doing?

I've made a test topic called JagTest with a form called "FormClient" with the following searches in the topic contents:

Related Services(on): %SEARCH{ "JagTest.*" scope="topic" type="regex" nosearch="on" showhidden="on" nototal="on" format="$topic - $formfield(RelatedServices)" }% 
Related Services(1): %SEARCH{ "JagTest.*" scope="topic" type="regex" nosearch="on" showhidden="1" nototal="on" format="$topic - $formfield(RelatedServices)" }% 
Related Services: %SEARCH{ "JagTest.*" scope="topic" type="regex" nosearch="on" nototal="on" format="$topic - $formfield(RelatedServices)" }% 

I wasn't sure if showhidden was intended to be an internal value or an option to the formatted search so I tried several alternatives.

But I'm still seeing the same behaviour, if the form field RelatedServices is hidden, the above displays nothing, if it is not hidden, it displays correctly.

After reading the Current State section of the attached form, I've set this back to New. I hope this is OK (I'm new to this bug tracker)

-- TWiki:Main.JeffreyGrace - 17 Sep 2008

This fix is implemented on our subversion and will be in 4.2.4.

The 4.2.3 was pushed out in a hurry to close a security hole and unfortunately the fix for this known problem was not included in the rushed out version.

The fix checked in can be seen in TWikirev:17459

I should put this back in waiting for release but I will check the fix first since you say that the patch did not work and I believe the attached patch is the same as the checked in fix.

-- TWiki:Main.KennethLavrsen - 18 Sep 2008

Code in SVN works. I can display hidden fields with a formatted search.

Waiting for release again.

Sorry we did not get this fix into 4.2.3. Even though I am the release manager I did not get a chance to get this one into the release even though it is on the Known Problems page. But we will make a 4.2.4 soon that picks up this and a couple of other annoyances. Within 1-2 weeks. I promise wink

-- TWiki:Main.KennethLavrsen - 18 Sep 2008

And then something happened...

-- TWiki:Main.ArthurClemens - 01 Dec 2008

The release happened, with release new manager Sopan... Thanks Sopan!

-- TWiki:Main.PeterThoeny - 09 Dec 2008

ItemTemplate
Summary $formfield data not being displayed in formatted searches
ReportedBy TWiki:Main.BillGunter
Codebase 4.2.1, 4.2.2, 4.2.3
SVN Range TWiki-5.0.0, Mon, 11 Aug 2008, build 17408
AppliesTo Engine
Component

Priority Urgent
CurrentState Closed
WaitingFor

Checkins TWikirev:17459
TargetRelease patch
ReleasedIn 4.2.4
Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatpatch formfield-hiddens-v1.patch r1 manage 1.4 K 2008-08-15 - 22:27 UnknownUser Proposed fix, apply with patch -p0
Edit | Attach | Watch | Print version | History: r16 < r15 < r14 < r13 < r12 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r16 - 2008-12-09 - PeterThoeny
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback