Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error rendering code search page #28580

Closed
ShayArtzi opened this issue Dec 22, 2023 · 3 comments
Closed

Error rendering code search page #28580

ShayArtzi opened this issue Dec 22, 2023 · 3 comments
Labels

Comments

@ShayArtzi
Copy link

Description

Hello,

Not sure when did this start, but I'm getting the following error when using code search:

An error occurred:

Render failed, failed to render template: explore/code, error: template error: builtin(bindata):code/searchresults:34:83 : executing "code/searchresults" at <Safe>: wrong type for value; expected string; got template.HTML
----------------------------------------------------------------------
								<td class="lines-code chroma"><code class="code-inner">{{.FormattedLines | Safe}}</code></td>
								                                                                           ^
----------------------------------------------------------------------

image

Looks like the search does work but rendering the results fails:
image

I'm using bleve indexer with the following settings:

[indexer]
REPO_INDEXER_ENABLED = true
REPO_INDEXER_PATH = indexers/repos.bleve
MAX_FILE_SIZE = 1048576
REPO_INDEXER_INCLUDE =
REPO_INDEXER_EXCLUDE = resources/bin/**

The above config worked for me until I upgraded to one of the recent version (not sure which update, I haven't used code search for a bit).

I will appreciate any help - thanks very much!

Gitea Version

1.21.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

ubuntu

How are you running Gitea?

Running gitea binary as a systemd service on Ubuntu 22.04

Database

MySQL/MariaDB

@lunny
Copy link
Member

lunny commented Dec 22, 2023

duplicated with #28575 ?

@wxiaoguang
Copy link
Contributor

Please use 1.21 nightly build.

-> Fix 500 error of searching commits (#28576) #28579

@ShayArtzi
Copy link
Author

Thanks all! I really appreciate it :)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants