Skip to content

changing background image not possible #315

Description

@Happyfeet01

Has anyone an idea?

i try to set an Custom Background image. The Backend say "saved" but to Stock Image is already there.

Steps to reproduce

  1. open the Admin settings
  2. try to upload an picture

Actual behaviour

the image it´s not saved. After sing out from Nextcloud you see the old image.

Server configuration

Operating system:
Ubuntu 14.04 LTS
Web server:
Apache2 2.4.7
Database:
mysql
PHP version:
PHP 7.07
Nextcloud version: (see Nextcloud admin page)
9.0.52 (daily) Build:2016-07-05T09:09:27+00:00 6d9809e
Updated from an older Nextcloud/ownCloud or fresh install:
updated from 9.0.51
Where did you install Nextcloud from:
nextcloud.com
Signing status (Nextcloud 9.0 and above):

Signing status

No errors have been found.

List of activated apps:

App list

Enabled:
  - activity: 2.2.1
  - admin_audit: 1.0.0
  - bookmarks: 0.7
  - calendar: 1.2.2
  - comments: 0.2
  - contacts: 1.3.1.0
  - dav: 0.1.6
  - documents: 0.12.0
  - fbsync: 1.8.2
  - federatedfilesharing: 0.1.0
  - federation: 0.0.4
  - files: 1.4.4
  - files_external: 0.5.2
  - files_mv: 0.8.2
  - files_pdfviewer: 0.8.1
  - files_sharing: 0.9.1
  - files_texteditor: 2.1
  - files_trashbin: 0.8.0
  - files_versions: 1.2.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - gallery: 14.5.0
  - libreonline: 0.1
  - mail: 0.5.2
  - music: true
  - news: true
  - notifications: 0.2.3
  - ocdownloader: 1.5
  - password_policy: 1.0.0
  - provisioning_api: 0.4.1
  - systemtags: 0.2
  - tasks: true
  - templateeditor: 0.1
  - theming: 0.1.0
  - updatenotification: 0.1.0
Disabled:
  - encryption
  - external
  - galleryplus
  - richdocuments
  - user_external
  - user_ldap
  - user_saml

The content of config/config.php:

Config report


{
    "system": {
        "updatechecker": true,
        "instanceid": "ocernowp783d",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "cloud-surfer.eu"
        ],
        "datadirectory": "\/mnt\/owncloud\/data",
        "overwrite.cli.url": "https:\/\/cloud-surfer.eu",
        "dbtype": "mysql",
        "version": "9.0.52.0",
        "logtimezone": "Europe\/Berlin",
        "installed": true,
        "maintenance": false,
        "dbname": "owncloud2",
        "dbhost": "127.0.0.1",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "lars",
        "mail_smtpmode": "php",
        "mail_domain": "cloud-surfer.eu",
        "loglevel": 3,
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "localhost",
            "port": 6379
        },
        "appstore.experimental.enabled": true,
        "htaccess.RewriteBase": "\/",
        "updater.server.url": "https:\/\/updates.nextcloud.org\/updater_server\/",
        "updater.secret": "***REMOVED SENSITIVE VALUE***",
        "theme": "",
        "updater.release.channel": "daily"
    }
}

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

Client configuration

Browser:
Chrome Browser
Operating system:
Windows 10

Logs

Web server error log

Web server error log

2016-07-05 20:50:09 Error   151.252.219.4   404 GET /apps/theming/styles.css?v=57 HTTP/1.1
#### Nextcloud log (data/nextcloud.log)

Nextcloud log

Error: Call to undefined method OC\Server::getThemingDefaults() at /var/www/vhosts/cloud-surfer.eu/httpdocs/nextcloud/apps/theming/settings/settings-admin.php#29
#### Browser log

Browser log

Browser Log:
GET https://cloud-surfer.eu/apps/theming/styles.css?v=57 (failed to load response data) 

Activity

  1. LukasReschke commented on Jul 5, 2016

    @LukasReschke
    Member

    The generated link on your domain is <link rel="stylesheet" href="/apps/theming/styles.css?v=58"/> </head>

    When performing a cURL request:

    ➜  ~ curl -v https://cloud-surfer.eu/apps/theming/styles.css\?v\=58
    *   Trying 81.169.130.87...
    * Connected to cloud-surfer.eu (81.169.130.87) port 443 (#0)
    * TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
    * Server certificate: cloud-surfer.eu
    * Server certificate: Let's Encrypt Authority X3
    * Server certificate: DST Root CA X3
    > GET /apps/theming/styles.css?v=58 HTTP/1.1
    > Host: cloud-surfer.eu
    > User-Agent: curl/7.43.0
    > Accept: */*
    >
    < HTTP/1.1 404 Not Found
    < Date: Tue, 05 Jul 2016 19:11:36 GMT
    < Server: Apache
    < X-Powered-By: PHP/7.0.8
    < Expires: Fri, 19 Aug 2016 19:11:38 GMT
    < Pragma: cache
    < Cache-Control: max-age=3600, must-revalidate
    < Content-Disposition: attachment; filename="style.css"
    < Content-Security-Policy: default-src 'none';script-src 'self' 'unsafe-eval';style-src 'self' 'unsafe-inline';img-src 'self' data: blob:;font-src 'self';connect-src 'self';media-src 'self'
    < Set-Cookie: ocernowp783d=5pukfvg8ov9googkrichl21at6; path=/; HttpOnly
    < Set-Cookie: oc_sessionPassphrase=rFt14Vs0VXF8BdIdzwGKQfmYE0oJ65LXQNYe0LlenQ%2FXq1fLHVQ8tzFCHlEi6YwGxv4yLkYggMA4r7sAq6pIOANSSycJg60AhUjZJcxITC%2BKeTHkvDF5lzIYiQjVa4mp; path=/; secure; HttpOnly
    < Set-Cookie: nc_sameSiteCookielax=true; path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=lax
    < Set-Cookie: nc_sameSiteCookiestrict=true; path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=strict
    < Strict-Transport-Security: max-age=15768000; includeSubDomains; preload
    < Content-Length: 161
    < X-Powered-By: PleskLin
    < X-Content-Type-Options: nosniff
    < X-XSS-Protection: 1; mode=block
    < X-Robots-Tag: none
    < X-Frame-Options: SAMEORIGIN
    < X-Download-Options: noopen
    < X-Permitted-Cross-Domain-Policies: none
    < Content-Type: text/css;charset=UTF-8
    <
    #body-user #header,#body-settings #header,#body-public #header {background-color: #BDAD73}#body-login {
                    background-image: url('./loginbackground?v=58');
    * Connection #0 to host cloud-surfer.eu left intact
                }%
    

    Please check back with your server config why a 404 is generated here, this seems very likely to be caused by it. It works fine with mod_rewrite enabled here and index.php-less URLs on my instance.

  2. Happyfeet01 commented on Jul 5, 2016

    @Happyfeet01
    Author

    When I perform this curl command, I have this output

    lars@h2530151:~$ curl -v https://cloud-surfer.eu/apps/theming/styles.css\?v\=58
    * Hostname was NOT found in DNS cache
    *   Trying 127.0.0.1...
    * Connected to cloud-surfer.eu (127.0.0.1) port 443 (#0)
    * successfully set certificate verify locations:
    *   CAfile: none
      CApath: /etc/ssl/certs
    * SSLv3, TLS handshake, Client hello (1):
    * error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
    * Closing connection 0
    curl: (35) error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
    lars@h2530151:~$```
    
  3. LukasReschke commented on Jul 5, 2016

    @LukasReschke
    Member

    When I perform this curl command, I have this output

    That's very likely because your cURL version is outdated. Update cURL to a version that supports the ciphers and protocols that your server uses.

  4. hitam4450 commented on Jul 6, 2016

    @hitam4450

    Changing background picture works fine for me! (Web upgrade from 9.0.50 --> 9.0.52)

    regards, hitam4450

  5. Happyfeet01 commented on Jul 6, 2016

    @Happyfeet01
    Author

    I try to update the CURL version.

  6. ctlui commented on Jul 6, 2016

    @ctlui

    Got the same error (404) to load css (https://domain.ndd/apps/theming/styles.css?v=18)
    after modding using theming apps.
    Using Debian 8 / php 5.6

    Thanks - Eric

  7. Happyfeet01 commented on Jul 8, 2016

    @Happyfeet01
    Author

    It's not easy to update my curl version. :( Plesk is getting me crazy.

  8. LukasReschke commented on Jul 8, 2016

    @LukasReschke
    Member

    This has nothing to do with your installed cURL version but with your web server configuration.

    Unless somebody comes up with reliable and easy steps to reproduce this you are likely on your own.

    (easy steps = Download this Dockerfile and access Nextcloud)

  9. savely-krasovsky commented on Jul 9, 2016

    @savely-krasovsky

    I use nginx and solved problem by adding this:

    location ~* \/apps\/(?:theming\/styles\.css).*$ {
                    rewrite ^ /index.php last;
            }
    

    So @LukasReschke was right. The problem is related with rewrite.

  10. Bugsbane commented on Jul 9, 2016

    @Bugsbane
    Member

    Yeah, I'm on Nginx with 9.0.52 and PHP 7.0.2 and I don't see this issue at all.

  11. oparoz commented on Jul 11, 2016

    @oparoz
    Member

    For me, this line is the one which is creating problems:
    RewriteCond %{REQUEST_FILENAME} !\.(css|js|svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$

    which makes sense since it creates a special condition for css files.

    In my opinion, it's a bad idea to name the route styles.css, if I name it just styles, then everything works.

  12. LukasReschke commented on Jul 11, 2016

    @LukasReschke
    Member

    RewriteCond %{REQUEST_FILENAME} !.(css|js|svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$

    Strange. That works just quite fine here, I suspect that your Apache and OS version interprets that ruleset then differently and just assumes the file might exists locally.

    Anyways, good point. Let's change that to /style for the next release then. 🚀

  13. added and removed
    0. Needs triagePending check for reproducibility or if it fits our roadmap
    on Jul 11, 2016
  14. added this to the milestone on Jul 11, 2016
  15. self-assigned this
    on Jul 11, 2016
  16. LukasReschke commented on Jul 11, 2016

    @LukasReschke
    Member

    @oparoz If you still have the branch locally a PR is welcome, otherwise I'm happy to do it as well :-)

  17. oparoz commented on Jul 11, 2016

    @oparoz
    Member

    Strange. That works just quite fine here, I suspect that your Apache and OS version interprets that ruleset then differently and just assumes the file might exists locally.

    Strange indeed. Probably an extra Apache directive enforcing that behaviour.

    If you still have the branch locally a PR is welcome, otherwise I'm happy to do it as well :-)

    I was just tinkering, but that's a good excuse to set up a local server dev env :)

  18. added a commit that references this issue on Jul 11, 2016
    839ee5e
  19. oparoz commented on Jul 11, 2016

    @oparoz
    Member

    PR with the fix is in #361

  20. modified the milestones: , on Jul 11, 2016
  21. added a commit that references this issue on Jul 11, 2016
    1f28ed8
  22. savely-krasovsky commented on Jul 12, 2016

    @savely-krasovsky

    Thanks for fix! Just updated some php-files, and deleted rewrite from nginx.conf and it still works pretty good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions