Repository navigation
fix(sap-smartedit): set ContentPage url from label and homepage flag - #1155
Open
pritesh-jain-cstk wants to merge 2 commits into
Open
pritesh-jain-cstk wants to merge 2 commits into
pritesh-jain-cstk wants to merge 2 commits into
Conversation
Every migrated SAP ContentPage had an empty url: each content type gets a mandatory url field, but ContentPage carries its route in label and the homepage flag. Storefronts that look pages up by url found none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ny case Exports without a homepage column (HAC exports often omit it) now give the page labelled homepage the root url, SAP's default homepage label. The homepage flag is read in any case, like the rest of the connector's booleans. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
SAP ContentPage entries get a
url. Every content type has a mandatoryurlfield, but ContentPage never filled it: SAP keeps the route inlabeland marks the homepage withhomepage. With no url, a storefront that looks pages up by url (the Contentstack Spartacus connector) finds none of them.createEntrynow sets the url for ContentPage:homepage= true (any case, e.g.TRUE)/homepagecolumn andlabel=homepage(SAP's default homepage label; HAC exports often omit the flag)/label=/faq/faqlabel=shipping/shippingOther types are untouched.
Why
Found in an end-to-end run SAP SmartEdit → migration-v2 → Contentstack → Spartacus (Jira DX-30753, gap G27). Before: 0 of 5 pages had a url.
Testing
sap-smartedit.service.test.ts(2 new fixtures); 6 of them fail without the change././,/faq,/contact,/terms-and-conditions,/help;scripts/reconcile-sap.tsPASSED.Not covered
SAP page variations that share one label (restriction-based) get the same url; import still works (url is not unique), but telling them apart belongs with restrictions support.
Independent of the companion PR for nav labels (G28); either can merge alone.
🤖 Generated with Claude Code
Re-verified 2026-11-05
Re-run on this PR's head by an independent verification pass (spot-checked by re-running). Only what was run is listed as verified.
Ran on head
2d5dac38,api/:npx vitest run947/947 (90 files);sap-smartedit.service.test.ts87/87. Correction: with the service reverted to the base, 8 of the new tests fail, not 6.tsc --noEmit58 errors, identical onfeature/sap-smartedit. Merges cleanly with #1156.Branch state: the base
feature/sap-smarteditis 9 commits behindmain. CIsecurity-scais failing (log not yet read).Not verified: the dataset sweep; the live v2 UI run and
reconcile-sap.ts; lint.