1

I have a child theme, and uploaded a custom header: header.phtml. Right after I uploaded, it showed it correctly in the front-end.

However, changing something in this custom header, never reflects in the front-end. It ALWAYS shows the first version I uploaded. Once I remove the custom file, it falls back to the parent. But if i upload again (a new version): the old version is back!

I tried various ways of cleaning cache:

  1. Manually empty folders (var/* pub/static/*)

  2. php bin/magento cache:clean + php bin/magento indexer:reindex

  3. In the admin itself (flush static files, and all other cache)

Note: Magento is in developers version, and I am using v2.1.9).

I wasted like 6 hours trying everything!

Hope someone can help me out there.

Thanks

7
  • Also, I disabled all cache, so I am surprised it shows the same thing over and over again. Also emptied browser cache! But was not expecting that to help. – Yuri Nov 27 '17 at 12:33
  • do you have tried try php bin/magento setup:static-content:deploy – Ashish Raj Nov 27 '17 at 12:36
  • Doing it now. Takes a while. But I cannot imagine I have to do this everytime I made changes to a file. Let you know in a bit or it worked. – Yuri Nov 27 '17 at 12:44
  • @ashish Nope. Didn't work. – Yuri Nov 27 '17 at 12:57
  • Ah, sure. Basically what I did, I copied the default header.phtml to the child template and then add a string to the hello message for testing purpose: $welcomeMessage = $block->getWelcome() . "TEST"; When loading the front, it shows the TEST nicely, as expected. So I removed the TEST and made my changes. But whatever I change, it always shows the TEST, and none of the changes I made. – Yuri Nov 27 '17 at 16:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.