Skip to content

Conversation

@vhargrave
Copy link
Contributor

@vhargrave vhargrave commented Dec 19, 2025

Makes federal query index only load in if federal links are present

Resolves: MWPW-185513

Test URLs:
Federal query index always tried loading in (it's normal that it's 404ing right now)

Federal query index only loads in if there are actual federal links on the page

When there are Federal urls on the page though, then the query index still tries to load in like it did before.

@aem-code-sync
Copy link
Contributor

aem-code-sync bot commented Dec 19, 2025

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch.
In case there are problems, just click the checkbox below to rerun the respective action.

  • Re-sync branch
Commits

@github-actions
Copy link
Contributor

This PR has not been updated recently and will be closed in 7 days if no action is taken. Please ensure all checks are passing, https://github.com/orgs/adobecom/discussions/997 provides instructions. If the PR is ready to be merged, please mark it with the "Ready for Stage" label.

@github-actions github-actions bot added the Stale label Dec 27, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jan 4, 2026

Closing this PR due to inactivity.

@github-actions github-actions bot closed this Jan 4, 2026
@vhargrave vhargrave reopened this Jan 5, 2026
@vhargrave vhargrave removed the Stale label Jan 5, 2026
@vhargrave vhargrave marked this pull request as ready for review January 5, 2026 10:33
@vhargrave vhargrave requested review from a team, markpadbe and sukamat January 5, 2026 10:33
const config = getConfig();
const queryIndexSuffix = window.location.host.includes(`${SLD}.page`) ? '-preview' : '';

if (links.length && links.some((link) => link.includes('/federal/')) && !queryIndexes.federal) {
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT: No need to check for length, some will return false if array is empty

Suggested change
if (links.length && links.some((link) => link.includes('/federal/')) && !queryIndexes.federal) {
if (links.some((link) => link.includes('/federal/')) && !queryIndexes.federal) {


if (links.length && links.some((link) => link.includes('/federal/')) && !queryIndexes.federal) {
queryIndexes.federal = processQueryIndexMap(
`${getFederatedContentRoot()}${prefix}/federal/assets/lingo/query-index${queryIndexSuffix}.json`,
Copy link
Contributor

Choose a reason for hiding this comment

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

@vhargrave Currently there are no lingo query indexes created for the /federal/ content. If needed, this might get setup for ACOM for the mid-year WWW Lingo release. Have you added this mostly to cater the eventual WWW use-case? Or do you see the need to set this up for the BACOM release?

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.

4 participants