question suggestions fail on long typed questions

XMLWordPrintable

    • Severity 3 - Minor

      NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.

      If you start typing in a question into the 'ask' form, after a while it starts throwing a 500 error:

      I replicated this with the string:
      Accepted translations don't apply - gibberish can't be the solution

      However, I'm seeing it with numerous strings, I think it's just dependent on the length of the question.

      [Django] Error (EXTERNAL IP): /questions/related_questions/

      Traceback (most recent call last):

      File "/opt/python/domains/atlassian.com/answers/lib/python2.6/site-packages/django/core/handlers/base.py", line 100, in get_response
      response = callback(request, *callback_args, **callback_kwargs)

      File "/opt/python/domains/atlassian.com/answers/ADM-22445/forum/views/commands.py", line 687, in related_questions
      can_rank, questions = Question.objects.search(request.POST['title'])

      File "/opt/python/domains/atlassian.com/answers/ADM-22445/forum/modules/decorators.py", line 77, in decoratable_method
      return decoratable(self, *args, **kwargs)

      File "/opt/python/domains/atlassian.com/answers/ADM-22445/forum/modules/decorators.py", line 55, in _call_
      res = self._callable(*args, **kwargs)

      File "/opt/python/domains/atlassian.com/answers/ADM-22445/forum/modules/decorators.py", line 30, in <lambda>
      self._callable = lambda *args, **kwargs: fn(origin, *args, **kwargs)

      File "/opt/python/domains/atlassian.com/answers/ADM-22445/forum_modules/parsingsearch/handlers.py", line 36, in question_search
      tree = query_to_tree(parsed, base_queryset)

      File "/opt/python/domains/atlassian.com/answers/ADM-22445/forum_modules/parsingsearch/tree.py", line 258, in query_to_tree
      tree.add(a)

      File "/opt/python/domains/atlassian.com/answers/ADM-22445/forum_modules/parsingsearch/tree.py", line 94, in add
      combinators = [type(self.current, node, combinator) for applies, type in self.rules if applies(self.current, node)]

      File "/opt/python/domains/atlassian.com/answers/ADM-22445/forum_modules/parsingsearch/tree.py", line 80, in <lambda>
      lambda n1, n2: (n1.type & TreeNode.TYPE_TAG) or (n2.type & TreeNode.TYPE_TAG),

      TypeError: unsupported operand type(s) for &: 'unicode' and 'int'

              Assignee:
              eternicode
              Reporter:
              Jeremy Largman
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: