0

I've an issue with Magento 2: please Help!

I've added some HTML code in:

Content > Design > Configuration > Theme Edit > HTML Head

The code doesn't work (it's ok, no worries for me, cause the site is running - except for the two lines error in the top header). I'd like to delete that HTML code, but I cannot access to

Content > Design > Configuration > Theme Edit

(I cannot enter the default page view - The wheel keep on rotating but nothing happens). Is there any file I can edit to delete that html code?

2
  • Have you check consol or magento log file? Is there any error? Feb 7, 2017 at 12:36
  • I found this error using chrome console: Uncaught ReferenceError: SERVER is not defined at eval (eval at template (template.js:43), <anonymous>:24:26) at template (template.js:43) at render (template.js:97) at iterate (template.js:174) at Function..each._.forEach (underscore.js:150) at iterate (template.js:176) at Function._.each._.forEach (underscore.js:150) at Object.template (template.js:161) at UiClass.initConfig (class.js:89) at UiClass.initialize (class.js:70) Feb 7, 2017 at 12:53

1 Answer 1

3

Magento will store the content of Content > Design > Configuration > Theme Edit > HTML Head. within core_config_data using the path design/head/includes.

You should be able to edit the database, or create an upgrade script to remove this value for you. Ensure that you remove this in all the store scopes you set it up for.

MySQL would look something like: SELECT * FROM core_config_data WHERE path = 'design/head/includes';

Setup script would look something like:

$this->_resourceConfig->saveConfig(
    'design/head/includes',
    '',
    'default',
    0
);

Where _resourceConfig is a \Magento\Config\Model\ResourceModel\Config

1
  • No problem - if this answers your question, please accept it as the answer :) Feb 7, 2017 at 13:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.