contacts icon indicating copy to clipboard operation
contacts copied to clipboard

Blank contact page

Open cr4shydlo opened this issue 1 year ago • 6 comments

Hello. I try tu run contact app in nextcloud. But when i try to open contact page i get blank page (nextcloud menu still works) but i dont see anything. Any add contact button etc...

Nextcloud Hub 9 (30.0.1) Contact Version : Version 6.1.0, AGPL-licensed

I use NGINX + PHP_FPM 8.3

If anyone can help, will be gratefull.

Best.

cr4shydlo avatar Oct 22 '24 19:10 cr4shydlo

I ran into the same problem. A Nextcloud system check and a web search showed that I need to update my Nginx server configuration since one of the recent updates:

old:

    location ~ \.(?:css|js|svg|gif|png|jpg|ico|wasm|tflite)$ {
        try_files $uri /index.php$request_uri;
        expires 6M;         # Cache-Control policy borrowed from `.htaccess`
        access_log off;     # Optional: Don't log access to assets

        location ~ \.wasm$ {
            default_type application/wasm;
        }
    }

new:

    location ~ \.(?:css|js|svg|gif|png|jpg|ico|wasm|tflite|mjs)$ {
        try_files $uri /index.php$request_uri;
        expires 6M;         # Cache-Control policy borrowed from `.htaccess`
        access_log off;     # Optional: Don't log access to assets

        location ~ \.wasm$ {
            default_type application/wasm;
        }

        location ~ \.mjs$ {
            default_type text/javascript;
        }
    }

src: https://github.com/nextcloud/server/issues/42989#issuecomment-2036089202

Hope this helps.

jkuettner avatar Oct 30 '24 21:10 jkuettner

@jkuettner Thanks! This solved the problem for me.

danhead avatar Nov 17 '24 21:11 danhead

Thank you, that helped me as well (the mjs extension was missing in my case).

Just ftr: The NextCloud docs also mention some other file extensions in the location block https://docs.nextcloud.com/server/stable/admin_manual/installation/nginx.html

    # Serve static files
    location ~ \.(?:css|js|mjs|svg|gif|ico|jpg|png|webp|wasm|tflite|map|ogg|flac)$ {
        try_files $uri /index.php$request_uri;
        # HTTP response headers borrowed from Nextcloud `.htaccess`
        add_header Cache-Control                     "public, max-age=15778463$asset_immutable";
        add_header Referrer-Policy                   "no-referrer"       always;
        add_header X-Content-Type-Options            "nosniff"           always;
        add_header X-Frame-Options                   "SAMEORIGIN"        always;
        add_header X-Permitted-Cross-Domain-Policies "none"              always;
        add_header X-Robots-Tag                      "noindex, nofollow" always;
        add_header X-XSS-Protection                  "1; mode=block"     always;
        access_log off;     # Optional: Don't log access to assets
    }

    location ~ \.(otf|woff2?)$ {
        try_files $uri /index.php$request_uri;
        expires 7d;         # Cache-Control policy borrowed from `.htaccess`
        access_log off;     # Optional: Don't log access to assets
    }

FelixSchwarz avatar Nov 30 '24 09:11 FelixSchwarz

can you maybe help me with this? i cant find the file i have to edit. i am running nextcloud inside containers with mailcow.

Blackraz0r avatar Mar 26 '25 15:03 Blackraz0r

can you maybe help me with this? i cant find the file i have to edit. i am running nextcloud inside containers with mailcow.

Are you using the AIO container? or a custom container?

SebastianKrupinski avatar Mar 26 '25 17:03 SebastianKrupinski

i use the container from the helper script. so basically nextcloud with nginx. but i cant find the file where i have to modify the location

Blackraz0r avatar Mar 27 '25 12:03 Blackraz0r