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

Eager Load fails in decidim templates #105

Open
wants to merge 3 commits into
base: release/0.28-stable
Choose a base branch
from

Conversation

laurajaime
Copy link
Collaborator

🎩 What? Why?

When you try to load the list of templates on the user lock screens, an error occurs:


user.session"=>{"last_request_at"=>1733933695}, "user_return_to"=>"/processes/upgrade-028", "_csrf_token"=>"cLpENAN6XcmcLCv7xedeYQEwJUbAjcVtWbCmW83SBgM="}
I, [2024-12-11T17:16:19.192509 #3728716]  INFO -- : [1eb25616-0c76-456a-bb08-d6d266139979] Processing by Decidim::Admin::BlockUserController#new as HTML
I, [2024-12-11T17:16:19.192585 #3728716]  INFO -- : [1eb25616-0c76-456a-bb08-d6d266139979]   Parameters: {"user_id"=>"17"}
I, [2024-12-11T17:16:19.260142 #3728716]  INFO -- : [1eb25616-0c76-456a-bb08-d6d266139979]   Rendered /home/participabc/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/decidim-admin-0.28.4/app/views/decidim/admin/block_user/new.html.erb within layouts/decidim/admin/global_moderations (Duration: 45.1ms | Allocations: 9535)
I, [2024-12-11T17:16:19.260234 #3728716]  INFO -- : [1eb25616-0c76-456a-bb08-d6d266139979]   Rendered layout /home/participabc/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/decidim-admin-0.28.4/app/views/layouts/decidim/admin/global_moderations.html.erb (Duration: 45.3ms | Allocations: 9596)
I, [2024-12-11T17:16:19.260668 #3728716]  INFO -- : [1eb25616-0c76-456a-bb08-d6d266139979] Completed 500 Internal Server Error in 68ms (ActiveRecord: 0.6ms | Allocations: 25683)
F, [2024-12-11T17:16:19.261657 #3728716] FATAL -- : [1eb25616-0c76-456a-bb08-d6d266139979]
[1eb25616-0c76-456a-bb08-d6d266139979] ActionView::Template::Error (undefined local variable or method `block_user_templates' for #<ActionView::Base:0x00000000052170>):
[1eb25616-0c76-456a-bb08-d6d266139979]     1: <% if block_user_templates.any? %>
[1eb25616-0c76-456a-bb08-d6d266139979]     2:   <div class="row column">
[1eb25616-0c76-456a-bb08-d6d266139979]     3:     <%= append_javascript_pack_tag "decidim_templates_admin" %>
[1eb25616-0c76-456a-bb08-d6d266139979]     4:
[1eb25616-0c76-456a-bb08-d6d266139979]
[1eb25616-0c76-456a-bb08-d6d266139979] lib/middlewares/redirect_middleware.rb:26:in `call'
I, [2024-12-11T17:16:19.262973 #3728716]  INFO -- : [1eb25616-0c76-456a-bb08-d6d266139979] Processing by Decidim::ErrorsController#internal_server_error as HTML
I, [2024-12-11T17:16:19.263020 #3728716]  INFO -- : [1eb25616-0c76-456a-bb08-d6d266139979]   Parameters: {"user_id"=>"17"}
I, [2024-12-11T17:16:19.301420 #3728716]  INFO -- : [1eb25616-0c76-456a-bb08-d6d266139979]   Rendered /home/participabc/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/bundler/gems/decidim-9dce75551242/decidim-core/app/views/decidim/errors/internal_server_error.html.erb within layouts/decidim/application (Duration: 8.1ms | Allocations: 9095)
I, [2024-12-11T17:16:19.421305 #3728716]  INFO -- : [1eb25616-0c76-456a-bb08-d6d266139979]   Rendered /home/participabc/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/bundler/gems/decidim-9dce75551242/decidim-core/app/cells/decidim/data_consent/dialog.erb (Duration: 0.7ms | Allocations: 982)
I, [2024-12-11T17:16:19.427856 #3728716]  INFO -- : [1eb25616-0c76-456a-bb0

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request does not contain a valid label. Please add one of the following labels: ['type: feature', 'type: change', 'type: fix', 'type: removal', 'target: developer-experience', 'type: internal']

@laurajaime laurajaime changed the title Fix load decidim templates Eager Load fails in decidim templates Dec 16, 2024
@laurajaime laurajaime added the bug Something isn't working label Dec 16, 2024
@laurajaime laurajaime force-pushed the release/0.28-stable_decidim_templates branch from 7023518 to a105bab Compare December 16, 2024 11:11
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

Successfully merging this pull request may close these issues.

2 participants