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

[Publication] Fix baseurl missing from emails #9186

Merged
merged 6 commits into from
Apr 16, 2024

Conversation

skarya22
Copy link
Contributor

@skarya22 skarya22 commented Mar 28, 2024

Brief summary of changes

  • The loris baseURL is now sent from the react pages to the ajax scripts on submit for both editing and uploading a new publication, and then is sent in the email.
  • I did it this way as \NDB_Factory::singleton()->settings()->getBaseURL() does not work in ajax files, and since it is deprecated it made more sense to do a hotfix rather than investigating the issue with ajax.
  • This was noticed and fixed for files in php folders in [survey_accounts] Fixed base URL not being set properly #7807, however that same fix does not work for ajax. Thankfully publication is the only module with ajax still that uses getBaseUrl().
image

Testing instructions (if applicable)

  1. Open the publication module and propose a project, enter a real email and make sure to press send email to lead investigator.
  2. Check your email and confirm that the link is complete
  3. Try editing a publication and make sure that the email is sent as well

Link(s) to related issue(s)

@driusan
Copy link
Collaborator

driusan commented Apr 2, 2024

@skarya22 the static checks on this are failing.

@driusan driusan self-assigned this Apr 11, 2024
@driusan
Copy link
Collaborator

driusan commented Apr 11, 2024

@skarya22 I think the fix looks good but phpcs is failing:


FILE: .../runner/work/Loris/Loris/modules/publication/ajax/FileUpload.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
 429 | ERROR | [x] Expected 3 spaces after parameter name; 1 found
 430 | ERROR | [x] Expected 4 spaces after parameter name; 2 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

@driusan driusan merged commit 3d53b05 into aces:main Apr 16, 2024
28 checks passed
@ridz1208 ridz1208 added this to the 26.0.0 milestone Jun 6, 2024
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.

[publication] Relative URL in notification emails
3 participants