Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
LaCollision Posted March 21, 2022 Posted March 21, 2022 (edited) Hi Invision, There is a very problematic bug with Business Address on Commerce 4.6.11. Here is what happens: When Commerce is configured to use a business tax type (for instance "European Union VAT Rates"), then, during registration, the type of address used is /nexus/dev/html/global/form/businessAddress.phtml Then, it is possible to choose a “Consumer” or “Business” address. 1st problem: When choosing the “Business” address type, the field for the company name does not appear when the chosen country is outside the European Union. Thus, an American user who chooses a Business address cannot fill in his company name. This problem comes from the javascript ips.forms.businessAddressVat.js, at line 28: changeRelevantField: function () { if ( this.scope.find('[data-role="addressTypeRadio"][value="business"]').is(':checked') && ['AT','BE','BG','HR','CY','CZ','DK','EE','FI','FR','DE','GR','HU','IE','IT','LV','LT','LU','MT','NL','PL','PT','RO','SK','SI','ES','SE','GB','FX','GP','MQ','RE','BL','GF','MF','NC','PF','PM','TF','YT','WF'].indexOf( this.scope.find('[data-role="countrySelect"]').val() ) !== -1 ) { this.scope.find('[data-role="vatField"]').show(); this.scope.find('[data-role="business"]').show(); } else { this.scope.find('[data-role="vatField"]').hide(); this.scope.find('[data-role="business"]').hide(); } } => The business name is only displayed for UE countries. It should be displayed for all countries. This is the tax field that should be displayed only for EU countries. 2nd problem, much more important: When submitting the form, an error is thrown: “A business name is required”. However, this problem cannot be corrected, because the field for the Company name does not appear: It is therefore impossible to validate the form. This problem comes from the PHP script /nexus/sources/Form/BusinessAddress.php, at line 121: if ( $this->value->business === '' ) { throw new \DomainException('cm_business_name_required'); } An error is thrown, with no condition on the selected country. Therefore, a user with a country outside the UE cannot validate the form, as he has no Business field to fill in. => So, the field for the Company name must therefore be displayed for all countries, and not only for those of the European Union, otherwise the user cannot validate the form. Thank you! Edited March 21, 2022 by LaCollision Sonya* 1
Marc Posted March 21, 2022 Posted March 21, 2022 Thank you for bringing this issue to our attention! I can confirm this should be further reviewed and I have logged an internal bug report for our development team to investigate and address as necessary, in a future maintenance release.
Joachim Sandstrom Posted March 30, 2022 Posted March 30, 2022 On 3/21/2022 at 1:01 PM, LaCollision said: Hi Invision, There is a very problematic bug with Business Address on Commerce 4.6.11. Here is what happens: When Commerce is configured to use a business tax type (for instance "European Union VAT Rates"), then, during registration, the type of address used is /nexus/dev/html/global/form/businessAddress.phtml Then, it is possible to choose a “Consumer” or “Business” address. 1st problem: When choosing the “Business” address type, the field for the company name does not appear when the chosen country is outside the European Union. Thus, an American user who chooses a Business address cannot fill in his company name. This problem comes from the javascript ips.forms.businessAddressVat.js, at line 28: changeRelevantField: function () { if ( this.scope.find('[data-role="addressTypeRadio"][value="business"]').is(':checked') && ['AT','BE','BG','HR','CY','CZ','DK','EE','FI','FR','DE','GR','HU','IE','IT','LV','LT','LU','MT','NL','PL','PT','RO','SK','SI','ES','SE','GB','FX','GP','MQ','RE','BL','GF','MF','NC','PF','PM','TF','YT','WF'].indexOf( this.scope.find('[data-role="countrySelect"]').val() ) !== -1 ) { this.scope.find('[data-role="vatField"]').show(); this.scope.find('[data-role="business"]').show(); } else { this.scope.find('[data-role="vatField"]').hide(); this.scope.find('[data-role="business"]').hide(); } } => The business name is only displayed for UE countries. It should be displayed for all countries. This is the tax field that should be displayed only for EU countries. 2nd problem, much more important: When submitting the form, an error is thrown: “A business name is required”. However, this problem cannot be corrected, because the field for the Company name does not appear: It is therefore impossible to validate the form. This problem comes from the PHP script /nexus/sources/Form/BusinessAddress.php, at line 121: if ( $this->value->business === '' ) { throw new \DomainException('cm_business_name_required'); } An error is thrown, with no condition on the selected country. Therefore, a user with a country outside the UE cannot validate the form, as he has no Business field to fill in. => So, the field for the Company name must therefore be displayed for all countries, and not only for those of the European Union, otherwise the user cannot validate the form. Thank you! We reported the same issue in a support ticket on March 16 2021 (subject "Subscriptions. Business name filed hidden". Misspell excuse hereby submitted :-). We are EU based, and since our target group is global this bug effectively stops us from going live. Underlining this in the ticket we got this swift response a couple of days later: (Quote)Hello, Thank you for bringing this issue to our attention. I have investigated the issue you reported and the problem appears to be a bug in the current release of Invision Community. I have submitted a potential solution for the issue described here and upon review by the development team the fix should be included in an upcoming release of Invision Community. Unfortunately, at this time I am unable to say exactly which release this fix will be included in. We do apologize for the trouble. Thank you again for letting us know, and don't hesitate to let us know if you run into any other problems! -- Daniel Fatkic Invision Community Support (Unquote) LaCollision 1
Daniel F Posted March 30, 2022 Posted March 30, 2022 This is fixed in 4.6.12 which was released as beta yesterday. Joachim Sandstrom, LaCollision and BomAle 2 1
Joachim Sandstrom Posted April 2, 2022 Posted April 2, 2022 Many thanks! Have a nice weekend /Joachim
Solution Marc Posted April 5, 2022 Solution Posted April 5, 2022 This issue has been resolved in 4.6.12, which has just been release. Please let us know if you still have any issues once you have upgraded to that release. SeNioR- and LaCollision 1 1
Recommended Posts