Some JS files are direct children of web rather than web/js. This does not follow instructions from the dev docs thus is confusing.
Place the custom component source file in one of the following locations:
Your theme JS files: /web/js or /_/web/js
Your module view JS files:/view/frontend/web/js
There are more instances of this:
vendor/magento/module-payment/view/frontend/web/transparent.jsvendor/magento/module-payment/view/frontend/web/cc-type.jsvendor/magento/module-search/view/frontend/web/form-mini.jsvendor/magento/module-sales/view/frontend/web/gift-message.jsThere are more but I'm pushed for time at the minute.
captcha.js and onepage.js is located.web/js as per the dev docs.web, this is inconsistent with the dev docs.This is confusing as the dev docs instructs developers to use certain locations yet the core does not follow this, either the files should be relocated to be inside web/js or the dev docs should be updated. Unless there is a valid reason why the files are outside web/js?
Hi @BenSpace48. Thank you for your report.
To help us process this issue please make sure that you provided the following information:
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
@magento-engcom-team give me {$VERSION} instance
where {$VERSION} is version tags (starting with 2.2.0+) or develop branches (2.2-develop +).
For more details, please, review the Magento Contributor Assistant documentation
@BenSpace48, thank you for your report.
We've acknowledged the issue and added to our backlog.
Hi @BenSpace48
Do you need below files in web/js folder and captcha.js and onepage.js ?
vendor/magento/module-payment/view/frontend/web/transparent.jsvendor/magento/module-payment/view/frontend/web/cc-type.jsvendor/magento/module-search/view/frontend/web/form-mini.jsvendor/magento/module-sales/view/frontend/web/gift-message.jsHi @hitesh-wagento
Yeah for consistency with the dev docs and other files, and general best practices.
I think there are more files than the ones I've listed, they were just the first few I discovered whilst looking into it.
Ok Thanks @BenSpace48
I am working on this PR
Hi @BenSpace48. Thank you for your report.
The issue has been fixed in magento/magento2#16582 by @hitesh-wagento in 2.2-develop branch
Related commit(s):
The fix will be available with the upcoming 2.2.7 release.
@magento-engcom-team give me 2.2.5 instance
Hi @BenSpace48. Thank you for your request. I'm working on Magento 2.2.5 instance for you
Hi @BenSpace48, here is your Magento instance.
Admin access: https://i-16302-2-2-5.engcom.dev.magento.com/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.
Hi @BenSpace48. Thank you for your report.
The issue has been fixed in magento/magento2#16708 by @hitesh-wagento in 2.3-develop branch
Related commit(s):
The fix will be available with the upcoming 2.3.0 release.
Hi @BenSpace48. Thank you for your report.
The issue has been fixed in magento/magento2#19583 by @rbayet in 2.3-develop branch
Related commit(s):
The fix will be available with the upcoming 2.3.1 release.