Magento2: custom header.phtml stays cached forever!Calling a function within header.phtmlFirst module HelloWorld in Magento 2.0 doesn't workMagento2 Correct Sequence to flush all Caches/Static filesMagento 2 DevBox Beta CachingMagento 2 - Contact us page returns 404 even though enabled in configurationMagento2: Config value cachedMagento 2.0.15 js strings not translated (Adding… and Added)Debugging a Module in Magento2Product Images are missing in admin panel and front endMagento frontend and backend CSS is not working

Lay out the Carpet

How to write papers efficiently when English isn't my first language?

CREATE opcode: what does it really do?

Term for the "extreme-extension" version of a straw man fallacy?

How long to clear the 'suck zone' of a turbofan after start is initiated?

Why escape if the_content isnt?

How to run a prison with the smallest amount of guards?

Where does the Z80 processor start executing from?

You cannot touch me, but I can touch you, who am I?

How to check is there any negative term in a large list?

How do we know the LHC results are robust?

What is the opposite of 'gravitas'?

Purchasing a ticket for someone else in another country?

How did Arya survive the stabbing?

Escape a backup date in a file name

How does it work when somebody invests in my business?

Pole-zeros of a real-valued causal FIR system

Anatomically Correct Strange Women In Ponds Distributing Swords

Customer Requests (Sometimes) Drive Me Bonkers!

Is there a problem with hiding "forgot password" until it's needed?

How to Reset Passwords on Multiple Websites Easily?

Was Spock the First Vulcan in Starfleet?

Why, precisely, is argon used in neutrino experiments?

Why not increase contact surface when reentering the atmosphere?



Magento2: custom header.phtml stays cached forever!


Calling a function within header.phtmlFirst module HelloWorld in Magento 2.0 doesn't workMagento2 Correct Sequence to flush all Caches/Static filesMagento 2 DevBox Beta CachingMagento 2 - Contact us page returns 404 even though enabled in configurationMagento2: Config value cachedMagento 2.0.15 js strings not translated (Adding… and Added)Debugging a Module in Magento2Product Images are missing in admin panel and front endMagento frontend and backend CSS is not working













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










share|improve this question
























  • 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
















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










share|improve this question
























  • 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














1












1








1


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










share|improve this question
















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







magento2 custom cache header caching






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited yesterday









Shoaib Munir

2,2771828




2,2771828










asked Nov 27 '17 at 12:27









YuriYuri

61




61












  • 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


















  • 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

















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





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





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





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






@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






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











0






active

oldest

votes











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f203357%2fmagento2-custom-header-phtml-stays-cached-forever%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Magento Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f203357%2fmagento2-custom-header-phtml-stays-cached-forever%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Sum ergo cogito? 1 nng

419 nièngy_Soadمي 19bal1.5o_g

Queiggey Chernihivv 9NnOo i Zw X QqKk LpB