I can't input any code to the Code Injection Blog Header


My Ghost CLI Version is 1.9.9, my OS is Mac OS X 10.13. I can’t input any code into the Code Injection - Blog Header input Box. I logged in my setting account and tried this on both Safari and Chrome but the results are the same. No cursor in the Input Box for me to input codes.


:wave: hiya - please update to the latest version of Ghost first and let us know if you’re still having the same problem


There was this issue talked about here

For me, problems with the header got fixed, but now I can’t type in the footer.


How to “hard” refresh? I just right-clicked on the page and selected the “Refresh” option on Chrome but nothing happened.


I have the same problem, ghost version 2.14.3


If you’re still experiencing errors with code injection loading in 2.14.3 and above, please share screenshots of your devtools/console with us here :slight_smile:


I have this same problem, on 2.14.3. It’s a day-old install on Google Cloud, via the Bitnami stack. This is my first use of Ghost (impressed, by the way), so I did look at all settings, but didn’t modify any code, other than email settings in the config file.

Here is my console:


Uncaught TypeError: Cannot set property ‘modeOption’ of undefined
at new xa (codemirror-31acd692bfeb4255963c758fabc0390c.js:993)
at r._initCodeMirror (ghost.min-b612ac48a0a1aee6b490786be2fe7c9e.js:27)
at e.invoke (vendor.min-d3a312f08af224b8fc1f4397cdd3ec4a.js:1851)
at e.flush (vendor.min-d3a312f08af224b8fc1f4397cdd3ec4a.js:1844)
at e.flush (vendor.min-d3a312f08af224b8fc1f4397cdd3ec4a.js:1855)
at e._end (vendor.min-d3a312f08af224b8fc1f4397cdd3ec4a.js:1902)
at MutationObserver._boundAutorunEnd (vendor.min-d3a312f08af224b8fc1f4397cdd3ec4a.js:1864)

The DOM shows that the head section is missing its textarea:

                    Ghost allows you to inject code into the top and bottom of your theme files without editing them. This allows for quick modifications to insert useful things like tracking codes and meta tags.

                <div class="form-group settings-code">
                    <label for="ghost-head">Site Header</label>
                    <p>Code here will be injected into the <code>{{ghost_head}}</code> tag on every page of the site</p>
                    <div id="ghost-head" class="gh-input settings-code-editor ember-view"><!----></div>

                <div class="form-group settings-code">
                    <label for="ghost-foot">Site Footer</label>
                    <p>Code here will be injected into the <code>{{ghost_foot}}</code> tag on every page of the site</p>
                    <div id="ghost-foot" class="gh-input settings-code-editor ember-view">    <textarea id="ember42" class="gh-cm-editor-textarea ember-text-area gh-input ember-view"></textarea>


Having the same issue here with 2.14.3, I just installed Ghost last night fresh on a DigitalOcean server.


Same problem here!
And my site is in Ghost.org managed hosting. The field that should be there simply is not!

Here is the screenshot:



A fix has landed in master and will be included in next week’s release.


Ghost issue reference


Instead of waiting for next week’s release, is there a workaround to re-enable the field? From the Issue Summary above, I wonder if I could add some dummy code to the site header field (by editing the database) and then load the page successfully for further edits?


You have two options if you can’t wait for the next release:

  1. edit the database to change the null value of the ghost_head and ghost_foot settings to ""
  2. perform a settings save (eg, on the Settings -> General) screen with web inspector open so that the request is captured. You can then use Chrome’s “copy as curl” option on the request and manually replay the save request using "" values for code_injection_head and code_injection_foot settings


Excellent! That worked!

closed #16

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.