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

[BUG] ActiveRecord::RecordNotFound (Couldn't find Project with identifier=undefined): #4

Closed
dkastl opened this issue Feb 20, 2020 · 3 comments · Fixed by #19
Closed
Assignees
Labels
bug Something isn't working

Comments

@dkastl
Copy link
Member

dkastl commented Feb 20, 2020

Describe the bug

F, [2019-08-23T21:05:04.528924 #21015] FATAL -- :   
F, [2019-08-23T21:05:04.529149 #21015] FATAL -- : ActiveRecord::RecordNotFound (Couldn't find Project with identifier=undefined):
F, [2019-08-23T21:05:04.529199 #21015] FATAL -- :   
F, [2019-08-23T21:05:04.529262 #21015] FATAL -- : app/models/project.rb:316:in `find'
plugins/redmine_text_blocks/app/controllers/text_blocks_controller.rb:81:in `find_project_by_project_id'

undefined cause may be client side.

@dkastl dkastl added the bug Something isn't working label Feb 20, 2020
@sanak sanak self-assigned this Mar 4, 2022
@sanak
Copy link
Member

sanak commented Mar 4, 2022

I encounter the same issue, so I will try to solve the issue.

@sanak
Copy link
Member

sanak commented Mar 7, 2022

This issue only happen when accessible projects is only one and $("#issue_project_id").val() returns undefined.
https://github.com/gtt-project/redmine_text_blocks/blob/main/assets/javascripts/text_blocks.js#L40

url: "/text_blocks_by_status/"+$("#issue_status_id").val()+"/"+$("#issue_project_id").val(),

At this moment, I am thinking to change routes as follows, but more careful investigation will be better to make it sure.

  • Before: /text_blocks_by_status/:status_id/:project_id
  • After: /text_blocks_by_status/:status_id?project_id=(project_id)&issue_id=(issue_id)

@sanak
Copy link
Member

sanak commented Mar 13, 2022

Well, embedding project_id seems to be possible, so I keep current API endpoint and fixed this issue on #19.

@sanak sanak closed this as completed in #19 Mar 14, 2022
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
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants