-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix: replace outdated usage of page__node__path
with page__path
#8238
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
Conversation
Reviewer's GuideReplaced deprecated Class Diagram: Models Involved in Page Path Ordering UpdateclassDiagram
class Title {
<<Model>>
+page: Page
+get_placeholder_slots(): List~string~
}
class Page {
<<Model>>
+path: string
}
Title "1" -- "1" Page : page_relationship
Flow Diagram: Change in Data Access Logic for Page Pathgraph TD
subgraph "Old Data Access Path for Ordering"
direction LR
OldQuery["Title.get_placeholder_slots() Query"] --> OldPage["Page object"]
OldPage --".node (page__node)"--> OldNode["Node object"]
OldNode --".path"--> OldPathValue["Path string"]
end
subgraph "New Data Access Path for Ordering"
direction LR
NewQuery["Title.get_placeholder_slots() Query"] --> NewPage["Page object"]
NewPage --".path (page__path)"--> NewPathValue["Path string"]
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello! Thank you for your contribution! 🎉
As it's your first contribution, be sure to check out the contribution docs.
We invite you to join us on our Discord Server!
Welcome aboard ⛵️!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @PeterW-LWL - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
page__node__path
with page__path
page__node__path
with page__path
Great catch, @PeterW-LWL !
|
@fsbraun I have no idea how I would recreate that. It seems I can't even reproduce the bug in the running instance that I have with version The bug happened while I was creating the first page of a newly created instance via the admin. Edit: I was able to recreate the bug locally now. |
@PeterW-LWL Maybe the best way is to add
in |
@fsbraun I added a test case based on your suggestion. This case will error out on the current main branch. But with the fix in the first commit of this PR it will pass. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for the great work!
…8238) * fix: replace outdated usage of `page__node__path` with `page__path` * add test case for `PageContent.get_placeholder_slots()` with empty `CMS_TEMPLATES` setting --------- Co-authored-by: Fabian Braun <fsbraun@gmx.de>
Description
I noticed that there was still a usage of the removed
node
in a order_by of a query.Related resources
Checklist
main
Summary by Sourcery
Bug Fixes:
page__node__path
reference withpage__path
in query ordering.