cancel
Showing results for 
Search instead for 
Did you mean: 

Magento Own Theme vs Pub/Static issue

Magento Own Theme vs Pub/Static issue

Hello

 

I am creating a theme in 2.1, but I have an issue with files being updated in pub/static/frontend/<my-theme>/en_GB/.

 

Steps:

 

1) Within app/design/frontend/<theme-parent>/<my-theme> I would edit css.

 

2) Refresh website and see old changes in pub/static/frontend/<my-theme>/en_GB/

 

3) Dashboard > Flush Static Files Cache

 

4) The site reverts to my new changes

 

5) Make more changes to app/design/frontend/<theme-parent>/<my-theme>, refresh website and old changes are there.

 

I have:

 

* Developer Mode on in env.php ( 'MAGE_MODE' => 'developer', )

* Dashboard > Configuration > Advanced > Developer > Static Files Settings > Sign Static Files set to 'No'

* Dashboard > System > Cache Management > All Disabled

* Declared theme within dev > tools > grunt > config > theme.js

* STORES > Configuration > ADVANCED > Developer > Frontend Development Workflow > Workflow type > server-side less compilation

 

* STORES > Configuration > ADVANCED > Developer > Frontend Development Workflow > Workflow type > client-side less compilation, then flushed static files cache and got the message that it couldn’t find the static files.

* Add the following to <remove src=”<link-to-pub-static-css”> in  Magento_Theme / layout / default_head_blocks.xml

 

However the issue still persists, I have googled this for a 2 full days an can't really begin the rest of the theme development until I get this issue sorted or I will need to be flushing Static Files Cache constantly.

 

Please help!

2 REPLIES 2

Re: Magento Own Theme vs Pub/Static issue

Anyone?

Re: Magento Own Theme vs Pub/Static issue

@steverobertsweb

 

for checking purpose you can change into pub/static/frontend/<my-theme>/en_GB/

 

After all thing done you need to copy same file into app/design/frontend/<theme-parent>/<my-theme>

 

To see your changes into pub after app/design/frontend/<theme-parent>/<my-theme> changes

you need to do static content deploy.

 

magento setup:static-content:deploy en_GB

 


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer