You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe the following code change fixes the issue properly:
<%# case where question has not been answered sufficiently to display%>
--- <% if @show_unanswered && blank %>
+++ <% if @show_sections_questions && @show_unanswered && blank %><br><p><%= _('Question not answered.') -%></p><br><br>
--- <% else %>
+++ <% elsif @show_sections_questions %><%# case where Question has options %><% if options.present? && options.any? %><ul><% options.each do |opt| %><li><%= opt.text %></li><% end %></ul><% end %><%# case for RDA answer display %><% if question[:format].rda_metadata? && !blank %><% ah = answer.answer_hash %><% if ah['standards'].present? %><ul><% ah['standards'].each do |id, title| %><li><%= title %></li><% end %></ul><% end %><p><%= sanitize ah['text'] %></p><br><%# case for displaying comments OR text %><% elsif !blank %><%= sanitize answer&.text %><br><br><% end %><% end %>
The text was updated successfully, but these errors were encountered:
Please complete the following fields as applicable:
What version of the DMPRoadmap code are you running? (e.g. v2.2.0)
v4.1.0
Expected behaviour:
roadmap shouldn't crash when I export a plan to pdf
Actual behaviour:
getting something went wrong when exporting a particular plan to pdf
Steps to reproduce:
given the following plan:
plan_65686_phase_5714_20230920T095452Z.pdf
If I try to download it in pdf format with no Optional plan components checked, or only the "unanswered questions" component checked:
Roadmap crashes with the infamous "something went wrong" message, and, in the logs, I can find this:
possible fix:
I believe the following code change fixes the issue properly:
The text was updated successfully, but these errors were encountered: