-
Notifications
You must be signed in to change notification settings - Fork 0
feat: [Conflict B] Add About route #204
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -6,3 +6,4 @@ SilverStripe\Control\Director: | |||||
| rules: | ||||||
| 'sitemap.xml': 'App\Controllers\SitemapController' | ||||||
| 'robots.txt': 'App\Controllers\RobotsController' | ||||||
| 'about': AboutPage | ||||||
|
||||||
| 'about': AboutPage | |
| 'about': 'App\Controllers\AboutController' |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,23 @@ | ||||||
| <?php | ||||||
|
|
||||||
| namespace { | ||||||
|
|
||||||
| use SilverStripe\CMS\Controllers\ContentController; | ||||||
|
|
||||||
|
Comment on lines
+5
to
+6
|
||||||
| use SilverStripe\CMS\Controllers\ContentController; |
Copilot
AI
Apr 1, 2026
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.
private static $has_one = []; is redundant here (it matches the empty definition already present on Page). Consider removing it unless you plan to add relations, to reduce noise in the class definition.
| private static $has_one = []; |
Copilot
AI
Apr 1, 2026
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.
The page-type controller class is named AboutPage_Controller, but this project uses the SilverStripe 6 convention *Controller (e.g. PageController, App\Controllers\SitemapController). With CMS 6.x the _Controller suffix is not the expected naming and may not be discovered/used. Rename the class to AboutPageController (and adjust the filename if your autoloading conventions require it).
| class AboutPage_Controller extends PageController | |
| class AboutPageController extends PageController |
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.
This adds a new Director rule for
'about', but the repo already defines an about route inapp/_config/about_routes.yml('about//$Action/$ID/$OtherID': 'AboutController'), which will also match/about. The duplicate/conflicting rules make routing order-dependent and may prevent this rule from ever being hit. Consider updating/removing the existing about rule (or changing this rule to a different URL pattern) so there is a single source of truth for the/aboutroute.