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

URL Issues in Email Button Links #7637

Closed
amroland opened this issue Jul 22, 2024 · 2 comments
Closed

URL Issues in Email Button Links #7637

amroland opened this issue Jul 22, 2024 · 2 comments
Milestone

Comments

@amroland
Copy link

I have encountered two related issues with the URL handling in the email button links.

Issue 1:
When editing the URL of the buttons in the email settings (Sensei LMS > Settings > Emails), if you use placeholders such as [course:url], the URL field automatically prepends "http://" to the placeholder. For example, after editing, the URL field shows: http://[course:url].

Issue 2:
When the URL of the button has been modified as described above, the generated button URL in the sent emails is incorrect. Instead of resolving to the correct URL, it appears as:
http://https//domain.com/course/course-name
There are two main problems here:

  1. The http:// prefix is unnecessarily added.
  2. The URL itself is malformed as the colon (":") is missing between https and //.

This results in broken links within the emails sent to users.

Steps to Reproduce:

  1. Go to Sensei LMS > Settings > Emails.
  2. Edit the button URL (with pencil icon) and use a placeholder such as [course:url].
  3. Save the settings.
  4. Trigger an email that includes the button.
  5. Observe the URL in the email.

Expected Result:
The button URL should correctly resolve the placeholder and not prepend "http://".

Actual Result:
The button URL is malformed and prepended with "http://", resulting in broken links.

PHP / WordPress / Sensei LMS version

  • WordPress Version: 6.5.5
  • Sensei LMS Version: 4.24.1
  • Sensei Pro Version: 1.24.0
  • PHP Version: 8.1.20

Video

https://www.loom.com/share/3c95e56dda7a44908024d6d728618418?sid=4a7ec8ed-d823-40cf-911e-aff470760842

@amroland amroland added [Status] Needs Triage Issue needs to be triaged [Type] Bug labels Jul 22, 2024
@amroland
Copy link
Author

Dear @donnapep,
When is this error expected to be fixed?
Thank you for your reply.

@donnapep donnapep added this to the 4.24.3 milestone Aug 22, 2024
@donnapep donnapep removed the [Status] Needs Triage Issue needs to be triaged label Aug 22, 2024
@donnapep
Copy link
Collaborator

@amroland This one will ship in today's 4.24.3 release. Note that the protocol will still appear in the editor, but will be stripped out at email send time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants