HTML file changes not reflecting in the browser in Magento - magento2

I would like to edit vendor\magento\module-payment\view\frontend\web\template\payment\cc-form.html and related JS files from where cc-form.html is calling.
My changes not reflecting on browser when I edit cc-form.html file.
It's working fine in localhost and also changes reflcting. Just have an issue with my online store. Also need help to find the JS from where cc-form.html is calling.
I already tried these things:
php bin/magento setup:upgrade
rm -rf var/cache/*
rm -rf var/page_cache/*
rm -rf var/generation/*
php bin/magento setup:static-content:deploy
Clearing browser cache. etc

you need to cleat the static content that is into pub/static folder
for this run following command
rm -rf pub/static/frontend/ pub/static/adminhtml/ pub/static/_requirejs/
than after you need to deploy the files using following command
php bin/magento setup:static-content:deploy
now your updated files are deployed into pub/static folder.
now clean cache and try Browsing your website
php bin/magento cache:clean

Try to just clean the cache using the below command:
php bin/magento cache:clean

Related

Strange issue where we are facing infinite loading for a few customer when we edit them in backend in magento2

Can you please help us to solve a issue in magento2.3.x where when we edit a few customers in backend everything stuck in a loop and server goes down.
Run command line:
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
bin/magento indexer:reindex
php bin/magento cache:flush

Shopware 6 CI and Post Deploy

I am trying to set up continuous integration for a Shopware 6 store via Github Actions. Once the code is on the server, I am running the following commands in order to complete the deploy. Unfortunately, I can't seem to find a good tutorial or article on the post deploy steps necessary.
Which folders need write permissions?
Which console commands need to fire? Which ones are optional? (cache:clear theme:compile and so on?
Which npm commands are mandatory?
what's the config/jwt folder with its certificates and what certificates go in there?
Are there additional commands needed to get DB Migrations running?
sudo php bin/console cache:clear
sudo php bin/console dal:refresh:index
sudo php bin/console theme:compile
sudo rm -rf var/cache
sudo /usr/bin/npm clean-install --prefix vendor/shopware/administration/Resources
sudo /usr/bin/npm run --prefix vendor/shopware/administration/Resources lerna -- bootstrap
sudo /usr/bin/npm clean-install --prefix vendor/shopware/storefront/Resources/app/storefront /
sudo /usr/bin/node vendor/shopware/storefront/Resources/app/storefront/copy-to-vendor.js
sudo php bin/console bundle:dump
sudo sh bin/build-js.sh
PROJECT_ROOT=/var/www/path-to-shopware/ sudo /usr/bin/npm --prefix vendor/shopware/storefront/Resources/app/storefront/ run production
It would be great to learn how others deploy SW6 and to compare this to what others need to do, once the Shopware 6 code is on the server. What tools do you use? Ansible or any other tools. Although this mostly works, I cannot use updates due to an error coming from the API.

Webtatic PHP7.1 is missing

After installing PHP7.1 using this on CentOS7
https://webtatic.com/packages/php71/
Running
php -v
Results in
-bash: php: command not found
The install worked but PHP is not there - have I missed a step?
Since you have installed php from webtatic, you'll need to install the cli SAPI.
To do that you need to run:
sudo yum install php71w-cli
After the installation, try running the below to see if it works:
php --version
https://webtatic.com/packages/php71/
Contained in the php71w-cli package, this SAPI allows running scripts from the command-line, and also has a built-in web server for development-use. Located at /usr/bin/php
I had similar issues on my computer. For me the command was just renamed to php7 or php71. So if have the same issue please create a symlink.
Find out where your php7 file is residing
$ which php7
/usr/bin/php7
Symlink this file
sudo ln -s /usr/bin/php7 /usr/bin/php
Test that this is working
php -v
Your problem should be solved. Only case might be that you need to change newly created file as executable or change the owner/group.
Please let me know if this was helpful.

Missing css, js files after Magento 2 install

I try to install Magento 2 and I have a problem with css and js loading (they are missing). There are a lot of topics about this problem and it seems that the last step of the solution is to run php bin/magento setup:static-content:deploy command (rebuild the static content).
Ok, but how? I have no access to the terminal at my host (actually I don't know too much about it, I just use Magento as an average user). Is there a way to run this command inside Magento? What are the steps to run it? The installation is in a sub directory not in site root.
There is no way to deploy static-content from within the frontend or admin of Magento 2.
At the least, your hosting company should be able to run this command for you.
Need SSH credentials & access to your server
Login to server using SSH via terminal, putty, etc.
Navigate to Magento 2 root install directory using CLI
Run this command:
_
php bin/magento setup:static-content:deploy
No, you don't have any other options for deploying content from the admin. You need to deploy static content from the Magento root directory only then you will be able to see CSS and js.
Open your Magento 2 root directory and run the below commands:
For Windows users-
php bin/magento setup:static-content:deploy
For linux users-
/opt/lampp/bin/php bin/magento setup:static-content:deploy
Another method is using ssh. For that, you need to login to Cpanel. Through command prompt login to the server using ssh credentials. Then navigate through Magento 2 root directory and run the same commands as given above.

Magento refuses to upgrade 1.4.2.0 ===> 1.5.0.1

This is my first time using Magento. I upgraded this site from 1.4.1.1 to 1.4.2.0 without issue. Now trying to go to 1.5.0.1 it just seems to refuse at every turn. I tried by entering this key into Magento Connect:
magento-core/Mage_All_Latest
And it says this:
Ignoring installed package magento-core/Mage_All_Latest
Nothing to install
I tried to upgrade via SSH and got this:
Attempting to discover channel "magento-core"...
unknown channel "magento-core" in "magento-core/Mage_All_Latest"
invalid package name/package file "magento-core/Mage_All_Latest"
Cannot initialize 'magento-core/Mage_All_Latest', invalid or missing package file
Package "magento-core/Mage_All_Latest" is not valid
install failed
In the downloader I noticed a the downloader had a version 1.5.0.0 upgrade available. I thought maybe I needed the newest downloader before I could update all the packages. I upgraded just the downloader to 1.5.0.0 which worked. Then I tried the full upgrade again and now it is mega retarded with this:
Couldn't resolve host 'magento-core'
That’s cute isn't it? So I gave it once last whirl at the ssh console and i get this bad boy:
Attempting to discover channel "magento-core"...
Attempting fallback to https instead of http on channel "magento-core"...
unknown channel "magento-core" in "magento-core/Mage_All_Latest"
invalid package name/package file "magento-core/Mage_All_Latest"
install failed
I tried a forcing it via SSH but still no love. I reverted from a backup I made so I do not have downloader 1.5.0.0 any more. Now of course I am back to square one with it telling me there is nothing to install when I try to update via MC.
When I check in MC if there are any updates available it lists these two:
Mage_All_Latest Upgrade to 1.4.2.1 (stable) Metapackage for latest Magento 1.4 release
And the Mage Downloader 1.5.0.1 but I already installed these before and it did no good so I restored my backup before the failed update.
I was trying to ask this question Magento's Forums but they are a mess right now. Their captcha fails and threads close on their own so you get little to no help. I wouldn't be surprised if they did this on purpose in concert with their 1.5.0.1 release.
Go to the root of your website and execute these commands (Where index.php is):
wget http://www.magentocommerce.com/downloads/assets/1.5.0.1/magento-1.5.0.1.tar.gz
tar -zxvf magento-1.5.0.1.tar.gz
Skip the next 4 commands if you have your magento install in a folder called Magento:
cd magento
cp -rf * /home/bitscom/public_html
cd ../
rm -rf magento
rm magento-1.5.0.1.tar.gz
For a detailed explanation see my post on the offical magento forum: here My name is Veracious on there.
If your SSH account is anything other than your apache user (i.e.: root. you will get error 500 when trying to access the site do the the permissions on the new files you just extracted. To resolve that use chown and chgrp. For a detailed explanation once again see my post:
here
I think the location for the upgrades have changed. Instead of the:
magento-core/Mage_All_Latest
use:
community/Mage_All_Latest
As what mrdon has mentioned.
I couldn't upgrade through Magento Connect either. I followed these instructions for installing magento and it worked fairly well. I changed line 3 as below to copy the folders/files over my existing ones.
wget http://www.magentocommerce.com/downloads/assets/1.5.0.1/magento-1.5.0.1.tar.gz
tar -zxvf magento-1.5.0.1.tar.gz
cp magento/* magento/.htaccess .
chmod -R o+w media var
chmod o+w app/etc
I followed the instructions from the following post to upgrade from 1.4.1.1 to 1.5.0.1:
http://www.magentocommerce.com/boards/viewthread/219720/#t301761
Then flushed the cache and reindexed everything. Everything worked.
Don't forget to change magento folder ownership to your web server user. In my case I had to run
chown -R www-data:www-data /var/www/magento