Magento2: Address Information not showing

Created on 28 Jul 2016  Â·  70Comments  Â·  Source: magento/magento2

Preconditions

Magento 2.1

Steps to reproduce

In the admin panel go to Sales --> Orders --> select an order

Expected result

In both the Billing Address and Shipping Address I expect to see the address details of the customer. However the actual result is:

Address Information
Billing Address

{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}{{depend firstname}}
{{/depend}} {{depend company}}{{var company}}
{{/depend}} {{if street1}}{{var street1}}
{{/if}} {{depend street2}}{{var street2}}
{{/depend}} {{depend street3}}{{var street3}}
{{/depend}} {{depend street4}}{{var street4}}
{{/depend}} {{if city}}{{var city}}, {{/if}}{{if region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if}}
{{var country}}
{{depend telephone}}T: {{var telephone}}{{/depend}} {{depend fax}}
F: {{var fax}}{{/depend}} {{depend vat_id}}
VAT: {{var vat_id}}{{/depend}}

I'm looking forward to a solution, Thanks,

Sales Clear Description Format is valid bug report

Most helpful comment

I am not able to understand why there is no fix inside the 2.2.2 version yet. This is a major bug. Please help us to resolve this.

All 70 comments

@ComputerNorth
Thanks for reporting!

Try to clear browser cache or open this page in another browser.
If this does not help, add a screenshot of the page with the open console.

magento-scr

It happens in FireFox, IE and Chrome, clear browser cache doesn't help

Pump. Need urgent fix for it.

@gahehe
Do you have such view for all orders?
Have you tried to change data in order?
Please add screenshot with opened dev console, it's can consists some js errors.

Hi @andimov,

This is not only in order view, but also everywhere that displayed the customer address by template and calling the \Magento\Customer\Block\Address\Book::getAddressHtml() method.
For example, in the Customer Address Book:
untitled

Tried to var_dump what this function returned, and it returned this also. I don't think it is JS issue.

Looks like it relates to
https://github.com/magento/magento2/issues/4936

@ComputerNorth @gahehe
Did you migrate from a previous version?

Yes I did migrate from magento 1.8.1

OK Found the solution.

@ComputerNorth, please check your database, the eav_entity_type table. The entity code "customer_address" must have id as 2, because in the \Magento\Customer\Api\AddressMetadataInterface, the id of "customer_address" type was fixed to 2 (the ATTRIBUTE_SET_ID_ADDRESS const). In my case, the "customer_address" entry, somehow changed ID to 4 (it's weird, because the fresh eav_entity_type has the ID column increment as 1,2,3..., but mine 2,4,6,8...). So I need to rewrite the function to use 4 instead of 2 as id, then everything came back to normal.

Thank you, but unfortunately for me this is not a solution. My eav_entity_type has the ID column increment as 1,2,3 and entity type id =2 for the entity type code "customer_address".

I can confirm this issue! Happens after I have upgraded from 1.7.0.2 to 2.1.0. Any solutions so far?

In my case, @gahehe point was almost there, but I figured it out after reviewing the thread, since it was a bit different.

The migration tool added a couple of rows to the end of eav_attribute_set table (didn't mess up increment ids as it was in his case). So for example, I see a row added:

+------------------+----------------+--------------------+------------+
| attribute_set_id | entity_type_id | attribute_set_name | sort_order |
+------------------+----------------+--------------------+------------+
| 41 | 2 | Default | 2 |
+------------------+----------------+--------------------+------------+

41 is used to reference customer address attribute set in some of the other tables. So the solution comes down to changing Magento\Customer\Api\AddressMetadataInterface::ATTRIBUTE_SET_ID_ADDRESS to 41 in my case.

I am pretty sure this is going to be fixed in some of the next releases of the tool, but until then - hopefully this will be helpful to someone.

Thanks milanstojanov. For me the default attribute is:

+------------------+----------------+--------------------+------------+
| attribute_set_id | entity_type_id | attribute_set_name | sort_order |
+------------------+----------------+--------------------+------------+
| 4 | 4 | Default | 1 |
+------------------+----------------+--------------------+------------+
So I changed Magento\Customer\Api\AddressMetadataInterface::ATTRIBUTE_SET_ID_ADDRESS to 4. Unfortunately it didn't solve the issue.

Please check the table again. I am pretty sure you will find a record at the very bottom that has entity_type_id = 2. That one needs to be changed, not the top one. :)

I as well have this same issue, and the entity_type_id = 2 in the Eav Entity Type table. and I also upgraded from 1.9.2.2 to 2.1.0

Hello,
i'v installed Magento 2.0.1 and upgraded to 2.1.2 and wondered why instead address is shown the template format variables {{}}.... an the problem is the "auto_increment_increment=5" (percona mysql cluster) is set to internal 5, so it increments 5,10,15,20,25...
So my question is what can i do, changing Hard-Coded IDs in Magento? What about when i update Magento, must remember to change this every time, not a good Idea?

Which changes do i need to make in the database in which tables to assign the Hard-Coded IDs of Magento

Thats a big Problem

I am facing the same issue in Magento 2.1.6
Let me know if any one has a better solution.
Thanks

i follow as well..

I really struggle with this. i try to change it 3 times and the customer address still not give me the correct values.

When i try to edit it - i can see the corrcet values inside

If can anyone give a good solution please let me know .

i did migrate from previous version of M 1.9.2.3 to M 2.1.6

julietolivertest.a2hosted.com ->this is the site

2017-05-24_12-35-16
2017-05-24_12-38-34
2017-05-24_12-37-09

Due to some upgrade issues from 2.0.7 to 2.1.6 related to custom attributes I merged all the Migration_Default sets to the standard sets with attribute_set_name="Default".
attribute_set_id 1 to 9 (Migration_Default) don't exist any more in my DB. Instead it's 10 to 17 (Default).

I'm not really happy about having to overwrite the ATTRIBUTE_SET_ID_ADDRESS within /vendor/magento/module-customer/Api/AddressMetadataInterface.php to "11".
Please find a possibility without hardcoding this value. Otherwise I will struggle again on every update.

I tried to clean up the eav_attribute_set table. Due to migration I had duplicate IDs for each entity_type_id. I just wanted to have attribute_set_id from 1 to 8 for entity_type_id 1 to 8.
I thought changing the foreign values at eav_attribute_group to the corresponding 1->8 values would do the trick to delete the duplicate set IDs, but It seems, that this change would put up the same issue again, which I already could resolve within AddressMetadataInterface.php.

Which tables/rows or files? do I have to change in order to have a clean eav structure with only one Default set per eav_type?

Same Issue in the Magento ver. 2.2.0-dev

Hello
please help i have migrated site in 1.9 to 2.1.7 but address information not showing the backend & frontend so only the address template.
like this

{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}{{depend firstname}}
{{/depend}}
{{depend company}}{{var company}}
{{/depend}}
{{if street1}}{{var street1}}
{{/if}}
{{depend street2}}{{var street2}}
{{/depend}}
{{depend street3}}{{var street3}}
{{/depend}}
{{depend street4}}{{var street4}}
{{/depend}}
{{if city}}{{var city}}, {{/if}}{{if region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if}}

{{var country}}

{{depend telephone}}T: {{var telephone}}{{/depend}}
{{depend fax}}
F: {{var fax}}{{/depend}}
{{depend vat_id}}
VAT: {{var vat_id}}{{/depend}}

If any solution so please

This issue persists in 2.2.1 for billing address for virtual products being paid for by PayPal Standard

{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}{{depend firstname}}
{{/depend}} {{depend company}}{{var company}}
{{/depend}} {{if street1}}{{var street1}}
{{/if}} {{depend street2}}{{var street2}}
{{/depend}} {{depend street3}}{{var street3}}
{{/depend}} {{depend street4}}{{var street4}}
{{/depend}} {{if city}}{{var city}}, {{/if}}{{if region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if}}
{{var country}}
{{depend telephone}}T: {{var telephone}}{{/depend}} {{depend fax}}
F: {{var fax}}{{/depend}} {{depend vat_id}}
VAT: {{var vat_id}}{{/depend}}

Same as @eCommerceGorilla for me. Bug appears on 2.2.1 with virtual products and paypal payment.

I can confirm that the issue appears in the Magento ver. 2.2.0-dev too.

Hi @ComputerNorth we can not reproduce the issue on clean magento instance. Please, report the issue to the https://github.com/magento/data-migration-tool repository is there is an issue in the tool.

@magento-engcom-team I don't think is related to the migration tool. We have the same issue on a clean 2.2 installation.

I confirm -> This issue persists in 2.2.1 for billing address for virtual products being paid for by PayPal Standard

We have just upgraded website from 2.1.x to 2.2.0. We don't have website that was migrated from Magento 1.x version. So its not related to Migration.

billing-address-issue

Please suggest some solution for the same asap.

Also have this issue on PayPal orders having upgraded to 2.2.1 from 2.2.0 (previously 2.1.9, 2.1.8, etc. keeping up with releases but never migrated from Magento 1.x). We have the issue with Downloadable products. All customer billing and shipping address missing from database.

This is the third major issue with PayPal I've had to report since 2.2... quite disconcerting, wondering how much regression testing is actually happening before these releases.

This is actually very easy to replicate with a clean Magento.

  • install Magento 2.2.0 with sample data (or 2.2.1, but I happened to try with 2.2.0)
  • add sandbox paypal credentials in the admin panel
  • purchase product ID 51 (downloadable) using PayPal Express
  • note that the order has no billing or shipping address data saved

Please re-open @magento-engcom-team as it's quite a major issue.

Sorry for the multiple posts, but I've been doing a bit of debugging of this, and I'm not actually sure its a bug per se. The fact that the billing address appears as {{depend prefix}}{{var prefix}} is a symptom of the issue for Magento to resolve, however the actual issue is perhaps that PayPal does not require, nor does it request, a billing address to complete an order.

The shipping and billing addresses associated to the quote are both empty during checkout with PayPal express, and you will notice that with other payment methods such as CheckMo you are asked for your billing address on the payment step, however with PayPal you are not asked any billing information. For virtual orders there is also no requirement for a shipping address, so neither are captured.

It's a bit annoying as we are left with a situation where we have zero address information about a customer for invoicing purposes, but perhaps this is by design... perhaps @magento-engcom-team team could comment on that?

Opened a new ticket https://github.com/magento/magento2/issues/12707 to try and get an answer, since this one is closed and likely being ignored.

(commenting here and as well as in https://github.com/magento/magento2/issues/12707, as I do not know which will get closed.)

I am seeing this issue as well. I believe that it is by design, as it appears that when the product is Virtual, Magento does not capture any address information (because there is no product to ship).

Superficially this seems like a good idea, but as @josephmcdermott pointed out, this leaves us in a situation where we have no address information for billing / invoicing purposes.

Still seeing this issue.

Using magento 2.2.2 CE
Once a customer Checkouts even if the customer is registered or not.

How to recreate. Freshly install magento 2.2.2

  1. Add Test Product
  2. Configure Paypal Express checkout.
  3. Checkout via paypal express
  4. Finish the process.
  5. Check the Order of the Customer in the admin Panel.

image

I am not able to understand why there is no fix inside the 2.2.2 version yet. This is a major bug. Please help us to resolve this.

Indeed! It's really weird!

Just ran into this on a migrated store (from 1.9.x) but glad to see it's even non-migrated ones. It's for any PayPal transaction for me - not virtual products as the client doesn't sell them. Only physical good that are shipped.

If anyone sees a solution, please drop it in here! My search continues.

Any update on this issue. I dont believe that no one is reacting on this #5873 and #13149 two tickets. We are really say that its very big issue that stop merchant from using Magento 2.2.2. So please if possible give us some update on the same.

Otherwise how we can convince our client to use Magento 2.

Please help!

Seems to me that this bug is not important for Magento!

Hi Guy's

Have you resolved this issue, I am badly stuck also... please let me know solution ??

Hello

This issue has been fixed in latest release 2.2.4.
I confirmed in my website today.

Thanks to Magento Team.

Hi @magewallet how did Magento solved this issue?

@shinesoftware
I dont know how they resolve it. But once we have upgrade to 2.1.4. Its resolved.

I had the same issue on 2.3 but not related to the migration
here is the solution which worked for me for anyone still having this issue on 2.3
replace this file /vendor/magento/module-paypal/Model/Express/Checkout.php
with latest of magento version 2.2.4

the update is in this function
_setExportedAddressData

and as its a bug in core file you're fine to replace the core file

I am facing the same issue in Magento 2.2.5
Let me know if any one has a better solution.
Thanks

Billing Address Edit
{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}{{depend firstname}}
{{/depend}} {{depend company}}{{var company}}
{{/depend}} {{if street1}}{{var street1}}
{{/if}} {{depend street2}}{{var street2}}
{{/depend}} {{depend street3}}{{var street3}}
{{/depend}} {{depend street4}}{{var street4}}
{{/depend}} {{if city}}{{var city}}, {{/if}}{{if region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if}}
{{var country}}
{{depend telephone}}T: {{var telephone}}{{/depend}} {{depend fax}}
F: {{var fax}}{{/depend}} {{depend vat_id}}
VAT: {{var vat_id}}{{/depend}}
Shipping Address Edit
{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}{{depend firstname}}
{{/depend}} {{depend company}}{{var company}}
{{/depend}} {{if street1}}{{var street1}}
{{/if}} {{depend street2}}{{var street2}}
{{/depend}} {{depend street3}}{{var street3}}
{{/depend}} {{depend street4}}{{var street4}}
{{/depend}} {{if city}}{{var city}}, {{/if}}{{if region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if}}
{{var country}}
{{depend telephone}}T: {{var telephone}}{{/depend}} {{depend fax}}
F: {{var fax}}{{/depend}} {{depend vat_id}}
VAT: {{var vat_id}}{{/depend}}

Hi Guy's

Have you resolved this issue, I am badly stuck also... please let me know solution ??

I had the same issue on 2.2.5..
Here is the solution which worked for me for anyone still having this issue on 2.2.5
replace this file vendor\magento\module-sales\Model\Order\Address\Renderer.php
with latest of magento version 2.2.5

` /**

  • Copyright © Magento, Inc. All rights reserved.
  • See COPYING.txt for license details.
    */

namespace Magento\Sales\Model\Order\Address;

use Magento\Framework\Event\ManagerInterface as EventManager;
use Magento\Framework\Filter\FilterManager;
use Magento\Framework\DataObject;

/**

  • Class Renderer used for formatting a store address
    */
    class Renderer
    {
    const DEFAULT_TEMPLATE = "{{var firstname}}".
    "{{depend middlename}}{{var middlename}}{{/depend}}".
    "{{var lastname}}\n".
    "{{var company}}\n".
    "{{var street}}\n".
    "{{var city}}\n".
    "{{var region}}\n".
    "{{var postcode}}\n".
    "{{var telephone}}\n".
    "{{var country_id}}\n";
/**
 * @var EventManager
 */
protected $eventManager;

/**
 * @var FilterManager
 */
protected $filterManager;

/**
 * @var string
 */
private $template;

/**
 * Constructor
 *
 * @param EventManager $eventManager
 * @param FilterManager $filterManager
 * @param string $template
 */
public function __construct(
    EventManager $eventManager,
    FilterManager $filterManager,
    $template = self::DEFAULT_TEMPLATE
) {
    $this->eventManager = $eventManager;
    $this->filterManager = $filterManager;
    $this->template = $template;
}

/**
 * Format address in a specific way
 *
 * @param DataObject $storeInfo
 * @param string $type
 * @return string
 */
public function format(DataObject $storeInfo, $type = 'html')
{
    $this->eventManager->dispatch('store_address_format', ['type' => $type, 'store_info' => $storeInfo]);
    $address = $this->filterManager->template(
        $this->template,
        ['variables' => $storeInfo->getData()]
    );

    if ($type == 'html') {
        $address = nl2br($address);
    }
    return $address;
}

}
`

Kindly plz check ur database....default store view in store table from database..default= 0,english =1,

Your problem will be solve...

Kindly plz check ur database....default store view in store table from database..default= 0,english =1,

Your problem will be solve...

Thanks a lot Ziau1..this solution is working for me....

@ziaur1 & @nowsathyasar can you please provide more details on what solution it is as its difficult to understand by your comments above.

@nowsathyasar I just replaced your renderer.php code with Magento code which resolved the issue on order page, but on the customer view (both backend and frontend) it has the same issue which simply displays the template. Also wondering why we should make the customization on the core code?

Further Details:
I got this issue after upgrading from 2.1.x to 2.3.1 version

Hi, My recent upgrade is 2.3.1 as magento moves we are upgrading one by one, But we are having an issue which is on Paypal orders we are getting variable prefixes in billing address as email template format. Is there any fix to relates t its.

I tried all above solutions who got fixed, In database also I checked it is perfect. But why it is not fixed yet. We didn't touched anything in code.

Please help me to get a best solution for this.

13

I am also facing same issue after upgrading magento to 2.3.1.

Anyone found solution for this?

I followed some solutions in git which they commented but no luck. I will
update if I got any solution for this issue. If you know please let me know.
Thanks & Regards
jd prasad

On Fri, Jun 21, 2019 at 8:40 PM goutamfulcrum notifications@github.com
wrote:

I am also facing same issue after upgrading magento to 2.3.1.

Anyone found solution for this?

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/magento/magento2/issues/5873?email_source=notifications&email_token=AFSXCEK5D2QUI3DCWV4JAJDP3TVPRA5CNFSM4CK5AAF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYIXOFQ#issuecomment-504461078,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFSXCEOKTKVE4AXERUICBE3P3TVPRANCNFSM4CK5AAFQ
.

--
VJD Prasad
Director | Team Lead

102, Siri Sampada Hitex Building

Kavuri Hills, Madhapur, Hyd - 33
Contact No.: +91 9160310256
Facebook: www.facebook.com/jdprasadv | Linkedin: www.linkedin.com/jdprasadv

` /**

  • Copyright © Magento, Inc. All rights reserved.
  • See COPYING.txt for license details.
    */

namespace Magento\Sales\Model\Order\Address;

use Magento\Framework\Event\ManagerInterface as EventManager;
use Magento\Framework\Filter\FilterManager;
use Magento\Framework\DataObject;

/**

  • Class Renderer used for formatting a store address
    /
    class Renderer
    {
    const DEFAULT_TEMPLATE = "{{var firstname}}".
    "{{depend middlename}}{{var middlename}}{{/depend}}".
    "{{var lastname}}\n".
    "{{var company}}\n".
    "{{var street}}\n".
    "{{var city}}\n".
    "{{var region}}\n".
    "{{var postcode}}\n".
    "{{var telephone}}\n".
    "{{var country_id}}\n";
    /
    *

    • @var EventManager
      */
      protected $eventManager;

    /**

    • @var FilterManager
      */
      protected $filterManager;

    /**

    • @var string
      */
      private $template;

    /**

    • Constructor

    • @param EventManager $eventManager

    • @param FilterManager $filterManager
    • @param string $template
      */
      public function __construct(
      EventManager $eventManager,
      FilterManager $filterManager,
      $template = self::DEFAULT_TEMPLATE
      ) {
      $this->eventManager = $eventManager;
      $this->filterManager = $filterManager;
      $this->template = $template;
      }

    /**

    • Format address in a specific way

    • @param DataObject $storeInfo

    • @param string $type
    • @return string
      */
      public function format(DataObject $storeInfo, $type = 'html')
      {
      $this->eventManager->dispatch('store_address_format', ['type' => $type, 'store_info' => $storeInfo]);
      $address = $this->filterManager->template(
      $this->template,
      ['variables' => $storeInfo->getData()]
      );
      if ($type == 'html') {
      $address = nl2br($address);
      }
      return $address;
      }
      }
      `

This render code file is for frontend, we are having an issue in backend admin side on sales->orders ->order details -> billing address. ( Billing address is showing in incorrect format like prefix variables with curly braces etc...!

Any luck to anyone on this so far?

We have this issue in 2.3.2
Its for all orders and seems unrelated to paypal.

In Magento Default address ATTRIBUTE_SET_ID_ADDRESS is set to '2' (and this attribute set has default group id 2, that can be found in table) in class Magento\Customer\Api\AddressMetadataInterface;

While sometimes when we do use migration tool, it auto creates some bizarre attribute set and group with attribute set name 'Migration_Default', attribute group name 'Migration_General'.

So we have to do 2 things:

  1. Remove migration attribute set and group information from tables so that we can update the original one to id 2 and group id 2
  2. Add customer_address attributes to eav_entity_attribute table so that AttributeMeta class could use these attributes to parse address data.

Step 1. Remove migration attribute set and group information from tables so that we can update the original one to id 2 and group id 2

So you may need to find out what is your new default customer_address attribute set id and attribute_group_id ?

Use this to find new attribute set id.

select * from eav_attribute_set as eas inner join eav_attribute_group as eag on eag.attribute_set_id=eas.attribute_set_id where eas.entity_type_id=2 and eas.attribute_set_name='Default';

If you find a new id which is not '2'. Then you need to fix this because magento does have hard coded ATTRIBUTE_SET_ID_ADDRESS =2 and this is being used to run setup script in CustomerSetup.php.

So many other modules would be using this.
'entity_type_id' => \Magento\Customer\Api\AddressMetadataInterface::ATTRIBUTE_SET_ID_ADDRESS

So we need to fix this, we will have to remove that migration attribute set row and its group record. As well as we need to make default attribute set id for new id that we have found. I.e we have to set attribute_set_id =2 and group id =2

Note: Keep a note of migration attribute set id and attribute group id that will help you in the next step.


SET FOREIGN_KEY_CHECKS=0;

"delete from eav_attribute_set where attribute_set_name='Migration_Default' and entity_type_id=2";
"Update eav_attribute_set SET attribute_set_id=2 where attribute_set_name='Default' and entity_type_id=2";

"delete from eav_attribute_group where attribute_group_name='Migration_General' and attribute_set_id=2";
"Update eav_attribute_group SET attribute_group_id=2, attribute_set_id=2 where attribute_group_id=19 and attribute_set_id=10";
SET FOREIGN_KEY_CHECKS=1;

Here attribute_group_id=19 is my default attribute group id for attribute_set_id=10, this is default magento customer attribute_set and group information, you may find 'attribute_group_code' for original attribute group in table 'eav_attribute_group', as Migration attribute set and group don't have attribute_group_code and tab_group_code;

Step 2. Add customer_address attributes to eav_entity_attribute table so that AttributeMeta class could use these attributes to parse address data

So now you need to check if attribute set, group and attribute id relation is maintained in table or not.
This is the main cause of unformatted address in magento. To do this:

SELECT * FROM eav_entity_attribute WHEREattribute_group_id= 2;

if you do not find any result set then try this query again with new attribute_set id ( migration attribute set id ) which you got from above query.

If you still don't have any result set then this is the problem. To Fix this we may need to insert entity type customer_attribute's attributes by using below command.

To check and verify before insertion:

SET @temp_row_number:=0;
Select ttab.*, @temp_row_number:=@temp_row_number+1 AS row_number, @temp_row_number*10 as sort_order From (SELECT ea.entity_type_id, ea.attribute_id,ea.attribute_code, eag.attribute_group_id, eas.attribute_set_id FROMeav_attributeas ea right join eav_attribute_set as eas on eas.entity_type_id=ea.entity_type_id and eas.attribute_set_name='Default' right join eav_attribute_group as eag on eag.attribute_set_id=eas.attribute_set_id where ea.entity_type_id=2 order by ea.attribute_id asc) as ttab;

To insert those records:

SET @temp_row_number:=0;

Insert into eav_entity_attribute (entity_type_id, attribute_set_id, attribute_group_id, attribute_id, sort_order)
Select ttab.*, (@temp_row_number:=@temp_row_number+1)*10 as sort_order From (SELECT ea.entity_type_id, eas.attribute_set_id,eag.attribute_group_id, ea.attribute_id FROM `eav_attribute` as ea right join eav_attribute_set as eas on eas.entity_type_id=ea.entity_type_id and eas.attribute_set_name='Default' right join eav_attribute_group as eag on eag.attribute_set_id=eas.attribute_set_id where ea.entity_type_id=2 order by ea.attribute_id asc) as ttab;

Some small typos:
eav_entity_attributenWHERE should be eav_entity_attribute WHERE (remove n)

eav_attributeas should be eav_attribute as (missing space)

Hey Mike,
Thanks for your response. I have made corrections.

Unfortunatly this does not fix the issue (for us).

I was able to fix the issue by replacing eav_entity_attribute with a copy from an older backup.

in my case, it was necessary to change the way from
Magento\Customer\Model\ResourceModel\Attribute\Collection
to
Magento\Customer\Model\ResourceModel\Address\Attribute\Collection
in the table eav_entity_type, column: entity_attribute_collection

@mak0605 can you give me email: i send my database. could you fix this error help me. can fix it for 3 week i had search to fix it a lot. but i can not

@mak0605 can you give me email: i send my database. could you fix this error help me. can fix it for 3 week i had search to fix it a lot. but i can not

Go to your DB and find table eav_entity_attribute.
Rename this table, and import the same table from a backup.

After you done that the customer address on both front and backend will work again.

For some weird reason Magento updates all rows in this table ... not sure why yet, but i can easily reproduce the bug.

Same issue in Magento 2.3.5 after migration from 1.8.1,
https://prnt.sc/smz8ii

have you fixed this issue?

under Magento 2.3.6 problem exists yet. This is a very big bug!!! Any ideas?
paypal_issue

Was this page helpful?
0 / 5 - 0 ratings