Icons missing / path not rewritten

Can you locally access your setup without proxy and see if the nextcloud/-folder is correctly set?

Sure. The prefix is missing as well. But only for these SVG images. All the rest is fine.

I can report the same issue. Even without a proxy.

I just installed version 11.0 on a new VM. I originally set Apache2 up with a site configuration (virtual server) before setting up Nextcloud, then I changed my mind and altered that to a conf configuration (in the default virtual server) with an alias putting Nextcloud into /nextcloud instead of the root.

It has broken the image files in the drop down menus, but everything else (file upload/download/admin pages/files app/gallery app etc) seems to work. It looks like whatever generates the images isn’t respecting the path everything else does.

e.g. the webserver presents /settings/img/personal.svg to my browser (404 error)
If I edit to /nextcloud/settings/img/personal.svg then the picture comes up.

I have this in my config.php:

  'overwritewebroot' => '/nextcloud',
  'overwrite.cli.url' => '/nextcloud',

Is there any other info i could give that would help diagnose?

overwrite.cli.url needs to be the full URL as stated in the sample config:

Hi there.

I just gave this a try and it didn’t change the behaviour I’m seeing. The documentation says that setting is for “using any kind of command line tools (cron or occ)”.

Out of interest, I tested putting the full URL into ‘overwritewebroot’ as well and that clearly didn’t work (turned URLs into “https://host.domain.com/nextcloud/https://host.domain.com/nextcloud/blah”).

Is there anything else I can try or logs I can produce? What generates the images path?

Current config:

  'overwritewebroot' => '/nextcloud',
  'overwrite.cli.url' => 'https://www.domain.tld/nextcloud',

Apache2 conf:
Alias /nextcloud "/var/www/nextcloud/"

<Directory "/var/www/nextcloud">
Options +FollowSymLinks
AllowOverride All

<IfModule mod_dav.c>
  Dav off
</IfModule>

SetEnv HOME /var/www/nextcloud
SetEnv HTTP_HOME /var/www/nextcloud

Satisfy Any

</Directory>

I did some more digging. Looking at the source of the HTML, most paths have /nextcloud but some don’t.

		<link rel="icon" href="/core/img/favicon.ico">
	<link rel="apple-touch-icon-precomposed" href="/core/img/favicon-touch.png">
	<link rel="mask-icon" sizes="any" href="/core/img/favicon-mask.svg" color="#0082c9">
				<link rel="stylesheet" href="/nextcloud/core/vendor/select2/select2.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/core/css/styles.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/core/css/header.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/core/css/icons.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/core/css/fonts.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/core/css/apps.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/core/css/global.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/core/css/fixes.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/core/css/multiselect.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/core/css/mobile.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/core/vendor/jquery-ui/themes/base/jquery-ui.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/core/css/jquery-ui-fixes.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/core/css/tooltip.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/apps/files_pdfviewer/css/style.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/core/css/share.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/apps/files_versions/css/versions.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/apps/files_videoplayer/css/style.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/apps/gallery/css/slideshow.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/apps/gallery/css/gallerybutton.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/apps/notifications/css/styles.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/core/css/inputs.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/core/css/jquery.ocdialog.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/apps/files/css/files.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/apps/files/css/upload.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/apps/files/css/mobile.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/apps/files/css/detailsView.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/apps/files_external/css/external.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/apps/files_trashbin/css/trash.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/apps/activity/css/style.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/apps/comments/css/comments.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/apps/files_sharing/css/sharetabview.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/apps/files_sharing/css/sharebreadcrumb.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/apps/files_texteditor/css/DroidSansMono/stylesheet.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/apps/files_texteditor/css/style.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/apps/files_texteditor/css/mobile.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/core/css/systemtags.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
				<link rel="stylesheet" href="/nextcloud/apps/systemtags/css/systemtagsfilelist.css?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">

and

<li>
					<a href="/nextcloud/index.php/settings/personal"
						>
						<img alt="" src="/settings/img/personal.svg?v=1f3ea9a570b4a33a8efbfc4c67d1fa4e">
						Personal						</a>
				</li>

Nobody? It’s got me blocked for rollout at the moment.

Could it be to do with the fact that it was at / when the installer ran? Is there a path stored in the database or a settings file somewhere else?

Did you restart your webserver and the caches, also your web browsers. Normally this should do the job.

Thanks for the suggestion.

I stopped Apache2, ran htcacheclean and restarted it. I cleared Chrome’s history/cache completely and tried again (and from a new browser on a different machine). Same result.

Given that the HTML being delivered to the browser contains incorrect paths to the images, then it doesn’t feel like a caching issue. It feels more like a bug?

There is also a report about theming and the favicon.ico:

(in this case the occ-htaccess-code helped, but you ran that already: Missing favicon)

So it’s perhaps a bug.

I hadn’t tried that setting, so I just did (and ran sudo -u www-data php occ maintenance:update:htaccess).

Still no improvement.

My config.php has:

  'overwritewebroot' => '/nextcloud',
  'overwrite.cli.url' => 'https://www.domain.tld/nextcloud',
  'htaccess.RewriteBase' => '/nextcloud',

My .htaccess snippet looks like this:
#### DO NOT CHANGE ANYTHING ABOVE THIS LINE ####

ErrorDocument 403 /nextcloud/core/templates/403.php
ErrorDocument 404 /nextcloud/core/templates/404.php
<IfModule mod_rewrite.c>
  Options -MultiViews
  RewriteRule ^core/js/oc.js$ index.php [PT,E=PATH_INFO:$1]
  RewriteRule ^core/preview.png$ index.php [PT,E=PATH_INFO:$1]
  RewriteCond %{REQUEST_FILENAME} !\.(css|js|svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$
  RewriteCond %{REQUEST_FILENAME} !core/img/favicon.ico$
  RewriteCond %{REQUEST_FILENAME} !/remote.php
  RewriteCond %{REQUEST_FILENAME} !/public.php
  RewriteCond %{REQUEST_FILENAME} !/cron.php
  RewriteCond %{REQUEST_FILENAME} !/core/ajax/update.php
  RewriteCond %{REQUEST_FILENAME} !/status.php
  RewriteCond %{REQUEST_FILENAME} !/ocs/v1.php
  RewriteCond %{REQUEST_FILENAME} !/ocs/v2.php
  RewriteCond %{REQUEST_FILENAME} !/updater/
  RewriteCond %{REQUEST_FILENAME} !/ocs-provider/
  RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/.*
  RewriteRule . index.php [PT,E=PATH_INFO:$1]
  RewriteBase /nextcloud
  <IfModule mod_env.c>
    SetEnv front_controller_active true
    <IfModule mod_dir.c>
      DirectorySlash off
    </IfModule>
  </IfModule>
</IfModule>

I don’t mind hand-editing the theme file or whatever calls the theme images if I could work out where it was!

Out of interest, I installed the two themes from here just in case there was a bug in the main theme but it didn’t fix the image paths (which must be defined elsewhere?):

Out of interest, I installed a new, fresh Nextcloud into /nextcloud2 (i.e., installed already not at the web root). It installed fine and the icons are all displaying. I had a look at config.php and .htaccess and couldn’t see anything very different.

I can (and will) proceed by deleting my planned installation and reinstalling, but I feel there is something out there to fix at some point.

Good that it works, however it is strange that it doesn’t work for the other setup. Open perhaps a bug report on github. Only thing I could still think of is that in the *_storage(s)-table the path to the data-directory is wrong. But I can’t imagine that this is related to the favicon.ico-error.

Hi, I have the same issue of several icons in Files App not being retrieved (404 from server, eg. /s/img/folder.svg?v=1), currently in NC12. Has there been some progress in this issue lately?

I fixed the problem with direct editing CSS definitions for the icons in Files App in the file apps/files/css/files.scss. The urls needed to be changed from …/img/[image].svg to …/…/apps/files/img/[image].svg.

Ran into the same problem, just AFTER adding 'htaccess.RewriteBase' => '/nextcloud', and sudo -u www-data php occ maintenance:update:htaccess.

Interesting is, that enabling the theming app fixes the issue: All icons are shown again.

‘overwritewebroot’ => ‘/nextcloud’,
‘theme’ => ‘’,

etc. trying back and forth didn’t solve the problem. So using index.php-less URL seems to somehow break the default (non app) theming, making nextcloud looking for the related svg files in web root instread of /nextcloud.

1 Like

I have seen the problem as well as I wanted to update the documentation

@JasonBayton

It seems to be a bug in the theming app. If you don’t use theming, disable the theming app. Bug report is here:

2 Likes

Thanks for the report.

Yeah I remember also other users having the problem as you describe. Mine is actually the other way round: The pretty urls break the theming without app and the app on the other hand fixes this for me, without having an actual theme configured.

Hmm now that I write this, I realize the contradiction: In both cases no actual theme configured (‘theme’ => ‘’, or completely removed), pretty urls are configured (config.php and .htaccess look exactly the same, as you posted on github). But in my case enabling the theming app solves the issue, where in your case it produces it.

The error on the other hand is exactly the same, same missing icons, same wrong url. I am out of fantasy here :smiley:. Will add it to your gh issue.

1 Like

I played around a while and finally what I found is, that the error occurs for me always, when I enable pretty urls. The solution is always to switch the current state of the theming app, where it doesn’t matter if it was enabled or disabled before.

Reverting pretty urls also brings an error related to icons, but with different browser console output.

Switching pretty urls also always crashes the new AppOrders icon order. You need to set it again in personal settings. Until that also wrong urls (index.php inside or not) appear on the icons thus they do not work/might throw permission errors (due to access to non existing path). So this is another topic :wink: .

See github about all of that.

Hi,

Sorry to pop-up this topic, but I think it could help.

I had the same problem with missing icons, specially the .svg ones.
I finally restore them with this commands:

sudo -u www-data /usr/bin/php /var/www/html/nextcloud/occ maintenance:mode --on
sudo -u www-data /usr/bin/php /var/www/html/nextcloud/occ maintenance:repair
sudo -u www-data /usr/bin/php /var/www/html/nextcloud/occ maintenance:update:htaccess
sudo -u www-data /usr/bin/php /var/www/html/nextcloud/occ maintenance:theme:update
sudo -u www-data /usr/bin/php /var/www/html/nextcloud/occ maintenance:mode --off
sudo systemctl restart php-fpm.service && sudo systemctl restart nginx.service

I hope it will be helpful.