Skip to content

#26273 Supporting VanityURL with action equals to 200 in Experiment#26803

Merged
freddyDOTCMS merged 3 commits intomasterfrom
issue-26273-Experiments-not-Considering-Redirection-from-Vanity-URLs
Nov 28, 2023
Merged

#26273 Supporting VanityURL with action equals to 200 in Experiment#26803
freddyDOTCMS merged 3 commits intomasterfrom
issue-26273-Experiments-not-Considering-Redirection-from-Vanity-URLs

Conversation

@freddyDOTCMS
Copy link
Copy Markdown
Member

@freddyDOTCMS freddyDOTCMS commented Nov 22, 2023

Proposed Changes

  • Include the URI of the VanityURL in the Regex to check if the current Page is the Experiment's Page

https://github.com/dotCMS/core/pull/26803/files#diff-2069a2eff51802af984f2ef6b926adc6e8d91779ea57354c6f52d975fc857842R65

@freddyDOTCMS freddyDOTCMS marked this pull request as ready for review November 27, 2023 14:18
}
}

@NotNull
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

remove this one

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

}

@NotNull
private static String getVanityUrlsRegex(Host host, Language language, HTMLPageAsset htmlPageAsset) throws DotDataException {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

set to finals

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

.findByForward(host, language, htmlPageAsset.getURI(), 200)
.stream()
.map(vanitysUrls -> String.format(DEFAULT_URL_REGEX_TEMPLATE, vanitysUrls.pattern))
.collect(Collectors.joining("|"));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

StringPool.PIPE

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@dotcms-sonarqube
Copy link
Copy Markdown

Quality Gate passed Quality Gate passed

The SonarQube Quality Gate passed, but some issues were introduced.

2 New issues
0 Security Hotspots
0.0% 0.0% Coverage on New Code
0.0% 0.0% Duplication on New Code

See analysis details on SonarQube

@freddyDOTCMS freddyDOTCMS added this pull request to the merge queue Nov 28, 2023
@freddyDOTCMS freddyDOTCMS removed this pull request from the merge queue due to a manual request Nov 28, 2023
@freddyDOTCMS freddyDOTCMS added this pull request to the merge queue Nov 28, 2023
Merged via the queue into master with commit 53718e0 Nov 28, 2023
@freddyDOTCMS freddyDOTCMS deleted the issue-26273-Experiments-not-Considering-Redirection-from-Vanity-URLs branch November 28, 2023 19:39
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.

3 participants