# Theme issue while using farmos v2

**URL:** <https://farmos.discourse.group/t/theme-issue-while-using-farmos-v2/1321>\
**Category:** Using farmOS\
**Created:** [August 22, 2022, 11:27am UTC](https://farmos.discourse.group/t/theme-issue-while-using-farmos-v2/1321 "2022-08-22T11:27:53Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![perfectinfo](https://avatars.discourse-cdn.com/v4/letter/p/7ba0ec/32.png) [@perfectinfo](https://farmos.discourse.group/u/perfectinfo)\
**Post date:** [August 22, 2022, 11:27am UTC](https://farmos.discourse.group/t/theme-issue-while-using-farmos-v2/1321/1 "2022-08-22T11:27:53Z")

</div>

i too get crooked site page on localhost (image attached), am able to login and work, but the login screen (as well as other pages too loose theme and show a different theme all of a sudden) is boring, all theme is gone all of a sudden, any help will be great

 ![image](https://global.discourse-cdn.com/free1/uploads/farm_os/original/1X/2955b14c9c7309ae09bfddf38caa552a8fc504d8.png)

 ![image](https://global.discourse-cdn.com/free1/uploads/farm_os/original/1X/4ee2b620227a9bbf953663a1eef2e3c2617c440f.png)

---

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [August 22, 2022, 11:31am UTC](https://farmos.discourse.group/t/theme-issue-while-using-farmos-v2/1321/2 "2022-08-22T11:31:43Z")

</div>

@perfectinfo Does `/admin/reports/status` report any issues with your installation?

I wonder if Drupal is unable to write to the files directory. This would prevent it from saving aggregated CSS files, which may explain what you’re seeing (assuming everything else went properly with the install).

One thing you can try is going to `/admin/config/development/performance` and disabling CSS and JS aggregation. If Drupal is unable to write to the files directory, turning these off may resolve the theme issue. But you will still need to figure out your file permissions issue for other reasons.

---

<div class="post-metadata">

**Author:** ![Symbioquine](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/symbioquine/32/284_2.png) [@Symbioquine](https://farmos.discourse.group/u/Symbioquine)\
**Post date:** [August 22, 2022, 1:25pm UTC](https://farmos.discourse.group/t/theme-issue-while-using-farmos-v2/1321/3 "2022-08-22T13:25:39Z")

</div>

Broken styling is also often a result of a misconfigured reverse proxy - like when NGINX is used to serve farmOS over HTTPS.

The problem there being that Drupal (farmOS) needs to know what URL the browser is accessing Drupal at so it can produce URLs back to itself for things like the styles/fonts/etc.

If you can share a bit more about your setup, we can probably identify which of these it is…

---

<div class="post-metadata">

**Author:** ![perfectinfo](https://avatars.discourse-cdn.com/v4/letter/p/7ba0ec/32.png) [@perfectinfo](https://farmos.discourse.group/u/perfectinfo)\
**Post date:** [August 23, 2022, 5:55am UTC](https://farmos.discourse.group/t/theme-issue-while-using-farmos-v2/1321/4 "2022-08-23T05:55:33Z")

</div>

`/admin/reports/status` report

 ![image](https://global.discourse-cdn.com/free1/uploads/farm_os/original/1X/e598a115bdc931d1d283e8812dbb3cc51d61c863.png)

---

<div class="post-metadata">

**Author:** ![perfectinfo](https://avatars.discourse-cdn.com/v4/letter/p/7ba0ec/32.png) [@perfectinfo](https://farmos.discourse.group/u/perfectinfo)\
**Post date:** [August 23, 2022, 6:11am UTC](https://farmos.discourse.group/t/theme-issue-while-using-farmos-v2/1321/5 "2022-08-23T06:11:58Z")

</div>

```auto
a brief about my setup

1. i have successfully installed the farmos on self hosting docker (my yml reads as follows

version: ‘3’
services:
www:
`# Update this to the latest stable version before deploying.`
image: farmos/farmos:2.0.0-beta6
volumes:
- ‘./:/opt/drupal/web/sites’
restart: always
proxy:
image: nginx:stable-alpine
depends_on:
- www
ports:
- ‘80:80’
- ‘443:443’
volumes:
- ‘./nginx.conf:/etc/nginx/nginx.conf’
- ‘./ssl:/etc/nginx/ssl’

```

---

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [August 23, 2022, 1:42pm UTC](https://farmos.discourse.group/t/theme-issue-while-using-farmos-v2/1321/6 "2022-08-23T13:42:32Z")

</div>

@perfectinfo Can you share your `nginx.conf`?

---

<div class="post-metadata">

**Author:** ![perfectinfo](https://avatars.discourse-cdn.com/v4/letter/p/7ba0ec/32.png) [@perfectinfo](https://farmos.discourse.group/u/perfectinfo)\
**Post date:** [August 24, 2022, 5:32am UTC](https://farmos.discourse.group/t/theme-issue-while-using-farmos-v2/1321/7 "2022-08-24T05:32:15Z")

</div>

Here it is !

events {}  
http {  
server {  
listen 80 default\_server;  
listen [::]:80 default\_server;  
server\_name \_;  
return 301 https://$host$request\_uri;  
}  
server {  
server\_name localhost;  
listen 443 ssl;  
ssl\_certificate /etc/nginx/ssl/openssl.crt;  
ssl\_certificate\_key /etc/nginx/ssl/openssl.key;  
location / {  
proxy\_set\_header Host $http\_host;  
proxy\_set\_header X-Real-IP $remote\_addr;  
proxy\_set\_header X-Forwarded-Host $http\_host;  
proxy\_set\_header X-Forwarded-For $proxy\_add\_x\_forwarded\_for;  
proxy\_set\_header X-Forwarded-Proto $scheme;  
proxy\_buffer\_size 128k;  
proxy\_buffers 4 256k;  
proxy\_busy\_buffers\_size 256k;  
proxy\_pass [http://www](http://www);  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [August 24, 2022, 11:03am UTC](https://farmos.discourse.group/t/theme-issue-while-using-farmos-v2/1321/8 "2022-08-24T11:03:38Z")

</div>

Configuration all looks good, and the screenshot of your `/admin/reports/status` page shows that it DOES have the theme and CSS applied. So what pages are working and what pages aren’t, I wonder?

> One thing you can try is going to `/admin/config/development/performance` and disabling CSS and JS aggregation. If Drupal is unable to write to the files directory, turning these off may resolve the theme issue. But you will still need to figure out your file permissions issue for other reasons.

Did you try this?

---

<div class="post-metadata">

**Author:** ![perfectinfo](https://avatars.discourse-cdn.com/v4/letter/p/7ba0ec/32.png) [@perfectinfo](https://farmos.discourse.group/u/perfectinfo)\
**Post date:** [August 24, 2022, 11:09am UTC](https://farmos.discourse.group/t/theme-issue-while-using-farmos-v2/1321/9 "2022-08-24T11:09:23Z")

</div>

prior to starting this thread, and presuming (my bad) , it may be theme issue, i tried [The website encountered an unexpected error. Please try again later - #8 by mstenta](https://farmos.discourse.group/t/the-website-encountered-an-unexpected-error-please-try-again-later/927/8) as per your previous post and found that the farmos started fresh installation 🤒

now i am using it afresh without https without any issues (i started this thread to learn what i must be doing wrong to prevent future issues, i got the same reinstall once earlier also coz of the theme issue)

---

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [August 24, 2022, 11:35am UTC](https://farmos.discourse.group/t/theme-issue-while-using-farmos-v2/1321/10 "2022-08-24T11:35:35Z")

</div>

Oh so this was related to you experimenting with changing the theme? And a fresh install of farmOS (with default theme and configuration) works?

---

<div class="post-metadata">

**Author:** ![perfectinfo](https://avatars.discourse-cdn.com/v4/letter/p/7ba0ec/32.png) [@perfectinfo](https://farmos.discourse.group/u/perfectinfo)\
**Post date:** [August 24, 2022, 5:16pm UTC](https://farmos.discourse.group/t/theme-issue-while-using-farmos-v2/1321/11 "2022-08-24T17:16:21Z")

</div>

Unfortunately it was on production not experiment, suffered 2 times coz of theme

---

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [August 24, 2022, 5:39pm UTC](https://farmos.discourse.group/t/theme-issue-while-using-farmos-v2/1321/12 "2022-08-24T17:39:27Z")

</div>

Ah ok. Just to be clear you got it all working again?

---

<div class="post-metadata">

**Author:** ![perfectinfo](https://avatars.discourse-cdn.com/v4/letter/p/7ba0ec/32.png) [@perfectinfo](https://farmos.discourse.group/u/perfectinfo)\
**Post date:** [August 25, 2022, 3:57am UTC](https://farmos.discourse.group/t/theme-issue-while-using-farmos-v2/1321/13 "2022-08-25T03:57:04Z")

</div>

Yes, but am afraid of another reinstall, could you please guide me how to keep backups for safety?

---

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [August 25, 2022, 11:53am UTC](https://farmos.discourse.group/t/theme-issue-while-using-farmos-v2/1321/14 "2022-08-25T11:53:08Z")

</div>

The “Updating farmOS” docs describe backups a bit, but maybe more detail is needed:

> **Backup your database and files!** Always do this before updating. Be ready and able to roll-back in the event that something goes wrong. Typically this can be done by creating a database dump and a tarball of your `web/sites` directory. If you are using Docker, be sure you can roll back to the previous image version. If you are using packaged releases, be sure you also keep a copy of the old farmOS codebase before updating.

> **[Updating farmOS](https://farmos.org/hosting/update/)**
>
> farmOS is a free and open source web-based application for farm management, planning, and record keeping.

There are basically three types of things to backup:

1. Database (take a database dump)
2. Uploaded files and `settings.php` (all in the `web/sites` directory)
3. The codebase (if you’re using Docker and only bind-mounting the `web/sites` directory, then the Docker image is the backup)

---

<div class="post-metadata">

**Author:** ![perfectinfo](https://avatars.discourse-cdn.com/v4/letter/p/7ba0ec/32.png) [@perfectinfo](https://farmos.discourse.group/u/perfectinfo)\
**Post date:** [August 25, 2022, 5:19pm UTC](https://farmos.discourse.group/t/theme-issue-while-using-farmos-v2/1321/15 "2022-08-25T17:19:09Z")

</div>

Thank you,

I have sqlite db, how to take dump of that?

---

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [August 25, 2022, 10:03pm UTC](https://farmos.discourse.group/t/theme-issue-while-using-farmos-v2/1321/16 "2022-08-25T22:03:53Z")

</div>

SQLite databases are just a single file, and in the case of Drupal I _think_ that gets created inside the `sites` directory (but check your `settings.php` file to find out for sure where it is). If that’s the case then you just need to backup you `sites` directory, and that will include the database.
