-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Toolbar Icons not showing after update (1.6.2 -> 1.8.3) when exposing in a subdir via a reverse proxy and minify = true #3956
Comments
Please provide details. Are you running behind reverse proxy? |
It's running in development mode, although the systemd service has "Environment=NODE_ENV=production" in it, no reverse proxy, the css is minified, settings.json is barely touched (only mysql and admin pw is changed). It looks like etherpad can't load all fonts because it looks at /static/font/*.ttf instead of /etherpad/src/static/font/ |
Try turn minify to false and maxage to 0 in settings.json |
I did, nothing changed |
At my laptop now, might be able to help more. Most useful thing is to get your settings.json (but remove any passwords). Can you provide that please? FWIW I tested 1.6.* > 1.8.3 and didn't experience this but it could be related to your settings.json having some legacy cruft in :! |
If you don't want to provide settings one thing to do is:
Restart and see if it's fixed. |
|
Okay cool, gimme 2 mins. |
Nope, that didn't replicate, toolbar buttons exist for me.. Is this instance public that I can access? feel free to email me URL contact@etherpad.org Stupid question.. Did you
Thanks! |
Sadly it's not a public instance. |
This is the systemd service btw: [Service] [Install] |
How did you install? Did you |
Request URL:
All looks fine to me. |
I installed it via git clone, or rather updated it. I believe it was installed a few years ago (by another admin) through zip unpack. I used rsync to update everything |
Ah, I wonder if the last admin put some hacks in? if you |
What happens if you git clone a fresh repo then copy your settings.json over? That will work but obviously isn't fixing the problem that something is weird.. |
I'm going to do that now. yes, it's very weird.. as if the root folder for the fonts is not the same as etherpad |
The code is right btw. src/ is the root folder.. I think the previous admin hacked something, I can't say what without seeing a git diff. Can we close this now? |
previous admin didn't use git (was not installed), still doesn't work after clean clone.. |
@skramsa lulwut. Completely clean clone and run and it doesn't work? :! I have a feeling something is weird with your setup.. Any errors or warnings in log? What if you do a completely clean clone and don't change any settings? Does it still fail then? Any chance you can make it public temporarily for me to debug? |
no it's on a secured intranet.. could the upgrade from node 6 to 12 have something to do with it? |
Not sure.. I'm not really sure other debug steps here.. The only clue I have is.. But you said you cleaned all cache and do a clean run.. You disabled minify, did |
What's your |
npm is 6.14.4 and node -v is 12.16.2. stupid question, but what exactly do you mean with "my" git sha? |
I rerolled to 1.6.2 and set minify to false and suddenly it works again (before that not even the old version's icons did function). That's a relief.. I will try to make another clean setup next week with this settings, maybe this time it will work :D Thank you so much for your help!! |
In your etherpad folder type I wanna see which commit you are on. |
Hello But : The apache proxy configuration is coming from the documentation, nothing exotic on my side. |
Had the exact same problem. I use a reverse proxy and the Etherpad instance is in a subdirectory (/etherpad). I managed to make it right adding the following to my apache configuration.
I did not change anything in settings.json. |
@skramsa hasn't mentioned any reverse proxy so I don't think it's related? Skramsa please confirm there is no reverse proxy in your setup. |
Thank your for acknowledging. Setting minify to false did not solve the
problem for me.
I am using this on a jitsi installation on an AWS EC2 instance, and there
is a nginx server being used to host jitsi and also to start the node
server for etherpad service on same machine on port 9001.
Does this mean I may need to tweak some other nginx setting? (I dont
understand reverse proxy properly but could this be that case?), Or do I
just need to wait for the fix to be available.
…On Thu, May 14, 2020 at 6:07 AM muxator ***@***.***> wrote:
We have various issues going on here.
1.
the test Nginx config file had the wrong redirect for /static. The
whole location /static section has to be deleted from here
<#3956 (comment)>.
In the email storm received during these days, I think to remember that *a
user complained - indeed - that /static was going to clash with a lot of
other web applications*. Probably he was misled by an example similar
to this one;
This has to be fixed going through the documentation (the wiki?
Somehwere else on the internet?) and *improving the quality of the
examples*.
2.
4177b3f
<4177b3f>
moved the font-face declarations from src/static/css/pad.css to two
imported files (src/static/css/pad/fonts.css and
src/static/css/pad/toolbar.css) in a different directory, and URLs in
src are relative to the stylesheet path
***@***.***/src>;
3.
on top of that, after merging 95fd5ce
<95fd5ce>
for the forthcoming *1.8.4*, we would have a cache staleness problem
that also needs to be addressed.
I'm doing some tests and preparing a PR.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3956 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AH7VXAS65ZUAR33CPKSI6OLRRM4KZANCNFSM4MSSRTRQ>
.
|
Ok for me to test. I don't have special configuration for
But it works for me. Under apache, I switched to false and everything started working fine. |
I can test it.
…On Thu, May 14, 2020 at 1:30 PM julpec ***@***.***> wrote:
@skramsa <https://github.com/skramsa>, @julpec <https://github.com/julpec>,
@lucaguindani <https://github.com/lucaguindani>, @ashishhari
<https://github.com/ashishhari> (and John, obviously): is someone of you
in the position of testing that PR to see if it works for them? I would
like an independent validation, if possible.
Ok for me to test. I don't have special configuration for static.
Thank your for acknowledging. Setting minify to false did not solve the
problem for me.
But it works for me. Under apache, I switched to false and everything
started working fine.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3956 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AH7VXAXKTJKZCAZVRXZIJX3RROQLPANCNFSM4MSSRTRQ>
.
|
Also confirming -> setting minify to false did work correctly on my system.
(i probably did not restart the service correctly last time).
…On Thu, May 14, 2020 at 1:30 PM julpec ***@***.***> wrote:
@skramsa <https://github.com/skramsa>, @julpec <https://github.com/julpec>,
@lucaguindani <https://github.com/lucaguindani>, @ashishhari
<https://github.com/ashishhari> (and John, obviously): is someone of you
in the position of testing that PR to see if it works for them? I would
like an independent validation, if possible.
Ok for me to test. I don't have special configuration for static.
Thank your for acknowledging. Setting minify to false did not solve the
problem for me.
But it works for me. Under apache, I switched to false and everything
started working fine.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3956 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AH7VXAXKTJKZCAZVRXZIJX3RROQLPANCNFSM4MSSRTRQ>
.
|
@julpec, @ashishhari: setting minify = false is a known workaround. The procedure would be the following, do this only if all the steps are clear for you: Start replicating the bug:
Try the fix:
|
I would like but I don't know the procedure to apply the PR :( |
Thanks @muxator I will test within the hour. |
Oh wow I would have never come up with that fix! That's bonkers. |
For those also wanting to test.. after testing remember to |
thanks, I will test this afternoon |
Hrm I think something is not quite performant @muxator.. I'm seeing ~54 requests, vs ~49 (on current Note the multiple requests for the same file... :( It's defo progress but multiple requests for the same file is not the solution we're looking for. |
the multiple request come from the different iframe I think. Both main page and editor iframe need the font, it has always been like this no? |
afaik cleanCSS was used to fix that issue @seballot |
Yes, it was always this way. |
I think cleanCss was more to avoid loading each css partial (pad/popups.css, pad/editbar.css, pad/chat.css ...), and instead load only one pad.css But using iframe, the browser is obliged to request twice each file share with the iframe. But the second call should use local cache ("loaded from cache") |
I applied the pull request and it works without any problem (with apache) |
Thanks @julpec. This evening I'll try to address the # of requests concern @JohnMcLear brought up. If there is nothing going on, I'll merge the PR. |
Awesome tnx mux |
Is there a way to upload HAR files somewhere in Github? I have tested #4002 and I am willing to share the recordings, but I do not know where to upload them. Common elements:
Variables:
These are four binary variables -> 2^4 = 16 possibilities. Here's the more relevant cases:
The bottom line is:
|
These were my findings too, I also took the time to research page load speed performance profiling tools (beyond developer tools) and decided that if developer tools weren't giving me significant deviation from a mean then the results were suitable enough for our application. Total transfer size decreasing is clearly a good thing, but http request overhead can be expensive due to latency. We can merge this but be mindful that when we rewrite the front end (which feels inevitable due to all of the inline JS that will ultimately need to be shifted around) then this is an area we should strive to improve. All things said, Etherpad is great compared to most others in htis field, the exception being Google docs which is the gold standard for absolutely shockingly fast "time to edit" which in this world is king, not end of page 'load'. |
So TLDR; Merge away @muxator - this thread exists as a resource for those looking to optimize for Etherpad instances NOT in subfolders. |
4177b3f moved the font-face declarations from src/static/css/pad.css to two imported files (src/static/css/pad/fonts.css, src/static/css/pad/toolbar.css) in a different directory. This results in the font files being invoked from CSSes residing in different directories in the minified and un-minified case. URLs in the src attribute are relative to the stylesheet path [0], and so we have to start requiring clean-css to rebase them. Before this change, the non minified casse worked by chance, because there were a lot of "..", which ended up resolving to the root of the site anyways. Fixes #3956 [0] https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/src
great work ! |
+1 tnx! |
👍 |
The toolbar Icons are not showing and I get missing font family errors, but they're all in their folders, nothing was changed. Can you help me fix this issue?
GET /static/font/Roboto-Regular.ttf net::ERR_ABORTED 404 (Not Found)
I get this for all font families.
The text was updated successfully, but these errors were encountered: