-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
fix(files): properly forward open params from short urls #50807
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
93c4754 to
0aeb29e
Compare
|
/backport to stable31 |
|
/backport to stable30 |
|
/backport to stable29 |
0aeb29e to
adcd9b9
Compare
adcd9b9 to
70394e0
Compare
| $this->useCollection('root'); | ||
| $this->setupRoutes($this->getAttributeRoutes('core'), 'core'); | ||
| require_once __DIR__ . '/../../../core/routes.php'; | ||
| require __DIR__ . '/../../../core/routes.php'; |
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 is an important point.
After a debug session with Christoph, we realised that it prevented routes.php files to be included again when running tests. Making any subsequent route generation fail.
Considering we already test that app have been loaded with isset($this->loadedApps['core']) and isset($this->loadedApps[$app]), we assumed it was safe to require/include without _once.
d4e9a9c to
93fc392
Compare
susnux
left a comment
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.
Not fully sure as the opendetails is a new feature. Also I do not see any reason for neither having one of them for this endpoint.
Meaning: if openfile is false set opendetails, setting both or none makes no sense.
I don't understand this sentence. |
come-nc
left a comment
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.
I agree with susnux comments about adding typing.
The logic around opendetails/openfile looks solid, so my only blocker here is this fileNotFound situation.
Signed-off-by: skjnldsv <[email protected]>
Signed-off-by: skjnldsv <[email protected]>
Signed-off-by: skjnldsv <[email protected]>
93fc392 to
66c8e70
Compare
Addressed and added dedicated cypress tests! |
Not sure about all apps (if you can control the sidebar when the file is opened), but if thats the case then maybe. But my point was more like: That "internal link" feature make no sense with
Meaning there is no need for That beeing said its no blocker from my side, having this new feature (parsing `opendetails´ on the internal-link endpoint) just makes no sense to me, but maybe I am overlooking something here 😅 |
susnux
left a comment
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.
Code looks sane ✅
| #[NoAdminRequired] | ||
| #[NoCSRFRequired] | ||
| public function showFile(?string $fileid = null): Response { | ||
| public function showFile(?string $fileid = null, ?string $opendetails = null, ?string $openfile = null): Response { |
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.
What I meant is adding openfile here is a bugfix ✅
Adding opendetails is a feature I do not see the usecase on this endpoint.
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.
Ah right, it's kinda both you're right!
I'll adjust the backports to only cover the openfile anyway :)
Ah, but this is needed, because otherwise the opendetails will be stripped from the URL. It's not about being a bugfix or not, it's mainly like: "since we're here, better do it properly and make it feature complete" :) |
Fix #50155