Magento 2 Child Theme Static Content?












0















I created a Magento Child Theme under 2.3.0 based on Luma.



I tested in Developer and Default Magento Mode. I expect the custom _theme.less file to be generated on the fly.



But this does not work. I have to run "php bin/magento setup:upgrade" after every single css line change to take the changes affected in front-end.



Also there is a Child Theme based Folder in pub/static folder. Why is this created? Im running default/developer mode so i don't expect the system to create any /pub/static/ files?



I already tried cache:flush and cache:clean.



It workes too when i change modes in magento from dev to production and visaversa.



New Info: I added a new .css File to the Theme and it works like expected. So i think the problem with the _theme.less is about the .less compiling is not working on the fly?










share|improve this question









New contributor




Rimmeh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    0















    I created a Magento Child Theme under 2.3.0 based on Luma.



    I tested in Developer and Default Magento Mode. I expect the custom _theme.less file to be generated on the fly.



    But this does not work. I have to run "php bin/magento setup:upgrade" after every single css line change to take the changes affected in front-end.



    Also there is a Child Theme based Folder in pub/static folder. Why is this created? Im running default/developer mode so i don't expect the system to create any /pub/static/ files?



    I already tried cache:flush and cache:clean.



    It workes too when i change modes in magento from dev to production and visaversa.



    New Info: I added a new .css File to the Theme and it works like expected. So i think the problem with the _theme.less is about the .less compiling is not working on the fly?










    share|improve this question









    New contributor




    Rimmeh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      0












      0








      0








      I created a Magento Child Theme under 2.3.0 based on Luma.



      I tested in Developer and Default Magento Mode. I expect the custom _theme.less file to be generated on the fly.



      But this does not work. I have to run "php bin/magento setup:upgrade" after every single css line change to take the changes affected in front-end.



      Also there is a Child Theme based Folder in pub/static folder. Why is this created? Im running default/developer mode so i don't expect the system to create any /pub/static/ files?



      I already tried cache:flush and cache:clean.



      It workes too when i change modes in magento from dev to production and visaversa.



      New Info: I added a new .css File to the Theme and it works like expected. So i think the problem with the _theme.less is about the .less compiling is not working on the fly?










      share|improve this question









      New contributor




      Rimmeh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I created a Magento Child Theme under 2.3.0 based on Luma.



      I tested in Developer and Default Magento Mode. I expect the custom _theme.less file to be generated on the fly.



      But this does not work. I have to run "php bin/magento setup:upgrade" after every single css line change to take the changes affected in front-end.



      Also there is a Child Theme based Folder in pub/static folder. Why is this created? Im running default/developer mode so i don't expect the system to create any /pub/static/ files?



      I already tried cache:flush and cache:clean.



      It workes too when i change modes in magento from dev to production and visaversa.



      New Info: I added a new .css File to the Theme and it works like expected. So i think the problem with the _theme.less is about the .less compiling is not working on the fly?







      magento2.3.0






      share|improve this question









      New contributor




      Rimmeh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      Rimmeh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited 2 days ago







      Rimmeh













      New contributor




      Rimmeh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked Jan 15 at 14:38









      RimmehRimmeh

      11




      11




      New contributor




      Rimmeh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Rimmeh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Rimmeh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          1 Answer
          1






          active

          oldest

          votes


















          0














          When you run php bin/magento setup:upgrade that will clear the cache for you as a part of the upgrade process, i think that is your issue here, as setup:upgrade has nothing to do with static file in the system.



          Also, no matter what mode you are in, Magento will create a /pub/static/ section as this is where files that are served directly to the browser are stored (as opposed to php files that have additional processing done on the server side). So the site seems (from your description) to be working correctly.



          When you make a change to you custom _theme.less file, if those changes are reflected in the child theme's CSS files in the pub/static folder, then you are good to go, caching is the issue with change not showing up in the browser.






          share|improve this answer
























          • thanks for the reply, i tried to clean magento cache with cache:flush and cache:clean. Then i cleaned my browsercache and tried a differents browser too but still nothing happens. Only setup:upgrade seems to work. Im really confused about this behavior. in /pub/static/frontend/Vendorname/luma_child/de_DE/css/styles-m.css i dont see the changes that i made to /app/design/frontend/Vendorname/luma_child/web/css/source/_theme.less

            – Rimmeh
            2 days ago













          • There are other ways to set up your styles to compile, so i'm not 100% sure about the path you are trying to take. I might then be wrong and setup:upgrade might be doing a deploy. A few questions, is there a reason you are in default mode? and when happened when you just do a php bin/magento setup:static-content:deploy -f?

            – circlesix
            2 days ago













          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
          });


          }
          });






          Rimmeh is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f257882%2fmagento-2-child-theme-static-content%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          When you run php bin/magento setup:upgrade that will clear the cache for you as a part of the upgrade process, i think that is your issue here, as setup:upgrade has nothing to do with static file in the system.



          Also, no matter what mode you are in, Magento will create a /pub/static/ section as this is where files that are served directly to the browser are stored (as opposed to php files that have additional processing done on the server side). So the site seems (from your description) to be working correctly.



          When you make a change to you custom _theme.less file, if those changes are reflected in the child theme's CSS files in the pub/static folder, then you are good to go, caching is the issue with change not showing up in the browser.






          share|improve this answer
























          • thanks for the reply, i tried to clean magento cache with cache:flush and cache:clean. Then i cleaned my browsercache and tried a differents browser too but still nothing happens. Only setup:upgrade seems to work. Im really confused about this behavior. in /pub/static/frontend/Vendorname/luma_child/de_DE/css/styles-m.css i dont see the changes that i made to /app/design/frontend/Vendorname/luma_child/web/css/source/_theme.less

            – Rimmeh
            2 days ago













          • There are other ways to set up your styles to compile, so i'm not 100% sure about the path you are trying to take. I might then be wrong and setup:upgrade might be doing a deploy. A few questions, is there a reason you are in default mode? and when happened when you just do a php bin/magento setup:static-content:deploy -f?

            – circlesix
            2 days ago


















          0














          When you run php bin/magento setup:upgrade that will clear the cache for you as a part of the upgrade process, i think that is your issue here, as setup:upgrade has nothing to do with static file in the system.



          Also, no matter what mode you are in, Magento will create a /pub/static/ section as this is where files that are served directly to the browser are stored (as opposed to php files that have additional processing done on the server side). So the site seems (from your description) to be working correctly.



          When you make a change to you custom _theme.less file, if those changes are reflected in the child theme's CSS files in the pub/static folder, then you are good to go, caching is the issue with change not showing up in the browser.






          share|improve this answer
























          • thanks for the reply, i tried to clean magento cache with cache:flush and cache:clean. Then i cleaned my browsercache and tried a differents browser too but still nothing happens. Only setup:upgrade seems to work. Im really confused about this behavior. in /pub/static/frontend/Vendorname/luma_child/de_DE/css/styles-m.css i dont see the changes that i made to /app/design/frontend/Vendorname/luma_child/web/css/source/_theme.less

            – Rimmeh
            2 days ago













          • There are other ways to set up your styles to compile, so i'm not 100% sure about the path you are trying to take. I might then be wrong and setup:upgrade might be doing a deploy. A few questions, is there a reason you are in default mode? and when happened when you just do a php bin/magento setup:static-content:deploy -f?

            – circlesix
            2 days ago
















          0












          0








          0







          When you run php bin/magento setup:upgrade that will clear the cache for you as a part of the upgrade process, i think that is your issue here, as setup:upgrade has nothing to do with static file in the system.



          Also, no matter what mode you are in, Magento will create a /pub/static/ section as this is where files that are served directly to the browser are stored (as opposed to php files that have additional processing done on the server side). So the site seems (from your description) to be working correctly.



          When you make a change to you custom _theme.less file, if those changes are reflected in the child theme's CSS files in the pub/static folder, then you are good to go, caching is the issue with change not showing up in the browser.






          share|improve this answer













          When you run php bin/magento setup:upgrade that will clear the cache for you as a part of the upgrade process, i think that is your issue here, as setup:upgrade has nothing to do with static file in the system.



          Also, no matter what mode you are in, Magento will create a /pub/static/ section as this is where files that are served directly to the browser are stored (as opposed to php files that have additional processing done on the server side). So the site seems (from your description) to be working correctly.



          When you make a change to you custom _theme.less file, if those changes are reflected in the child theme's CSS files in the pub/static folder, then you are good to go, caching is the issue with change not showing up in the browser.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 15 at 16:36









          circlesixcirclesix

          2,70921546




          2,70921546













          • thanks for the reply, i tried to clean magento cache with cache:flush and cache:clean. Then i cleaned my browsercache and tried a differents browser too but still nothing happens. Only setup:upgrade seems to work. Im really confused about this behavior. in /pub/static/frontend/Vendorname/luma_child/de_DE/css/styles-m.css i dont see the changes that i made to /app/design/frontend/Vendorname/luma_child/web/css/source/_theme.less

            – Rimmeh
            2 days ago













          • There are other ways to set up your styles to compile, so i'm not 100% sure about the path you are trying to take. I might then be wrong and setup:upgrade might be doing a deploy. A few questions, is there a reason you are in default mode? and when happened when you just do a php bin/magento setup:static-content:deploy -f?

            – circlesix
            2 days ago





















          • thanks for the reply, i tried to clean magento cache with cache:flush and cache:clean. Then i cleaned my browsercache and tried a differents browser too but still nothing happens. Only setup:upgrade seems to work. Im really confused about this behavior. in /pub/static/frontend/Vendorname/luma_child/de_DE/css/styles-m.css i dont see the changes that i made to /app/design/frontend/Vendorname/luma_child/web/css/source/_theme.less

            – Rimmeh
            2 days ago













          • There are other ways to set up your styles to compile, so i'm not 100% sure about the path you are trying to take. I might then be wrong and setup:upgrade might be doing a deploy. A few questions, is there a reason you are in default mode? and when happened when you just do a php bin/magento setup:static-content:deploy -f?

            – circlesix
            2 days ago



















          thanks for the reply, i tried to clean magento cache with cache:flush and cache:clean. Then i cleaned my browsercache and tried a differents browser too but still nothing happens. Only setup:upgrade seems to work. Im really confused about this behavior. in /pub/static/frontend/Vendorname/luma_child/de_DE/css/styles-m.css i dont see the changes that i made to /app/design/frontend/Vendorname/luma_child/web/css/source/_theme.less

          – Rimmeh
          2 days ago







          thanks for the reply, i tried to clean magento cache with cache:flush and cache:clean. Then i cleaned my browsercache and tried a differents browser too but still nothing happens. Only setup:upgrade seems to work. Im really confused about this behavior. in /pub/static/frontend/Vendorname/luma_child/de_DE/css/styles-m.css i dont see the changes that i made to /app/design/frontend/Vendorname/luma_child/web/css/source/_theme.less

          – Rimmeh
          2 days ago















          There are other ways to set up your styles to compile, so i'm not 100% sure about the path you are trying to take. I might then be wrong and setup:upgrade might be doing a deploy. A few questions, is there a reason you are in default mode? and when happened when you just do a php bin/magento setup:static-content:deploy -f?

          – circlesix
          2 days ago







          There are other ways to set up your styles to compile, so i'm not 100% sure about the path you are trying to take. I might then be wrong and setup:upgrade might be doing a deploy. A few questions, is there a reason you are in default mode? and when happened when you just do a php bin/magento setup:static-content:deploy -f?

          – circlesix
          2 days ago












          Rimmeh is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          Rimmeh is a new contributor. Be nice, and check out our Code of Conduct.













          Rimmeh is a new contributor. Be nice, and check out our Code of Conduct.












          Rimmeh is a new contributor. Be nice, and check out our Code of Conduct.
















          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%2f257882%2fmagento-2-child-theme-static-content%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

          An IMO inspired problem

          Management

          Investment