Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

[BUG] cloud not load the waline's comments #408

Open
ryan4yin opened this issue Feb 19, 2022 · 0 comments
Open

[BUG] cloud not load the waline's comments #408

ryan4yin opened this issue Feb 19, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@ryan4yin
Copy link

ryan4yin commented Feb 19, 2022

Describe the bug

when enable waline comment system, comments cannot been loaded, console shows the following error:

TypeError: Cannot read properties of null (reading 'insertBefore')
    at insert (Waline.min.js:1:65194)
    at z (Waline.min.js:1:44489)
    at C (Waline.min.js:1:43741)
    at w (Waline.min.js:1:43327)
    at ue.fn (Waline.min.js:1:49932)
    at ue.run (Waline.min.js:1:25553)
    at P (Waline.min.js:1:50224)
    at $ (Waline.min.js:1:48477)
    at j (Waline.min.js:1:46431)
    at w (Waline.min.js:1:43352)

But if I run waline with a timer delay, every thing will be ok:

                const config = {
                    el: '#waline',
                    serverURL: 'waline-comment.thiscute.world',
                    visitor: 'true',
                    dark: 'auto',
                };
                setTimeout(function() {
                    Waline(config);
                }, 300);

related issues:

I think it's because theme.js did something that would conflict with waline, such as edit the DOM elements, but I do not know how to solve this.

Expected behavior

no exceptions, comments works fine.

Build Environment

  • OS: Ubuntu
  • Theme version: master(ecb1a58)
  • Hugo version: hugo v0.92.2+extended

Additional Info

I test waline here: https://thiscute.world/about/

@ryan4yin ryan4yin added the bug Something isn't working label Feb 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant