Related products are missing on product pages

After a migration with UB Data Migration Pro, where everything seemingly went well, we see that related products doesn’t appear on the frontend, even if they show as expected in the backend and can be handled as they should.

I have confirmed that this is not a theme issue by changing to Luma and placing this snippet on product phtml-file confirms that that the collection for related products it empty. The “getRelatedProducts” returns empty.
/* test for related*/

$currentProduct = $block->getProduct();

if ($currentProduct = $block->getProduct()) {
$relatedProducts = $currentProduct->getRelatedProducts();

if (!empty($relatedProducts)) {
echo'<hr/>Related Products <br />’;
foreach ($relatedProducts as $relatedProduct) {
echo”getSku:”.$relatedProduct->getSku() .”//”;

If we add new related products to they appear as they should in the front-end, but the migrated still doesn’t.
Newly added related products also show in the code snippet above, but migrated still doesn’t.

We have also tried:
-- multiple reindex, deploy and cache clear
-- mass change attribute from admin products list for selected products and re-assigning products to the same website
-- reorder the related products

None works.

Can you help resolve the issue?

Kind regards

1 answer

Profile photo of Mall Staff 167790.00 $tone April 12, 2021

Hi there,

Can you help resolve the issue?

The issue you mentioned with product’s related products is strange. Please provide me information about your instance:

  • URL and Admin credentials of your M2 instance
  • SSH credentials of your M2 instance
  • Let me know the path to the M2 folder
  • phpMyadmin URL which allows me to view your M1 and M2 databases
  • And let me know some product IDs which have the issue you mentioned

I will help to check further and get back to you then.
PS. Please make sure you mark your reply private or simply switch this ticket to the private mode. Then it’s safe to share your site info here. Only you and our technical team can access it.  



Please login or Register to Submit Answer

Written By