Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magento 2 :- Number of Lines in a Street Address not setting to default when you checked Use system value in Magento 2.1.7 #13675

Closed
pradeeprcs opened this issue Feb 15, 2018 · 8 comments
Assignees
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@pradeeprcs
Copy link

Preconditions

  1. M 2.1.7

Steps to reproduce

  1. Login to admin and got to Store->configuration->Customer->Customer Configuration-> Name and Address Options
  2. Set Number of Lines in a Street Address to 3 and save
  3. in front end it display 3 street line
  4. Next click on Use system value and save it
  5. Clear cache

Still its show three line for street in address

Expected result

  1. it should display default street no that is two when you unset the value from Use system value

Actual result

  1. it display last saved values instead of default value (i'e 2 )
@magento-engcom-team magento-engcom-team added Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed labels Feb 15, 2018
@magento-engcom-team
Copy link
Contributor

@pradeeprcs, thank you for your report.
We've acknowledged the issue and added to our backlog.

@magento-engcom-team magento-engcom-team added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Feb 15, 2018
@pradeeprcs
Copy link
Author

pradeeprcs commented Feb 16, 2018

i found issue but no idea how to commit so i posting my solution below

in Magento\Customer\Model\Config\Backend\Address\Street replace afterDelete() with below code

     public function afterDelete()
{
    $result = parent::afterDelete();

    if ($this->getScope() == \Magento\Store\Model\ScopeInterface::SCOPE_WEBSITES) {
        $attribute = $this->_eavConfig->getAttribute('customer_address', 'street');
        $website = $this->_storeManager->getWebsite($this->getScopeCode());
        $attribute->setWebsite($website);
        $attribute->load($attribute->getId());
        $attribute->setData('scope_multiline_count', null);
        $attribute->save();
    }else{
		$attribute = $this->_eavConfig->getAttribute('customer_address', 'street');
        $attribute->setData('multiline_count', 2);
        $attribute->save();
	}

    return $result;
}

@willtran
Copy link

I'm working on this #MLAU18

@tomekjordan
Copy link

Confirmed in any other Magento versions 2.2.6, 2.3.0 beta 32

@raulsinapsis
Copy link

I think problem is here vendor/amzn/amazon-pay-module/Setup/UpgradeData.php

    /**
     * @throws LocalizedException
     * @return void
     */
    private function upgradeAddressStreetMultiline(ModuleDataSetupInterface $setup)
    {
        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
        $row = $eavSetup->getAttribute('customer_address', 'street', 'multiline_count');

        if ($row === false || ! is_numeric($row)) {
            throw new LocalizedException(__('Could not find the "multiline_count" config of the "street" ' .
                'Customer address attribute.'));
        }

        if ($row < 3) {
            $eavSetup->updateAttribute('customer_address', 'street', 'multiline_count', 3);
        }
    }

@XxXgeoXxX XxXgeoXxX self-assigned this Jan 23, 2019
@magento-engcom-team
Copy link
Contributor

Hi @XxXgeoXxX. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if your want to validate it one more time, please, go though the following instruction:

  • 1. Add/Edit Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 2. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 3. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 4. If the issue is not relevant or is not reproducible any more, feel free to close it.

@magento-engcom-team
Copy link
Contributor

Hi @pradeeprcs. Thank you for your report.
The issue has been fixed in #20565 by @XxXgeoXxX in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.1 release.

@magento-engcom-team magento-engcom-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Feb 10, 2019
magento-engcom-team added a commit that referenced this issue Feb 10, 2019
…lt when you checked Use system value in Magento 2.1.7 #13675 #20565

 - Merge Pull Request #20565 from XxXgeoXxX/magento2:2.3-develop#13675
 - Merged commits:
   1. f3d410b
magento-engcom-team pushed a commit that referenced this issue Feb 10, 2019
…lt when you checked Use system value in Magento 2.1.7 #13675 #20565
amol2jcommerce pushed a commit to amol2jcommerce/magento2 that referenced this issue Feb 11, 2019
@magento-engcom-team
Copy link
Contributor

Hi @pradeeprcs. Thank you for your report.
The issue has been fixed in #20566 by @XxXgeoXxX in 2.2-develop branch
Related commit(s):

The fix will be available with the upcoming 2.2.9 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

7 participants