Magento 2 upgrade 2.1.7 to 2.3.2 give error Foreign key constraint is incorrectly formed modify column customer_group_id in table of customer_group

Can anyone please explain about this type of error solution.

Also, I refer to this link Magento 2 failed database rollback cannot add foreign key constraints but not working for me.

so please anyone help me.

Thank you in advance.

Magento 2.3.2 – Switch Website (store) without going to base URL

I’m using the following code to switch websites.

app/design/frontend/[Vendor]/{Child_theme}/Magento_Store/templates/switch/languages.phtml

<?php /** @var \Magento\Store\Block\Switcher $  block */ $  viewModel = $  block->getData('view_model'); $  websites = $  viewModel->getWebsites(); $  websiteid = $  viewModel->getWebsite()->getWebsiteId(); ?> <div class="switcher store switcher-store" id="switcher-store">     <strong class="label switcher-label"><span><?php echo __('Choose your Country') ?></span></strong>     <div class="actions dropdown options switcher-options">         <?php foreach ($  websites as $  website): ?>             <?php if ($  websiteid == $  website->getId()): ?>                 <div class="action toggle switcher-trigger"                      role="button"                      tabindex="0"                      data-mage-init='{"dropdown":{}}'                      data-toggle="dropdown"                      data-trigger-keypress-button="true"                      id="switcher-store-trigger">                     <strong>                         <span class="<?php echo str_replace(' ', '-', $  block->escapeHtml($  website->getName())) ?>">                             <strong><a><?php echo $  block->escapeHtml($  website->getName()) ?></a></strong>                         </span>                     </strong>                 </div>             <?php endif; ?>         <?php endforeach; ?>         <ul class="dropdown switcher-dropdown" data-target="dropdown">             <?php foreach ($  websites as $  website): ?>                 <?php if (!($  websiteid == $  website->getId())): ?>                     <li class="switcher-option view">                         <span class="flag-icon <?php echo str_replace(' ', '-', $  block->escapeHtml($  website->getName())) ?>">                             <a href='<?php echo $  website->getDefaultStore()->getBaseUrl() ?>'>                             <?php echo $  block->escapeHtml($  website->getName()) ?>                         </a>                         </span>                     </li>                 <?php endif; ?>             <?php endforeach; ?>         </ul>     </div> </div> 

However, when a product page is accessed on a particular website and then the website is switched it goes back to the base url of the website switched to.

For example

Different websites are

  • xyz.com/us
  • xyz.com/uk
  • xyz.com/eu

URL that is accessed is xyz.com/uk/apple.html and say you switch to the US website, it goes to xyz.com/us instead of xyz.com/us/apple.html

How can I get it to switch to the same page but on the other website.

Magento Compile Errors After upgrade from 2.2.2 to 2.3.2 PHP 7.2

Magento Compile Errors After upgrade from 2.2.2 to 2.3.2 PHP 7.2

I had a magento 2.2.2 site running PHP 7.1 which I am trying to upgrade to 2.3.2 after a few days I am getting issues when trying to run compile command in CLI

php bin/magento setup:di:compile

Giving me lots of errors mostly like these

[root@server public_html]# php bin/magento setup:di:compile Compilation was started. Repositories code generation… 1/7 [====>———————–] 14% 1 sec 80.5 MiB Fatal error: Declaration of Magento\Customer\Model\ResourceModel\Address\Attribute\Source\Country::getAllOptions() must be compatible with Magento\Eav\Model\Entity\Attribute\Source\Table::getAllOptions($ withEmpty = true, $ defaultValues = false) in /home/mysite/public_html/vendor/magento/module-customer/Model/ResourceModel/Address/ Attribute/Source/Country.php on line 21 [root@server public_html]#

I managed to changed several of the files mentioned in the errors

using help from this site https://mage2.pro/t/topic/5275

But he is running Magento 2 on PHP 7.2 and I have upgraded Magento 2.2 to 2.3.2 and using PHP 7.2 – So situations are different

but one after another they kept coming

Question This upgrade is really annoying please can someone explain when we upgrade should the files being used by Magento 2.3.2 get upgraded aswell otherwise what is the point all the paths in the errors are for Magento files not themes so what exactly is getting upgraded – if Magento 2.3.2 Only works with PHP 7.2 then why dont Magento update the files it needs – they way it needs them to be set so they can be used by Magento PHP 7.2 etc –

Magento 2.2.2 upgrade 2.3.2 PHP 7.2 MCRYPT_BLOWFISH

Centos 6 Apache 2.4 PHP 7.2

I am trying to complete upgrade of magento 2.2.2 store to magento 2.3 following this tutorial

https://digitalstartup.co.uk/t/how-to-upgrade-from-magento-2-2-8-to-2-3-1/528

However I am getting the following error at step 4.5 running bin/magento setup:upgrade

[Exception] Warning: Use of undefined constant MCRYPT_BLOWFISH – assumed ‘MCRYPT_BLOWFISH’ (this will throw an Error i n a future version of PHP) in /home/redjohnco/public_html/vendor/magento/framework/Encryption/Encryptor.ph p on line 397

I am checking alot of post since last 2 days online and see that in PHP7 7.2 mcrypt has been removed –

However it seems Magento 2.3 or (my upgrade seems to need it)

I have alot of posts on this and they mention it can be installed on PHP 7.2 However the instructions dont seem to work on my Linux Centos 6

all the packages mentioned in the posts whenever I run give output

No package libc-dev available. No package pkg-config available. No package mcrypt-1.0.1 available.

It seems it cant find the package or whatever it needs to install mcrypt for php 7.2

Please note I am using multiple versions of php on my server but when checking in CLI SSH php-v i can see the version 7.2 is being used –

Please can anyone advise how I can fix this on centos 6

Magento 2.3.2 Failed to load the “Magento_Checkout/js/view/billing-address/list” component

I am using one-step checkout and getting an error in checkout console. and also page redirects to /noroute/ 404 page.

[ERROR] Failed to load the “Magento_Checkout/js/view/billing-address/list” component.

I have checked in Magento 2.3.2 release note and see there is a change in the checkout, so I think it showing an error because of this.

so I just want to know how to resolve error Failed to load component

Any help would be appreciated! Thanks.

Magento 2.3.2 – Product Page doesn’t show category in breadcrumb

The site is setup to

Use Categories Path for Product URLs – No

Use Canonical Link Meta Tag For Categories – Yes

Use Canonical Link Meta Tag For Categories – Yes

The category page shows the category & sub-category structure in the breadcrumbs.

However the product page only shows the product name in the breadcrumbs even if the product page was open through a category page.

How can I get the product page breadcrumb to show the category structure the product page was visited from.

Example category page – cat1 which lists product xyz

When product xyz is visted from the cat1 page listing, the breadcrumb should show

Home > Cat1 > xyz