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

Linked question error when using short IDs #1277

Open
davispuh opened this issue Mar 10, 2025 · 0 comments
Open

Linked question error when using short IDs #1277

davispuh opened this issue Mar 10, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@davispuh
Copy link

Describe the bug

ERROR        question_common/question.go:712        get linked question ids error code: 500, reason: base.database_error, message: , error: pq: invalid input syntax for type bigint: "D112"
/home/runner/work/answer/answer/internal/repo/question/question_repo.go:744 github.com/apache/answer/internal/repo/question.(*questionRepo).GetLinkedQuestionIDs
/home/runner/work/answer/answer/internal/service/question_common/question.go:710 github.com/apache/answer/internal/service/question_common.(*QuestionCommon).UpdateQuestionLink
/home/runner/work/answer/answer/internal/service/content/question_service.go:359 github.com/apache/answer/internal/service/content.(*QuestionService).AddQuestion
/home/runner/work/answer/answer/internal/controller/question_controller.go:473 github.com/apache/answer/internal/controller.(*QuestionController).AddQuestion
/home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:185 github.com/gin-gonic/gin.(*Context).Next
/home/runner/work/answer/answer/internal/base/middleware/auth.go:168 github.com/apache/answer/internal/base/server.NewHTTPServer.(*AuthUserMiddleware).MustAuthAndAccountAvailable.func11
/home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:185 github.com/gin-gonic/gin.(*Context).Next
/home/runner/go/pkg/mod/github.com/anargu/[email protected]/gin_brotli.go:71 github.com/apache/answer/internal/base/server.NewHTTPServer.Brotli.func3
/home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:185 github.com/gin-gonic/gin.(*Context).Next
/home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:633 github.com/gin-gonic/gin.(*Engine).handleHTTPRequest
/home/runner/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:589 github.com/gin-gonic/gin.(*Engine).ServeHTTP
/opt/hostedtoolcache/go/1.22.11/x64/src/net/http/server.go:3142 net/http.serverHandler.ServeHTTP
/opt/hostedtoolcache/go/1.22.11/x64/src/net/http/server.go:2044 net/http.(*conn).serve
/opt/hostedtoolcache/go/1.22.11/x64/src/runtime/asm_amd64.s:1695 runtime.goexit

See https://github.com/apache/answer/blob/v1.4.2/internal/entity/question_link_entity.go#L35

To Reproduce

Steps to reproduce the behavior:

  1. Admin => Settings => SEO => Permalink
  2. Switch to short form
  3. Ask a question

Expected behavior

No error and linked question functionality working.

Screenshots

Image

Platform

  • Device: Desktop
  • OS: Linux
  • Browser and version: Firefox
  • Version: 1.4.2 (revision: 0fd7e81)
@davispuh davispuh added the bug Something isn't working label Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant