Skip to content
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

$controller_name in Page.php makes blog category etc. fail #662

Open
lerni opened this issue Nov 4, 2021 · 1 comment
Open

$controller_name in Page.php makes blog category etc. fail #662

lerni opened this issue Nov 4, 2021 · 1 comment

Comments

@lerni
Copy link
Contributor

lerni commented Nov 4, 2021

Adding private static $controller_name = PageController::class; to Page.php causes Blog Categories etc. to fail. One way to work around this would be, to add static $controller_name = BlogController::class; to Blog.php, but may there is a smarter way fixing this for other instances that extend Page.php?

Should this be "fixed" in Blog (👍) or not (👎) ?

If not in Blog.php, can you pleas outline where and how or why not.

@kinglozzer
Copy link
Member

Hmm, I wonder if the code that fetches this (SiteTree::getControllerName()) should look for an “uninherited” config value instead of any value that’ll inherit from parent classes? I’m not sure if that would be a BC-break though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants