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

Enabling Theming app makes icons disappear in "Files" app #9718

Closed
j-dimension opened this issue Jun 2, 2018 · 34 comments
Closed

Enabling Theming app makes icons disappear in "Files" app #9718

j-dimension opened this issue Jun 2, 2018 · 34 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: theming needs info stale Ticket or PR with no recent activity

Comments

@j-dimension
Copy link

Steps to reproduce

  1. Install fresh Nextcloud 13.0.2 on Ubuntu 16.04
  2. enable the Theming app
  3. logout, log back in

Expected behaviour

New theme settings should be effective and Nextcloud should still be fully functional

Actual behaviour

Theme settings are correctly applied but the "Files" app has no icons at all in the top bar. You can still navigate because of the tooltips, but no icons are shown. Navigating to any other app than the Files app and the icons appear, navigating back to the Files app and all icons are gone.

Server configuration

Ubuntu 16.04, PHP7, MySQL

Operating system:
Ubuntu 16.04

Web server:
Apache2

Database:
MySQL

PHP version:
7

Nextcloud version: (see Nextcloud admin page)
13.0.2

Updated from an older Nextcloud/ownCloud or fresh install:
fresh

Where did you install Nextcloud from:
took the ZIP file and manually installed it

Signing status:

Signing status Login as admin user into your Nextcloud and access http://.../index.php/settings/integrity/failed paste the results here. RESULT: No errors have been found.

List of activated apps:

App list All apps that are shipped with the ZIP, PLUS just the Theming app

Are you using external storage, if yes which one: local/smb/sftp/...
NO

Are you using encryption: yes/no
NO

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
NO

Client configuration

Browser:
Firefox

Operating system:
Kubuntu 16.04

@MorrisJobke
Copy link
Member

Could you add a screenshot? And what theming settings you have set?

@j-dimension
Copy link
Author

Thank you for following up. Clearing the browsers cache seems to have fixed this for me. You are welcome to close this.

@tanghus
Copy link
Contributor

tanghus commented Jul 31, 2019

I'm still bothered by this. I have tried Shift-reload etc to no avail (didn't Shift-F5 use to do that in Firefox? Now it opens web console).

Theming off:
theming-off

Theming off, Dark theme (from accesibility)
theming-off-dark

Theming on:
theming-on

Theming on, Dark theme:
theming-on-dark

@MorrisJobke
Copy link
Member

@juliushaertl Any idea?

@tanghus Which version are you on?

@tanghus
Copy link
Contributor

tanghus commented Aug 5, 2019

Hi @MorrisJobke

I use Nextcloud 16.0.3 and Theming 1.7.0

@MorrisJobke MorrisJobke reopened this Aug 5, 2019
@juliushaertl
Copy link
Member

Are there any errors in the browser console related to failing image loading?

@tanghus
Copy link
Contributor

tanghus commented Aug 5, 2019

Nothing that looks relevant:

Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”). 6 files:1:1
JQMIGRATE: Migrate is installed, version 1.4.1 main.js:278:531
OCA.Viewer initialized viewer.js:154:262
New search handler registered search.js:67:12
The following handler is already registered 
{…}
​
__ob__: Object { value: {…}, dep: {…}, vmCount: 0 }
​
component: 
​
group: 
​
id: 
​
mimes: 
​
<get component()>: function get()
​
<set component()>: function set()
​
<get group()>: function get()
​
<set group()>: function set()
​
<get id()>: function get()
​
<set id()>: function set()
​
<get mimes()>: function get()
​
<set mimes()>: function set()
​
<prototype>: Object { … }
viewer.js:132:5276
The escapeHTML library is deprecated! It will be removed in nextcloud 19. 2 main.js:750:58
The select2 library is deprecated! It will be removed in nextcloud 19. 2 main.js:750:58
The humanFileSize library is deprecated! It will be removed in nextcloud 19. 13 main.js:750:58
Source map error: TypeError: NetworkError when attempting to fetch resource.
Resource URL: https://cloud.tanghus.net/core/js/dist/main.js?v=17c6643a-3
Source Map URL: main.js.map
Source map error: TypeError: NetworkError when attempting to fetch resource.
Resource URL: https://cloud.tanghus.net/apps/viewer/js/viewer.js?v=17c6643a-3
Source Map URL: viewer.js.map
Source map error: TypeError: NetworkError when attempting to fetch resource.
Resource URL: https://cloud.tanghus.net/core/js/dist/main.js?v=17c6643a-3
Source Map URL: main.js.map
Source map error: TypeError: NetworkError when attempting to fetch resource.
Resource URL: https://cloud.tanghus.net/apps/viewer/js/viewer.js?v=17c6643a-3
Source Map URL: viewer.js.map

@skjnldsv skjnldsv added the 0. Needs triage Pending check for reproducibility or if it fits our roadmap label Aug 15, 2019
@skjnldsv
Copy link
Member

At the risk of asking something that you already done, please try this:
Hi! Before we continue, please do the following steps:

  1. clear your browser's cache
  2. run an occ maintenance:repair on your server

And if it's still not enough:

  1. Delete the css folder on your /data/appdata_xxx folder
  2. run an occ files:scan-app-data

Thanks 😉

@skjnldsv skjnldsv added the bug label Aug 15, 2019
@tanghus
Copy link
Contributor

tanghus commented Aug 15, 2019

At the risk of asking something that you already done, please try this:

No risk there ;)
I can't ssh into the server atm, but I'll get on it asap.

@tanghus
Copy link
Contributor

tanghus commented Aug 16, 2019

Nope. The favicon disappeared, that's all... But thanks for trying ;)

@skjnldsv
Copy link
Member

Another note, you need to fix your webserver setup to allow map files and such.
Nginx? Apache? Care to post your config? :)

@tanghus
Copy link
Contributor

tanghus commented Aug 16, 2019

Another note, you need to fix your webserver setup to allow map files and such.

Map files? I don't know what you mean, but I can't see how a webserver setting could change anything, when it works without the app?

Nginx? Apache? Care to post your config? :)

Apache, but I don't have access to the config. It's on a shared hosting site.

Favicon reappeared btw ;)

@skjnldsv
Copy link
Member

Map files? I don't know what you mean, but I can't see how a webserver setting could change anything, when it works without the app?

Your webserver is not serving you the associated map debug files (see your console log), but that is irrelevant to this issue.

Apache, but I don't have access to the config. It's on a shared hosting site.

Ignore it then :)
Though this could be the issue actually.

I will need a screenshot of your network requests.
Before you do anything, still on the development tools, there is a tab called network. Click on it and then the xhr filter. Do your action and screenshot the network log like this:
capture d ecran_2018-09-27_21-49-46

I want to see what is the result of the requests to the icon svg 🤔

@tanghus
Copy link
Contributor

tanghus commented Sep 11, 2019

Sorry, I totally forgot about this.

Without themes enabled:

nextcloud-without-themes

With themes enabled:

nextcloud-with-themes

On a quick look, I can't see any difference, but the result is the same as before: No mime-type icons. And no favicon either.

@skjnldsv
Copy link
Member

Ah sorry! PLease post the img and css tab not xhr 🙈 :)

@tanghus
Copy link
Contributor

tanghus commented Sep 11, 2019

Ok, Just a sec. BTW, regarding source maps, the docs says it's a Firefox specific bug.

@tanghus
Copy link
Contributor

tanghus commented Sep 11, 2019

It's rather long, so I've just got the part with 403 errors:

nextcloud-with-themes-2

And it's clearly the mime-type icons.

@skjnldsv
Copy link
Member

Wut, 403?
Can you check your nextcloud logs?

@tanghus
Copy link
Contributor

tanghus commented Sep 11, 2019

Nothing in the log. This is the result of one request:

Request headers:

Host: cloud.example.com
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0
Accept: image/webp,*/*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
DNT: 1
Connection: keep-alive
Cookie: __Host-nc_sameSiteCookielax=true; __Host-nc_sameSiteCookiestrict=true; ocuiz573fl3z=eful1sl36aq3iukscg2ehtcbtv; oc_sessionPassphrase=jBbJ5TZ5Rl0Gp%2FJb65TVKTaGvTNSRbC4Cl72G0XmXHkewvvHrQAd1QjIXXNsQEguUvNO4zRnv%2BVvfAGox8m8PPHTkL7DqIh26UtypW7cIZS8pekUO%2BShaGydob8tlMvU
Cache-Control: max-age=0

Response headers:

HTTP/1.1 403 Forbidden
Date: Wed, 11 Sep 2019 13:30:40 GMT
Server: Apache
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Robots-Tag: none
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Referrer-Policy: no-referrer
Cache-Control: max-age=86400, must-revalidate
Content-Security-Policy: default-src 'none';base-uri 'none';manifest-src 'self';script-src 'nonce-eVZCTlhQWHBnenFLdklJM1diWGszVFlWSE03MnFYVkdla1YwdENHTzRZQT06cFNRRUdZYUZ1azdvK2JZRGR1TzNzbTgrU1BhNDR6WXNJaUFFd0hiNXFhOD0=';style-src 'self' 'unsafe-inline';img-src 'self' data: blob:;font-src 'self' data:;connect-src 'self' stun.nextcloud.com:443;media-src 'self';frame-ancestors 'self';worker-src 'self' blob:
Content-Disposition: inline; filename="icon-core-filetypes_application-pdf.svg"
Pragma: public
Expires: Thu, 12 Sep 2019 13:30:41 +0000
Last-Modified: Wed, 31 Jul 2019 12:40:07 GMT
ETag: "dea6be183341b3e36b26be9311a24ab0"
Content-Length: 676
Strict-Transport-Security: max-age=31536000; includeSubDomains
Keep-Alive: timeout=5, max=18
Connection: Keep-Alive

But the response body still has

Name:
application-pdf.svg
Dimensions:
16 × 16
MIME Type:
image/svg+xml

and the dev tools show a teeny-tiny adobe icon 🅰️ - well almost like that 😄

@tanghus
Copy link
Contributor

tanghus commented Sep 11, 2019

btw, how did you get dark mode in dev tools?

@skjnldsv
Copy link
Member

btw, how did you get dark mode in dev tools?

dev tools option > theme (main page)

@ghost
Copy link

ghost commented Oct 11, 2019

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

@ghost ghost added the stale Ticket or PR with no recent activity label Oct 11, 2019
@skjnldsv
Copy link
Member

@tanghus is this still happening?

@ghost ghost removed the stale Ticket or PR with no recent activity label Oct 12, 2019
@tanghus
Copy link
Contributor

tanghus commented Oct 12, 2019

@skjnldsv Yes.

@skjnldsv
Copy link
Member

Have you tried changing a value in the theming app and/or reset one to default?
cc #14615

@tanghus
Copy link
Contributor

tanghus commented Oct 12, 2019

Now I tried to re-enable Themes and reset it to default.
First the styles changed to default, but on reloading it changed back. Icons still missing. I'll try to wait the mentioned 10-15 minutes to see if it changes anything. I'm not using any cache (shared hosting).

@tanghus
Copy link
Contributor

tanghus commented Oct 12, 2019

Let me rephrase: When I enabled the theme, the background switched to white, but since I have enabled the Dark Theme in accessibility, it changed to dark again when reloading. Is it maybe the order the styles are 'injected' that causes the error?

@tanghus
Copy link
Contributor

tanghus commented Oct 12, 2019

Still no icons btw.

@ghost
Copy link

ghost commented Nov 11, 2019

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

@ghost ghost added the stale Ticket or PR with no recent activity label Nov 11, 2019
@tanghus
Copy link
Contributor

tanghus commented Nov 11, 2019

Now on 16.0.6 and still no icons. I don't know what more information I can give?

@ghost ghost removed the stale Ticket or PR with no recent activity label Nov 11, 2019
@juliushaertl
Copy link
Member

The 403 error looks really strange, any change that your webserver config is somehow blocking those requests? Maybe you can try requesting one of those URLs manually and check the nextcloud log in debug mode for that request?

@tanghus
Copy link
Contributor

tanghus commented Nov 11, 2019

I can load them all right directly in the browser, and actually when I watch the 403s in devtools it loads the image eventually
nextcloud-403-icon

But I guess the log snippet below is this error:


Error | index | OCP\Files\NotFoundException: File does not exist/home/sites/site100006556/web/cloud/lib/private/Files/SimpleFS/SimpleFile.php - line 91: 
OC\Files\SimpleFS\SimpleFile->checkFile()/home/sites/site100006556/web/cloud/lib/private/Template/IconsCacher.php - line 110: 
OC\Files\SimpleFS\SimpleFile->getContent()/home/sites/site100006556/web/cloud/lib/private/Template/SCSSCacher.php - line 336: 
OC\Template\IconsCacher->setIconsCss(".nc-theming ... }")/home/sites/site100006556/web/cloud/lib/private/Template/SCSSCacher.php - line 181: 
OC\Template\SCSSCacher->cache("/home/sites ... s", "6a15-acc1-theming.css", "theming.scss", OC\Files\Sim ... {}, "/apps/theming/css")/home/sites/site100006556/web/cloud/apps/theming/lib/Controller/ThemingController.php - line 414: 
OC\Template\SCSSCacher->process("/home/sites ... g", "css/theming.scss", "theming")/home/sites/site100006556/web/cloud/lib/private/AppFramework/Http/Dispatcher.php - line 166: 
OCA\Theming\Controller\ThemingController->getStylesheet()/home/sites/site100006556/web/cloud/lib/private/AppFramework/Http/Dispatcher.php - line 99: 
OC\AppFramework\Http\Dispatcher->executeController(OCA\Theming\ ... {}, "getStylesheet")/home/sites/site100006556/web/cloud/lib/private/AppFramework/App.php - line 126: 
OC\AppFramework\Http\Dispatcher->dispatch(OCA\Theming\ ... {}, "getStylesheet")/home/sites/site100006556/web/cloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47: 
OC\AppFramework\App::main("OCA\\Themin ... r", "getStylesheet", OC\AppFramew ... {}, { _route: "t ... "})<<closure>>OC\AppFramework\Routing\RouteActionHandler->__invoke({ _route: "t ... "})/home/sites/site100006556/web/cloud/lib/private/Route/Router.php - line 297: 
call_user_func(OC\AppFramew ... {}, { _route: "t ... "})/home/sites/site100006556/web/cloud/lib/base.php - line 975: 
OC\Route\Router->match("/apps/theming/styles")/home/sites/site100006556/web/cloud/index.php - line 42: 
OC::handleRequest() 
Error | PHP | file_get_contents(/home/sites/site100006556/clouddata/appdata_ocuiz573fl3z/css/icons/icons-list.template):  failed to open stream: No such file or directory at  /home/sites/site100006556/web/cloud/lib/private/Files/Storage/Local.php#217

@tanghus
Copy link
Contributor

tanghus commented Nov 13, 2019

@juliushaertl I could make a guest account for you?

@ghost
Copy link

ghost commented Dec 13, 2019

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

@ghost ghost added the stale Ticket or PR with no recent activity label Dec 13, 2019
@ghost ghost closed this as completed Dec 27, 2019
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: theming needs info stale Ticket or PR with no recent activity
Projects
None yet
Development

No branches or pull requests

5 participants