Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-11767

[Search service] Wrong callback call because of "back button" support

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • 4.8.0, 4.7.11
    • None
    • Plugin : Search
    • None

      I have a search service with a specific callback function when relauching search

      <xsl:variable name="callback-function">callbackForm</xsl:variable>
      
      function callbackForm()
      {
           loadCarousel_<xsl:value-of select="$uniqueId"/>();
      }
      

      When refreshing my page there is a JS error

      Uncaught ReferenceError: loadCarousel_8219369493732178 is not defined
          at callbackForm (eval at relaunchSearch (SearchService.fr.js:590:13), <anonymous>:3:5)
          at applyCallback (SearchService.fr.js:404:29)
          at onSuccess (SearchService.fr.js:133:9)
          at Object.success (SearchService.fr.js:610:25)
          at fire (jquery.js:3268:46)
          at Object.fireWith [as resolveWith] (jquery.js:3398:25)
          at done (jquery.js:9305:26)
          at XMLHttpRequest.<anonymous> (jquery.js:9548:33)
      

      The id of loadCarousel is not the good one (it is the precede one)
      Seems due to the handle of back button support, see SearchService.relaunchSearch

      See https://demo.ametys.org/nightly-intranet/intranet-search/fr/index.html

            raphael Raphaƫl Franchet
            laurence Laurence Aumeunier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: