Loading...
 
Skip to main content

Unwanted result from multiple Custom Search on a page

Status
Open
Subject
Unwanted result from multiple Custom Search on a page
Version
15.x
Category
  • Conflict of two features (each works well independently)
Feature
Search
Wiki Plugin (extends basic syntax)
Resolution status
New
Submitted by
Hersens
Lastmod by
Hersens
Rating
(0)
Description

I added two (2) 'CustomSearch' to a single page in separate sections and separate div id's and different data, the search data and result keeps defaulting to the last CustomSearch on the page. below is the scenario:


{CUSTOMSEARCH}

Custom Search 1 & 2:
Copy to clipboard
{CUSTOMSEARCH( tpl="firstCustomSearch.tpl" id="first_search")} {filter field="tracker_id" content="2"}  {output template="templates/first-template.tpl" pagination="y"}    //output data 1 {CUSTOMSEARCH} //Some texts and logics seprating them here //In another section {CUSTOMSEARCH( tpl="secondCustomSearch.tpl" id="second_search")} {filter field="tracker_id" content="4"}  {output template="templates/second-template.tpl" pagination="y"}    //output data 2 {CUSTOMSEARCH}


//Output

Searches in first_search form field defaults to data on 'output data 2' and displays result also in it's custom_search_result div. With this, it skips the data and search on 'output data 1' entirely.

Perhaps, the fact that they share same js 'customsearch' variable picks the last one, not sure.

Also, the inclusion of 'destdiv' parameter with different id's (of course) resulting to respective output data section enters an infinite JQuery loading blocking the data from being populated on the page. While a rename of 'destdiv' parameter to say 'destinationdiv' (undeclared parameter name, yes) populates the display without the blocking but doesn't affect the behavior of Customsearch (of course).

I hope I've been clear enough with this succinct explanation.

Let me know if you would want an elaborate one.

Importance
6
Easy to solve?
6
Priority
36
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
6237
Created
Monday 09 January, 2017 19:07:01 UTC
by Hersens
LastModif
Monday 09 January, 2017 19:07:01 UTC


Show PHP error messages