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

[Bug]: Style Sheets not working for any theme. #1677

Open
francesmothrock opened this issue Sep 8, 2024 · 8 comments
Open

[Bug]: Style Sheets not working for any theme. #1677

francesmothrock opened this issue Sep 8, 2024 · 8 comments

Comments

@francesmothrock
Copy link

francesmothrock commented Sep 8, 2024

Operating system

Linux Ubuntu 24.04 (Gnome 46.0)

Publii version

0.46.1

Post editor

None

Bug description

When I click Preview your changes, it opens the web site in a browser, but it is just unformatted text, as though the style sheet is not referred to correctly. I tried it with Publii installed via the Appimage and .Deb file, and got the same result. I tried it with the site that I already had in place, and made a new test site, same both ways. I deleted the .config/Publii directory and let it recreate, in case a setting was wrong, and that didn't help either.

Apologies if I'm missing something silly.

Steps to reproduce

No response

Relevant log output

No errors shown.
@healBvdb
Copy link

Operating System

Desktop: GNOME v: 46.4 Distro: Fedora Linux 40 (Workstation Edition)

Publii version

v.0.46.1 (build 16918)

Exactly the same effect for me
When I try to preview a simple site I get the html with no css

image

@dziudek
Copy link
Collaborator

dziudek commented Sep 11, 2024

Hi,

It is the same issue for free themes downloaded form marketplace?

Could you also check:

  • if preview folder contains assets/css/main.css + style.css files?
  • what is displayed in the developer console as errors?

@healBvdb
Copy link

healBvdb commented Sep 11, 2024

Tested with Mono(v.2.0.1.0) it looks different but still not correct
image

The sites/test1/preview/assets/css contain main.css and style.css

The developer console show :
index.html:3 Access to font at 'file:///home/username/Documents/Publii/sites/test1/preview/assets/dynamic/fonts/publicsans/publicsans.woff2' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: brave, chrome, chrome-extension, chrome-untrusted, data, http, https, isolated-app.
publicsans.woff2:1
Failed to load resource: net::ERR_FAILED
/home/username/Documents/Publii/sites/test1/preview/assets/css/style.css?v=38aa6f8ee24977b343373b98d92fe3ae:1
Failed to load resource: net::ERR_FILE_NOT_FOUND
scripts.min.js:1
Failed to load resource: net::ERR_FILE_NOT_FOUND
svg-map.js:1
Failed to load resource: net::ERR_FILE_NOT_FOUND
svg-fix.js:1
Failed to load resource: net::ERR_FILE_NOT_FOUND
index.html:1 The resource file:///home/usernamealisdecris/Documents/Publii/sites/test1/preview/assets/dynamic/fonts/publicsans/publicsans.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate as value and it is preloaded intentionally.
index.html:1 The resource file:///home/usernamealisdecris/Documents/Publii/sites/test1/preview/assets/dynamic/fonts/publicsans/publicsans.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate as value and it is preloaded intentionally.

@francesmothrock
Copy link
Author

francesmothrock commented Sep 11, 2024

Yes, I tried installing several different themes, and had the same problem with them all.

I'm a little confused about the preview folder. When I hit preview, it opens a browser window at this address:
file:///run/user/1000/doc/87e57a5f/index.html
And in that case index.html is the only file in that folder.
I also have files in:
/home/inkblot/Documents/Publii/sites/test/preview/
and that looks like a complete web site, including assets/css/main.css + style.css. But the site still doesn't show styles when I open the html files in that folder.

I'm not sure how to access the developer console - I can only find the the log viewer under Tools & Plugins, and haven't found reference to developer console in Publii documentation. Should I be showing results from one of those logs? Deployment-errors.log says "the log file is empty..."

@dziudek
Copy link
Collaborator

dziudek commented Sep 12, 2024

@francesmothrock @healBvdb - most probably it is related to GVFS (Gnome Virtual File System), because Publii should open normal path /home/username/... while it seems that Publii opens temporary path to the index.html file and only this file. I afraid that it will be hard to solve - it seems that index.html file is moved by your system to temporary location and opened from this folder instead of original one.

@francesmothrock
Copy link
Author

francesmothrock commented Sep 12, 2024

I think you're right! On the one hand, it may be tough to fix because of Gnome's weird behavior. On the up side, it gives me a workaround, because if I navigate to the proper preview folder and open it in a different web browser, it opens the folder in its proper location, not moving it to the /run/... directory. So I can work with that!

I'll test it out using a different Linux distro when I get a chance to see if that makes a difference.

Thank you!

@francesmothrock
Copy link
Author

Follow up - I tested this on my spare machine with Linux Mint Debian Edition, with Cinnamon desktop and it worked fine. So it seems like it's a Gnome specific problem.

@AlejandroAkbal
Copy link

AlejandroAkbal commented Nov 2, 2024

Using ZorinOS (Ubuntu 22) with Gnome and Firefox, also having this problem :/

But it does not happen with Chrome? Maybe allow us to select which browser to open?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants