incubator-answer icon indicating copy to clipboard operation
incubator-answer copied to clipboard

Add to Head not working

Open tmrwltd opened this issue 2 years ago • 4 comments

Describe the bug There is no output when you add something in the head area. Neither text nor javascript.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Admin > Customize > CSS/HTML'
  2. Add content in Head field and save
  3. Check website (source code) and nothing is visible

Expected behavior Added content should be visible in the head area.

Platform (please complete the following information):

  • Device: Desktop
  • OS: Windows 11
  • Browser Firefox
  • Version 108.0.1

tmrwltd avatar Dec 19 '22 16:12 tmrwltd

@tmrwltd Can you please post the content inserted in step 2, so that we can debug it. thanks!

haitaojarvis avatar Dec 20 '22 04:12 haitaojarvis

I try following:

a) Just type "HEAD" in the form

b) Add Tracking code:

tmrwltd avatar Dec 20 '22 04:12 tmrwltd

Oh oh oh, I suddenly get it. You were not seeing the insert in source code mode (I just noticed the source code in parentheses, sorry).

This part of the function is implemented as follows.

  • The Custom CSS section is converted to a custom.css file and inserted into the head when rendered on the server side.
  • The Head, Header, and Footer sections are dynamically inserted into the corresponding sections by JavaScript during client-side rendering.

This is why you don't see the inserted content in source code mode. In this case, you can see the inserted content in the Elements panel of the developer tools.

However, our implementation is still buggy, the dynamically inserted script will not run. We will fix it as soon as possible.

Thanks for your feedback!

haitaojarvis avatar Dec 20 '22 05:12 haitaojarvis

Ok. Thank you for the explanation.

tmrwltd avatar Dec 20 '22 05:12 tmrwltd

Fixed, please upgrade to v1.0.1

fenbox avatar Dec 24 '22 06:12 fenbox