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

HTTP Error on Model & updating creator #3336

Closed
Zottelchen opened this issue Dec 27, 2024 · 1 comment · Fixed by #3354
Closed

HTTP Error on Model & updating creator #3336

Zottelchen opened this issue Dec 27, 2024 · 1 comment · Fixed by #3354
Labels
bug Something isn't working

Comments

@Zottelchen
Copy link

Describe the bug
Some specific models can not be viewed in Version 0.91.3 (5bc2583).

To Reproduce

  1. Search for specific model
  2. Try to open the page
  3. See the error message
  4. Find issue about something similiar happening with creators creators page http Status Error 500 #3304
  5. Try to remove (Patreon) link from creator
  6. Also see error message

Expected behavior
The pages should load

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Electron

Additional context
Log Output when viewing model:

app-1          | 18:48:01 rails.1              | F, [2024-12-27T18:48:01.678165 #173] FATAL -- : [030b57fc-1b9e-43c2-89ca-822c62012d79]
app-1          | 18:48:01 rails.1              | [030b57fc-1b9e-43c2-89ca-822c62012d79] ActionView::Template::Error (undefined method `at_address' for nil):
app-1          | 18:48:01 rails.1              | [030b57fc-1b9e-43c2-89ca-822c62012d79]
app-1          | 18:48:01 rails.1              | Causes:
app-1          | 18:48:01 rails.1              | [030b57fc-1b9e-43c2-89ca-822c62012d79] NoMethodError (undefined method `at_address' for nil)
app-1          | 18:48:01 rails.1              | [030b57fc-1b9e-43c2-89ca-822c62012d79]     2:   <%= tag.meta property: "og:type", content: "website" %>
app-1          | 18:48:01 rails.1              | [030b57fc-1b9e-43c2-89ca-822c62012d79]     3:   <%= tag.meta property: "og:image", content: model_model_file_url(@model, @model.preview_file, format: @model.preview_file.extension) if @model.preview_file&.is_image? && !@model.sensitive %>
app-1          | 18:48:01 rails.1              | [030b57fc-1b9e-43c2-89ca-822c62012d79]     4:   <%= tag.meta name: "description", content: truncate(sanitize(@model.notes), length: 80) if @model.notes.present? %>
app-1          | 18:48:01 rails.1              | [030b57fc-1b9e-43c2-89ca-822c62012d79]     5:   <%= tag.meta name: "fediverse:creator", content: "@#{@model.creator.federails_actor.at_address}" if @model.creator %>
app-1          | 18:48:01 rails.1              | [030b57fc-1b9e-43c2-89ca-822c62012d79]     6: <% end %>
app-1          | 18:48:01 rails.1              | [030b57fc-1b9e-43c2-89ca-822c62012d79]     7:
app-1          | 18:48:01 rails.1              | [030b57fc-1b9e-43c2-89ca-822c62012d79]     8: <% content_for :page_header do %>
app-1          | 18:48:01 rails.1              | [030b57fc-1b9e-43c2-89ca-822c62012d79]
app-1          | 18:48:01 rails.1              | [030b57fc-1b9e-43c2-89ca-822c62012d79] app/views/models/show.html.erb:5
app-1          | 18:48:01 rails.1              | [030b57fc-1b9e-43c2-89ca-822c62012d79] app/views/models/show.html.erb:1
app-1          | 18:48:01 rails.1              | [030b57fc-1b9e-43c2-89ca-822c62012d79] app/controllers/models_controller.rb:36:in `block (2 levels) in show'
app-1          | 18:48:01 rails.1              | [030b57fc-1b9e-43c2-89ca-822c62012d79] app/controllers/models_controller.rb:21:in `show'
app-1          | 18:48:01 rails.1              | [030b57fc-1b9e-43c2-89ca-822c62012d79] app/controllers/application_controller.rb:86:in `switch_locale'

Log Output when removing link from creator:

app-1          | 18:52:23 rails.1              | I, [2024-12-27T18:52:23.901329 #154]  INFO -- : [d33f4711-3199-4ef5-a0b3-1dae113d9cd0] {"method":"PATCH","path":"/creators/kb3d","format":"html","controller":"CreatorsController","action":"update","status":500,"allocations":5498,"duration":73.29,"view":0.0,"db":19.52,"@timestamp":"2024-12-27T18:52:23.901Z","@version":"1","message":"[500] PATCH /creators/kb3d (CreatorsController#update)"}
app-1          | 18:52:23 rails.1              | F, [2024-12-27T18:52:23.902873 #154] FATAL -- : [d33f4711-3199-4ef5-a0b3-1dae113d9cd0]
app-1          | 18:52:23 rails.1              | [d33f4711-3199-4ef5-a0b3-1dae113d9cd0] NameError (undefined local variable or method `create_actor' for an instance of Creator):
app-1          | 18:52:23 rails.1              | [d33f4711-3199-4ef5-a0b3-1dae113d9cd0]
app-1          | 18:52:23 rails.1              | [d33f4711-3199-4ef5-a0b3-1dae113d9cd0] app/models/concerns/federails_common.rb:8:in `actor'
app-1          | 18:52:23 rails.1              | [d33f4711-3199-4ef5-a0b3-1dae113d9cd0] app/models/concerns/followable.rb:30:in `followable_post_update_activity'
app-1          | 18:52:23 rails.1              | [d33f4711-3199-4ef5-a0b3-1dae113d9cd0] app/controllers/creators_controller.rb:66:in `update'
app-1          | 18:52:23 rails.1              | [d33f4711-3199-4ef5-a0b3-1dae113d9cd0] app/controllers/application_controller.rb:86:in `switch_locale'
@Floppy
Copy link
Collaborator

Floppy commented Dec 27, 2024

Thanks! I'll get a fix out for that.

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
Development

Successfully merging a pull request may close this issue.

2 participants