freenet / freenetorg-website

The code behind https://freenet.org/ and https://staging.freenet.org/
GNU Affero General Public License v3.0
8 stars 3 forks source link

Not "hydrating" HTML with text #2

Closed sanity closed 2 years ago

sanity commented 2 years ago

When I visit http://staging.freenet.org/ I momentarily just see the bullet points before the page renders properly.

Looking at the page source, it looks like the text of the HTML isn't being populated in the initial render:

   <div id="K7" class="ui text center aligned container" background-color="e8e8e8">
         <div id="K8" class="ui text left aligned container">
            <div id="K9">
               <h1 id="Ka" class="ui text"></h1>
               <h2 id="Kb" class="ui text"></h2>
            </div>
            <br id="Kc">
Derek52 commented 2 years ago

Can you take a look at this file and tell me if you see a reason this is happening? Could this be a bug in Kweb? Or, have I done something wrong? I don't see why my code would do this.

sanity commented 2 years ago

I don't see anything wrong with that code, it must be a bug in Kweb.

Element.kt#L413 is where it's supposed to update the jsoupDoc with the text if it's doing the initial rendering for the page.

Ok, I think I see the problem, the jsoupDoc != null part of this when clause should come before the browser.isCatchingOutbound() part.

Would you mind making the change and deploying a new kweb version?

Derek52 commented 2 years ago

I can do that shortly.

sanity commented 2 years ago

Hold off, that's not the fix - I'm working on it now.

Derek52 commented 2 years ago

ok

sanity commented 2 years ago

Fixed with kweb 0.12.1.