Particles js does'n work on sub languages
pelloq1 opened this issue · comments
Hello,
this is related to the #798 unfixed issue.
bug
What happened:
I cannot have the particles.js working on sublanguage versions of site.
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
I put a temporary version of the site here http://abacus.abouc.ch
In Fr (main) the particles work, but not in EN/DE.
Is there a quick fix I can (manualy) apply ?
Thanks
Environment:
- Syna Theme version: 0.17.3
Console
particles.js:18 Uncaught TypeError: Cannot read property 'offsetWidth' of null
at new pJS (particles.js:18)
at window.particlesJS (particles.js:1517)
at eval (hero.js:9)
at Array.forEach (<anonymous>)
at eval (hero.js:6)
at Object../assets/js/hero.js (syna-hero.min.97a3fff0c67d9da74ebdd6af2640d8a9cde6200539e8c3b2c091b7fc6644420e.js:7)
at __webpack_require__ (syna-hero.min.97a3fff0c67d9da74ebdd6af2640d8a9cde6200539e8c3b2c091b7fc6644420e.js:2)
at syna-hero.min.97a3fff0c67d9da74ebdd6af2640d8a9cde6200539e8c3b2c091b7fc6644420e.js:4
at syna-hero.min.97a3fff0c67d9da74ebdd6af2640d8a9cde6200539e8c3b2c091b7fc6644420e.js:5
pJS @ particles.js:18
window.particlesJS @ particles.js:1517
eval @ hero.js:9
eval @ hero.js:6
./assets/js/hero.js @ syna-hero.min.97a3fff0c67d9da74ebdd6af2640d8a9cde6200539e8c3b2c091b7fc6644420e.js:7
__webpack_require__ @ syna-hero.min.97a3fff0c67d9da74ebdd6af2640d8a9cde6200539e8c3b2c091b7fc6644420e.js:2
(anonymous) @ syna-hero.min.97a3fff0c67d9da74ebdd6af2640d8a9cde6200539e8c3b2c091b7fc6644420e.js:4
(anonymous) @ syna-hero.min.97a3fff0c67d9da74ebdd6af2640d8a9cde6200539e8c3b2c091b7fc6644420e.js:5
Would you please share reproduction steps? I just tested a few possible approaches and non of them are reproducing the issue in the website. If you can share a repo that would be awesome.
Hello,
Please follow these steps :
- install a fresh hugo site
- install syna in themes
- unzip this file and place content and config.toml content.zip
- run
- defaut home page work fine
- DE / EN home pages work fine EXCEPT the particles.
Thanks for looking this.
What do you use to run the site aka what specific command? Any difference between hugo server
and hugo
?
Are you using Hugo or Hugo extended?
Thanks for the help.
Shame on me, but I dont know how to get the very last version of syna.
I followed this :
git submodule init # If you haven't initialized before
git submodule add https://git.okkur.org/syna themes/syna
cd themes/syna
git checkout v0.17 # Latest release as of now is v0.17.0
But is there a way to get the very last version and overwrite the current version ?
Thanks you.
Hugo Static Site Generator v0.72.0/extended windows/amd64 BuildDate: unknown
hugo server -D -F
cd themes/syna
git fetch --all
git checkout v0.17 # branch including master or specific version works
git pull # if a branch is used
I do a mistake :
Deleted the syna folder manualy, and now:
Micro@LAPTOP-SPN2470S MINGW64 /c/Abacus-sync/sites/abacus (master)
$ cd themes/syna
Micro@LAPTOP-SPN2470S MINGW64 /c/Abacus-sync/sites/abacus/themes/syna (master)
$ git fetch --all
Micro@LAPTOP-SPN2470S MINGW64 /c/Abacus-sync/sites/abacus/themes/syna (master)
$ git checkout v0.17
error: pathspec 'v0.17' did not match any file(s) known to git
As the syna folder is now deleted it should work with these commands again:
git submodule init # If you haven't initialized before
git submodule add https://git.okkur.org/syna themes/syna
cd themes/syna
git checkout v0.17 # Latest release as of now is v0.17.0
To update again:
cd themes/syna
git fetch --all
git checkout v0.17 # branch including master or specific version works
git pull # if a branch is used
I am sorry :
$ git submodule add https://git.okkur.org/syna themes/syna
'themes/syna' already exists in the index
Then I create a themes/syna2
And now I cannot more build my site :-(
Error: Error building site: POSTCSS: failed to transform "style.css" (text/css): resource "scss/styles/index.scss_02bf14281ac065540fcc7ecc15ca70a4" not found in file cache
rm themes/syna
rm themes/syna2
git submodule add https://git.okkur.org/syna themes/syna
Should work afaik
I started from scrach last hugo, recreate a site, copy the old :
- content
- static
- shortcode
Installing syna following the base guideline
All is fine until I cannot build the site :
Building sites  WARN 2020/08/12 17:56:31 .File.Dir on zero object. Wrap it in if or with: {{ with .File }}{{ .Dir }}{{ end }}
Total in 987 ms
Error: Error building site: POSTCSS: failed to transform "style.css" (text/css): resource "scss/styles/index.scss_02bf14281ac065540fcc7ecc15ca70a4" not found in file cache
Here the whole process :
Micro@LAPTOP-SPN2470S MINGW64 /c/Abacus-sync/sites (master)
$ hugo new site abacus
Congratulations! Your new Hugo site is created in C:\Abacus-sync\sites\abacus.
Just a few more steps and you're ready to go:
1. Download a theme into the same-named folder.
Choose a theme from https://themes.gohugo.io/ or
create your own with the "hugo new theme <THEMENAME>" command.
2. Perhaps you want to add some content. You can add single files
with "hugo new <SECTIONNAME>\<FILENAME>.<FORMAT>".
3. Start the built-in live server via "hugo server".
Visit https://gohugo.io/ for quickstart guide and full documentation.
Micro@LAPTOP-SPN2470S MINGW64 /c/Abacus-sync/sites (master)
$ cd abacus
Micro@LAPTOP-SPN2470S MINGW64 /c/Abacus-sync/sites/abacus (master)
$ git init
Initialized empty Git repository in C:/Abacus-sync/sites/abacus/.git/
Micro@LAPTOP-SPN2470S MINGW64 /c/Abacus-sync/sites/abacus (master)
$ git submodule init
Micro@LAPTOP-SPN2470S MINGW64 /c/Abacus-sync/sites/abacus (master)
$ git submodule add https://git.okkur.org/syna themes/syna
Cloning into 'C:/Abacus-sync/sites/abacus/themes/syna'...
warning: redirecting to https://github.com/okkur/syna.git/
remote: Enumerating objects: 154, done.
remote: Counting objects: 100% (154/154), done.
remote: Compressing objects: 100% (140/140), done.
remote: Total 17232 (delta 36), reused 62 (delta 10), pack-reused 17078
Receiving objects: 100% (17232/17232), 23.66 MiB | 1.82 MiB/s, done.
Resolving deltas: 100% (11459/11459), done.
warning: LF will be replaced by CRLF in .gitmodules.
The file will have its original line endings in your working directory
Micro@LAPTOP-SPN2470S MINGW64 /c/Abacus-sync/sites/abacus (master)
$ git submodule add https://git.okkur.org/syna themes/syna
'themes/syna' already exists in the index
Micro@LAPTOP-SPN2470S MINGW64 /c/Abacus-sync/sites/abacus (master)
$ cd themes/syna
Micro@LAPTOP-SPN2470S MINGW64 /c/Abacus-sync/sites/abacus/themes/syna (master)
$ git checkout v0.17
Switched to a new branch 'v0.17'
Branch 'v0.17' set up to track remote branch 'v0.17' from 'origin'.
Micro@LAPTOP-SPN2470S MINGW64 /c/Abacus-sync/sites/abacus/themes/syna (v0.17)
$ cd ..
Micro@LAPTOP-SPN2470S MINGW64 /c/Abacus-sync/sites/abacus/themes (master)
$ cd ..
Micro@LAPTOP-SPN2470S MINGW64 /c/Abacus-sync/sites/abacus (master)
$ hugo
Building sites  WARN 2020/08/12 17:56:31 .File.Dir on zero object. Wrap it in if or with: {{ with .File }}{{ .Dir }}{{ end }}
Total in 987 ms
Error: Error building site: POSTCSS: failed to transform "style.css" (text/css): resource "scss/styles/index.scss_02bf14281ac065540fcc7ecc15ca70a4" not found in file cache
This is due to #816 to fix this use either the non extended hugo version or install postcss-cli, but not sure, what's the best way to do this is in windows. We are working on fixing the underlying issue so.
Same error with non extended hugo.
Did you have a ETA for the fix ?
In all cases, thanks for you work.
The latest would be within the next release so 2020-08-23, but we are hoping to get this merged into master earlier and therefore used earlier.
Hello,
Did you have some news? I wait on this to publish my site.
I don't want to make any pressure. Just get some infos, or workaround.
Thanks.
Release is delayed unfortunately, but planned to get done till the end of week. Thanks for understanding.
Particles work fine now (I was not able to build the site such the postcss issue).
Thanks
Closing as this is fixed and not really blocked by the separate postcss-cli issue.