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

External Link Feature Logic incorrect #480

Open
jlchilders11 opened this issue Apr 28, 2022 · 1 comment · Fixed by #512
Open

External Link Feature Logic incorrect #480

jlchilders11 opened this issue Apr 28, 2022 · 1 comment · Fixed by #512
Assignees
Labels
Type: Bug Something isn't working
Milestone

Comments

@jlchilders11
Copy link
Contributor

Describe the bug

Coderedcms includes a feature which uses js to go through all anchor tags and set target="_blank" if they point to an external address.

There is some flaw in this logic that causes this to always be true if the site cr_site_url is incorrect

ex. You have a link to '/shop/' hard coded in an anchor tags, with site url being set to www.example.com, but hosted locally at localhost:8000. This should open in the same tab, but is opened in a new tab instead.

Steps to reproduce

Steps to reproduce the behavior:

  1. Create a new coderedcms site.
  2. Turn on "Open all external links in a new tab" under general settings.
  3. Create an internal link on a page (ex. "/shop/")
  4. Click on the link.
  5. See link open in new tab.

Expected behavior

The link should open in the same tab due to starting with a "/"

@jlchilders11 jlchilders11 added the Type: Bug Something isn't working label Apr 28, 2022
@jlchilders11 jlchilders11 self-assigned this Apr 28, 2022
@vsalvino vsalvino added this to the 1.0 milestone Aug 9, 2022
@vsalvino
Copy link
Contributor

Reopening per reports of this still happening in 1.0 on Slack.

@vsalvino vsalvino reopened this Sep 14, 2022
@vsalvino vsalvino modified the milestone: 1.0 Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants