Comments (8)
comment by: @stevevu (aragonne)
created at: 2012-01-10
I forgot to note that there is a discussion in the forum regarding this topic: http://www.silverstripe.org/general-questions/show/18938
from silverstripe-cms.
comment by: @sminnee (sminnee)
created at: 2012-04-23
I believe that this is still an issue in 3.0.
from silverstripe-cms.
I can verify this is still an issue in 3.1.x
. I may have a potential solution, which works pretty well for me and passes unit tests:
public function init() {
parent::init();
// Redirect this request, but only if no additional action (slug) has been provided.
$action = $this->request->param('Action');
if($action === null && $link = $this->redirectionLink()) {
$this->redirect($link, 301);
return;
}
}
I noticed that if you just ignore the redirect if there's an extra action/slug passed, it continues on to showing a 404 error page since naturally the specified action (e.g. asdf
) will not be found. This may be pretty safe since, if overridden, it will function as expected. Do you anticipate any problems with this fix? If not, I can whip something up pretty quickly for review.
Should this be performed on the 3
branch or 3.1
? Also, doesn't this bug belong in the CMS repo silverstripe/silverstripe-cms
since my fix applies to the file located under cms/code/model/RedirectorPage.php
?
from silverstripe-cms.
Low priority, but existing issue.
from silverstripe-cms.
@tractorcow Thanks for reminding me of this issue since it continues to haunt us to this day, despite all my other PR's since this is a real-world bug for me that's out in the wild, I may want to tackle sooner rather than later. What say you to the above proposition?
Should this be performed on the 3 branch or 3.1? Also, doesn't this bug belong in the CMS repo silverstripe/silverstripe-cms since my fix applies to the file located under cms/code/model/RedirectorPage.php?
Highlighted the two important questions here, but the approach is also important (see code).
from silverstripe-cms.
Actually @tractorcow my particular issue is actually already in progress here: #1198 It still looks to me, however, like this issue belongs in https://github.com/silverstripe/silverstripe-cms/issues
from silverstripe-cms.
I think it's ok to leave it here, for now. As long as it's on one of the core modules it'll get tracked.
I would fix this on the 3 branch, in answer to your question. :) It can be fixed in master only if necessary.
from silverstripe-cms.
I replicated this set up in SS 4.3 and everything is being served as expected:
- Accessing RP, redirects you
- Accessing UP, returns a 404
- Access PP, returns a page.
- Accessing UP while logged in with stage enabled return the draft page.
So this issue doesn't affect SilverStripe 4.
Unfortunately, SilverStripe 3 has entered limited support in June 2018. This means we'll only be fixing critical bugs and security issues for SilverStripe 3 going forward.
You can read the SilverStripe Roadmap for more information on our support commitments.
from silverstripe-cms.
Related Issues (20)
- Change the `BackLinks` relation in `SiteTree` to a polymorphic many_many relation
- Refactor CMSMain and its subclasses
- TODO: Should ContentController::LoginForm() return all available log-in forms? HOT 1
- [bug] Bulk actions allow unpublishing of homepage without confirmation
- 5.1: Can't open settings tab of SiteTree objects, if you have a lot of members HOT 12
- Redirector page in Menu does not return expected isCurrent() value. HOT 1
- Insert from Files button not working in TinyMCE editor HOT 4
- Jumping to random CMS tabs when navigating pages HOT 3
- TinyMCE - Adding a link to a page on this site and then clicking through to the immediate child pages takes you down two levels rather than one HOT 1
- SPIKE Analyse how LeftAndMain and CMSMain are put together and how they could work better HOT 7
- Form field validation/error doesn't highlight the tab where the error occurred HOT 2
- Don't hardcode `SiteTree` in `CMSMain`
- Refactor history tab `CMSMain`/`HierarchyModelAdmin`
- Refactor tree filtering in `CMSMain`/`HierarchyModelAdmin`
- Refactor batch actions in `CMSMain`/`HierarchyModelAdmin`
- Make an abstract class for managing hierarchical data in a tree view
- Refactor `ModelAsController` to be generic
- Refactor `ContentController` to be generic
- Refactor `RootURLController` to be generic
- Removed old installer logic from ContentController HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from silverstripe-cms.