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

Use the correct root to determinate the webroot for the resource #22550

Merged

Conversation

nickvergessen
Copy link
Member

Since all the compiled routes are based on the server webroot,
we have to use this, independent from which app this belongs to.

Fix #13556

Since all the compiled routes are based on the server webroot,
we have to use this, independent from which app this belongs to.

Signed-off-by: Joas Schilling <[email protected]>
@nickvergessen nickvergessen added 3. to review Waiting for reviews feature: scss feature: caching Related to our caching system: scssCacher, jsCombiner... labels Sep 2, 2020
@nickvergessen nickvergessen added this to the Nextcloud 20 milestone Sep 2, 2020
@@ -109,7 +109,7 @@ protected function cacheAndAppendScssIfExist($root, $file, $app = 'core') {
if (is_file($root.'/'.$file)) {
if ($this->scssCacher !== null) {
if ($this->scssCacher->process($root, $file, $app)) {
$this->append($root, $this->scssCacher->getCachedSCSS($app, $file), \OC::$WEBROOT, true, true);
$this->append($this->serverroot, $this->scssCacher->getCachedSCSS($app, $file), \OC::$WEBROOT, true, true);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before this tried to load /home/nickv/Nextcloud/20/appsbabies/spreed index.php/css/spreed/2359-7462-unified-search.css?v=d0784d96eefd0edc6bea0c967d17b4ea which is wrong, because the index.php is located in the serverroot, not the apps webroot. It worked for most of us because it fell back to '' logged an error and loaded the file anyway. It only broke visually when nextcloud had a non-empty webroot, e.g. (https://example.tld/nextcloud)

Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 🐘

This was referenced Sep 3, 2020
Copy link
Member

@rullzer rullzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense. But didn't test.
🐘

@nickvergessen nickvergessen mentioned this pull request Sep 4, 2020
@nickvergessen nickvergessen merged commit e690f0e into master Sep 4, 2020
@nickvergessen nickvergessen deleted the bugfix/13556/use-correct-root-when-compiling-scss branch September 4, 2020 06:58
@nickvergessen
Copy link
Member Author

/backport to stable19

@nickvergessen
Copy link
Member Author

/backport to stable18

@backportbot-nextcloud
Copy link

The backport to stable18 failed. Please do this backport manually.

@nickvergessen
Copy link
Member Author

18 backport in #22585

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews feature: caching Related to our caching system: scssCacher, jsCombiner... feature: scss
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[regression] symlinked apps and CSS - ResourceLocator can not find a web root
3 participants