I changed vendor/magento/module-customer/view/templates/widget/name.phtml "name validation" when i did this change in localhost and ran set:upgrade its working properly.

But not in cloud.Why?

I think its because of vendor folder which is not updating in cloud.I tried to add custom module also.

有帮助吗?

解决方案

You SHOULD NOT update/change anything in vendor folder if that is template level change then you should copy that file in your theme folder and make necessary changes and then push to your cloud branch / environment.

in order to make above changes copy : module-customer/view/templates/widget/name.phtml file and

paste in :

app/design/frontend/Vendorname/ThemeName/Magento_Customer/templates/widget/name.phtml and make your changes in that file. And push that file to your branch / repo.

其他提示

Vendor is updating via composer.json.

You shouldn't make changes directly in vendor, because source is downloading directly from repositories.
You can make changes directly in local env, bout you wont be able to push it into project repo. I see you made changes in core magento module (really? Its bad bad idea - never do that!).

You should use rewrites in custom module or change *.phtml in custom design Theme.

许可以下: CC-BY-SA归因
scroll top