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

Error 500 internal server error when trying to print data table #401

Merged
merged 15 commits into from
Apr 30, 2024

Conversation

jonrandahl
Copy link
Contributor

@jonrandahl jonrandahl commented Apr 30, 2024

This PR resolves the error reported in ticket #396 by updating the print presenter to use .try(:first) which resolves by returning nil without failing if the requested element does not have the method .first, i.e. is empty or nil

Additional Changes:

  • Updated the print template to include the Google Analytics tracking script for the print page as well as importing shared header content for unification of presentation
  • Minor tweaks to the Makefile to remove duplicate variables (SHORTNAME) as well as introducing new targets for check and local for streamlined development tasks, alongside removing incorrect and erroneous commands where applicable
  • Reorganised .gitignore file to improve readability as well as added comments to group and explain rule application
  • Removed duplicated rubocop command
  • Reorganised gemfile to create test specific group and lock gem versions to current version of Ruby in use
  • Minor Rubocop fixes including preventing rubocop from parsing the bin/s-query file which is used to resolve the fallback location for the Apache Jena Fuseki s-query file added in this commit
  • Updated deployment.yml to change dev-infrastructure branch name to dev following branch cleanup

using `.try(:first)` resolves by returning `nil` without failing if the requested element does not have the method `.first`, i.e. is empty
Adjusted template to include google analytics in print requests as well as carried over other improvements in header elements
Minor tweaks to the Makefile to remove duplicate variables (`SHORTNAME`) as well as introducing new targets for `check` and `local` for streamlined development tasks
removed `:unit` from test target as that doesn't exist
Organised specific gems into test group as well as locked gem versions to the current ruby version where applicable
Removed incorrect instructions, re-grouped build commands into the assets target, applied the same target where previously invoking manually; finally, updated the test target to use rake test and removed the system test command as it's not required at this moment
set `config.cache_classes=false` to allow Spring to reload assets
set `ENV['API_SERVICE_URL']` to `ENV.fetch('API_SERVICE_URL', nil)` as Rubocop continued to complain
removes auth target, as well as echos for tracking, alongside reassigning NAME instead of REPO where applicable
@jonrandahl jonrandahl self-assigned this Apr 30, 2024
Copy link
Contributor

@bogdanadrianmarc bogdanadrianmarc left a comment

Choose a reason for hiding this comment

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

LGTM

changes branch name from `dev-infrastructure` to `dev` in response to branch cleanup
@jonrandahl jonrandahl merged commit c115d54 into dev Apr 30, 2024
2 checks passed
@jonrandahl jonrandahl deleted the issue/396-error-500-internal-server-error-fix branch April 30, 2024 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants