Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-13119

Pressing the search button always appends previous search query to proposed new query.

      When on the blank sitesearch (http://myhost01:8089/dosearchsite.action) , the easiest to reproduce this bug is: just press the search button over and over again. My search query ends up having lots of ", , , , , , , , , , , , , , , ".
      It always extends the new proposed query field with the query text of the previous search. Happens in every Browser tested, so it doesn't look like a browser-problem to me; Firefox 2 and 3, IE 6

      In general, search seems borked since 2.9. But that's another issue.

        1. search.js
          2 kB
        2. searchextenderbug.gif
          searchextenderbug.gif
          72 kB

            [CONFSERVER-13119] Pressing the search button always appends previous search query to proposed new query.

            I've attached the source for anyone who wishes to use this as a patch.

            You will need to override the contents of includes/js/search.js with this file. I haven't confirmed with versions of Confluence this will be compatible with.

            Andrew Lynch (Inactive) added a comment - I've attached the source for anyone who wishes to use this as a patch. You will need to override the contents of includes/js/search.js with this file. I haven't confirmed with versions of Confluence this will be compatible with.

            Yesss, it works fine

            Antoine Gehl added a comment - Yesss, it works fine

            Hi Bruno.

            If you want to manually make the change on your version of Confluence you should edit the file .../includes/js/search.js and replace lines 3 - 9 with the following Javascript code:

            var transferQueryStringValue = function() { /* do nothing */ };
            var supportingSiteSearchForm = $('#supporting-site-search-form');
                
            if (supportingSiteSearchForm.length) {
                supportingSiteSearchForm.append($('#query-string')).append(' ').append($('#search-query-submit-button'));
                $('#site-search-form').prepend('<input type="hidden" id="hidden-query-string" name="queryString">');        
                transferQueryStringValue = function() {
                    $("#hidden-query-string").val($("#query-string").val());
                };        
            }
            
            

            Paul Curren added a comment - Hi Bruno. If you want to manually make the change on your version of Confluence you should edit the file .../includes/js/search.js and replace lines 3 - 9 with the following Javascript code: var transferQueryStringValue = function() { /* do nothing */ }; var supportingSiteSearchForm = $( '#supporting-site-search-form' ); if (supportingSiteSearchForm.length) { supportingSiteSearchForm.append($( '#query-string' )).append( '&nbsp;' ).append($( '#search-query-submit-button' )); $( '#site-search-form' ).prepend( '<input type= "hidden" id= "hidden-query-string" name= "queryString" >' ); transferQueryStringValue = function() { $( "#hidden-query-string" ).val($( "#query-string" ).val()); }; }

            I'm using a theme plugin and I also have this issue.

            Paul, "was an issue"? Could Altassian please share the fix so we can hack previous versions of confluence (2.9.2 in my case)?

            Bruno Duarte added a comment - I'm using a theme plugin and I also have this issue. Paul, "was an issue"? Could Altassian please share the fix so we can hack previous versions of confluence (2.9.2 in my case)?

            TidoL added a comment -

            Yeah, we have got the same problem, we are using the left navigation theme.

            TidoL added a comment - Yeah, we have got the same problem, we are using the left navigation theme.

            Is there any other workaround for this? For us, setting the global theme to the default is not an option, because it will remove our customized dashboard (global.vmd).

            PS: This issue should be updated with affects version 2.9.2 and maybe 2.10 as well.

            Wouter Hermeling added a comment - Is there any other workaround for this? For us, setting the global theme to the default is not an option, because it will remove our customized dashboard (global.vmd). PS: This issue should be updated with affects version 2.9.2 and maybe 2.10 as well.

            Hi Antoine

            Sorry, this issue still occurs in 2.9.2 - there is no fix for it yet.

            A workaround is to use the default Global Theme. You can still use the other themes for individual spaces, and the search will work as expected.

            Mark

            Mark Hrynczak (Inactive) added a comment - Hi Antoine Sorry, this issue still occurs in 2.9.2 - there is no fix for it yet. A workaround is to use the default Global Theme. You can still use the other themes for individual spaces, and the search will work as expected. Mark

            Hi,

            this is resolved or not? there is a fix for confluence 2.9.1? or is it fixed in confluence 2.9.2?

            Thanks

            Antoine Gehl added a comment - Hi, this is resolved or not? there is a fix for confluence 2.9.1? or is it fixed in confluence 2.9.2? Thanks

            Issue reopened:-

            To reproduce, the Global Theme must be set to something other than the Default Theme. Then the search field acts as described.

            Mark Hrynczak (Inactive) added a comment - - edited Issue reopened:- To reproduce, the Global Theme must be set to something other than the Default Theme. Then the search field acts as described.

            Hi Paul,

            I'm moving this ticket to https://support.atlassian.com/browse/CSP-24054 to be handled by Confluence Support.

            Cheers
            Roy

            Roy Hartono [Atlassian] added a comment - Hi Paul, I'm moving this ticket to https://support.atlassian.com/browse/CSP-24054 to be handled by Confluence Support. Cheers Roy

              pcurren Paul Curren
              c109c7e8ba85 Paul-Dieter Klumpp
              Affected customers:
              11 This affects my team
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: