cancel
Showing results for 
Search instead for 
Did you mean: 

webpages not reflecting changes

webpages not reflecting changes

I'm new to Magento. I'm trying to remove some text from a webpage on a phtml file. I've tried to run these commands below

memory_limit=-1 php bin/magento setup:static-content:deploy

php bin/magento cache:flush

I enabled template hint so I know which file to edit. (/html/vendor/magento/module-customer/view/frontend/templates/account/dashboard)

I haven't been able to see the changes reflected on the webpage. What could I be missing?

Thank you

4 REPLIES 4

Re: webpages not reflecting changes

@kanchi777k3aa3 

It's not preferable to apply changes on Vendor/Magento directly.

 

You need to override the particular file in your theme and flush the cache after applying changes.

 

Refer to the below content and example:

 

Problem solved? Click Kudos and "Accept as Solution".
200+ Magento 2 Extensions for Enhanced Shopping Experience.

Re: webpages not reflecting changes

@Sanjay Jethva 

Thank you

Actually, the file I'm trying to edit has text intended to be a comment but wasn't commented out properly. So when I try to comment that out, the text still displays on the webpage. 

 

For the link you sent, how do you know where the overridden file should be located? For example, if I want to edit a file on var/view_preprocessed/pub/static/vendor/Magento/module_customer where would this go?

Re: webpages not reflecting changes

@kanchi777k3aa3 

var/view_preprocessed/pub/static/vendor/Magento/module_customer
The above file is a cache file.
As the site might be in the production mode, remove the caching file and pass the setup:static-content:deploy command.
 
In the theme, the override should be done like:
app\design\frontend\[ThemeVendor]\[ThemeName]\Magento_Customer\templates 
Problem solved? Click Kudos and "Accept as Solution".
200+ Magento 2 Extensions for Enhanced Shopping Experience.

Re: webpages not reflecting changes

@Sanjay Jethva 

Hi 

I am now trying to make changes to a phtml in 

vendor/magento/module-newsletter/view/frontend/templates. I have made a new directory and placed the new phtml file to the app/design/frontend/Swissup/argento-pure2/Magento_Newsletter/templates. Does this sound correct? I'm unsure of my ThemeVendor and my ThemeName. When I check using template-hints, it still doesn't use the modified version. 

Thank you