Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

#5: Post edited by user avatar Trilarion‭ · 2022-01-13T21:34:02Z (about 2 years ago)
  • In a fresh development instance I went to `http://localhost:3000/mod` and got a 500 Server Error related to
  • ```
  • ActionView::Template::Error (No route matches {:action=>"new", :controller=>"posts", :post_type=>nil}, possible unmatched constraints: [:post_type]):
  • 34: <div class="widget">
  • 35: <div class="widget--body">
  • 36: <i class="fas fa-file-alt"></i>
  • 37: <%= link_to 'Create Help Page', new_post_path(post_type: HelpDoc.post_type_id) %>
  • 38: </div>
  • 39: </div>
  • 40: </div>
  • app/views/moderator/index.html.erb:37:in `_app_views_moderator_index_html_erb___3348426895881517021_62660'
  • ```
  • How can I fix this?
  • It might be related to [How can I add post types to a category?](https://collab.codidact.org/posts/285516)
  • P.S.: I redid the setup of QPixel and the error is not reproducible again.
  • In a fresh development instance I went to `http://localhost:3000/mod` and got a 500 Server Error related to
  • ```
  • ActionView::Template::Error (No route matches {:action=>"new", :controller=>"posts", :post_type=>nil}, possible unmatched constraints: [:post_type]):
  • 34: <div class="widget">
  • 35: <div class="widget--body">
  • 36: <i class="fas fa-file-alt"></i>
  • 37: <%= link_to 'Create Help Page', new_post_path(post_type: HelpDoc.post_type_id) %>
  • 38: </div>
  • 39: </div>
  • 40: </div>
  • app/views/moderator/index.html.erb:37:in `_app_views_moderator_index_html_erb___3348426895881517021_62660'
  • ```
  • How can I fix this?
  • It might be related to [How can I add post types to a category?](https://collab.codidact.org/posts/285516)
  • P.S.: I redid the setup of QPixel and this error is not reproducible even though the db:seed error still is. Will close as "not constructive".
#4: Question closed by user avatar Trilarion‭ · 2022-01-13T21:33:10Z (about 2 years ago)
#3: Post edited by user avatar Trilarion‭ · 2022-01-12T21:46:42Z (about 2 years ago)
update with repeated
  • In a fresh development instance I went to `http://localhost:3000/mod` and got a 500 Server Error related to
  • ```
  • ActionView::Template::Error (No route matches {:action=>"new", :controller=>"posts", :post_type=>nil}, possible unmatched constraints: [:post_type]):
  • 34: <div class="widget">
  • 35: <div class="widget--body">
  • 36: <i class="fas fa-file-alt"></i>
  • 37: <%= link_to 'Create Help Page', new_post_path(post_type: HelpDoc.post_type_id) %>
  • 38: </div>
  • 39: </div>
  • 40: </div>
  • app/views/moderator/index.html.erb:37:in `_app_views_moderator_index_html_erb___3348426895881517021_62660'
  • ```
  • How can I fix this?
  • It might be related to [How can I add post types to a category?](https://collab.codidact.org/posts/285516)
  • In a fresh development instance I went to `http://localhost:3000/mod` and got a 500 Server Error related to
  • ```
  • ActionView::Template::Error (No route matches {:action=>"new", :controller=>"posts", :post_type=>nil}, possible unmatched constraints: [:post_type]):
  • 34: <div class="widget">
  • 35: <div class="widget--body">
  • 36: <i class="fas fa-file-alt"></i>
  • 37: <%= link_to 'Create Help Page', new_post_path(post_type: HelpDoc.post_type_id) %>
  • 38: </div>
  • 39: </div>
  • 40: </div>
  • app/views/moderator/index.html.erb:37:in `_app_views_moderator_index_html_erb___3348426895881517021_62660'
  • ```
  • How can I fix this?
  • It might be related to [How can I add post types to a category?](https://collab.codidact.org/posts/285516)
  • P.S.: I redid the setup of QPixel and the error is not reproducible again.
#2: Post edited by user avatar Trilarion‭ · 2022-01-09T11:42:53Z (about 2 years ago)
better title
  • How to fix ActionView::Template::Error (No route matches {:action=>"new", :controller=>"posts", :post_type=>nil}?
  • How to fix ActionView::Template::Error (No route matches {:action=>"new", :controller=>"posts", :post_type=>nil} when visiting the moderator page?
#1: Initial revision by user avatar Trilarion‭ · 2022-01-09T11:41:32Z (about 2 years ago)
How to fix ActionView::Template::Error (No route matches {:action=>"new", :controller=>"posts", :post_type=>nil}? 
In a fresh development instance I went to `http://localhost:3000/mod` and got a 500 Server Error related to

```
ActionView::Template::Error (No route matches {:action=>"new", :controller=>"posts", :post_type=>nil}, possible unmatched constraints: [:post_type]):
    34:     <div class="widget">
    35:       <div class="widget--body">
    36:         <i class="fas fa-file-alt"></i>
    37:         <%= link_to 'Create Help Page', new_post_path(post_type: HelpDoc.post_type_id) %>
    38:       </div>
    39:     </div>
    40:   </div>

app/views/moderator/index.html.erb:37:in `_app_views_moderator_index_html_erb___3348426895881517021_62660'
```

How can I fix this?

It might be related to [How can I add post types to a category?](https://collab.codidact.org/posts/285516)