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

Weird product urls on 2.4.7-p2 #93

Open
MaximGns opened this issue Sep 11, 2024 · 0 comments
Open

Weird product urls on 2.4.7-p2 #93

MaximGns opened this issue Sep 11, 2024 · 0 comments

Comments

@MaximGns
Copy link

MaximGns commented Sep 11, 2024

Hi, i'm having issues with the latest magento version. If i regenerate the product urls the output is different, as well some dutch stroreviews have french urls.
Below i've added some screenshots of the difference between the two versions of magento.

Latest version on 2.4.6
image

Latest version on 2.4.7-p2
image

If i compare the two version once they perform the action "\Magento\UrlRewrite\Model\Storage\DbStorage::doReplace"
There are some french store view urls inside the array of urls for the dutch store view.

2.4.6

 array:5 [
  "p040014401-upyard-upyard-anti-worteldoek_1" => Magento\UrlRewrite\Service\V1\Data\UrlRewrite^ {#4795
    #_data: array:5 [
      "entity_type" => "product"
      "entity_id" => "55008"
      "request_path" => "p040014401-upyard-upyard-anti-worteldoek"
      "target_path" => "catalog/product/view/id/55008"
      "store_id" => 1
    ]
    #defaultValues: array:4 [
      "redirect_type" => 0
      "is_autogenerated" => 1
      "metadata" => null
      "description" => null
    ]
    -serializer: Magento\Framework\Serialize\Serializer\Json^ {#473}
  }
  "tuin/serres-en-kweekbakken/kweekbakken/p040014401-upyard-upyard-anti-worteldoek_1" => Magento\UrlRewrite\Service\V1\Data\UrlRewrite^ {#4806
    #_data: array:6 [
      "entity_type" => "product"
      "entity_id" => "55008"
      "request_path" => "tuin/serres-en-kweekbakken/kweekbakken/p040014401-upyard-upyard-anti-worteldoek"
      "target_path" => "catalog/product/view/id/55008/category/6375"
      "store_id" => 1
      "metadata" => "{"category_id":"6375"}"
    ]
    #defaultValues: array:4 [
      "redirect_type" => 0
      "is_autogenerated" => 1
      "metadata" => null
      "description" => null
    ]
    -serializer: Magento\Framework\Serialize\Serializer\Json^ {#473}
  }
  "/p040014401-upyard-upyard-anti-worteldoek_1" => Magento\UrlRewrite\Service\V1\Data\UrlRewrite^ {#4808
    #_data: array:6 [
      "entity_type" => "product"
      "entity_id" => "55008"
      "request_path" => "/p040014401-upyard-upyard-anti-worteldoek"
      "target_path" => "catalog/product/view/id/55008/category/1"
      "store_id" => 1
      "metadata" => "{"category_id":"1"}"
    ]
    #defaultValues: array:4 [
      "redirect_type" => 0
      "is_autogenerated" => 1
      "metadata" => null
      "description" => null
    ]
    -serializer: Magento\Framework\Serialize\Serializer\Json^ {#473}
  }
  "tuin/p040014401-upyard-upyard-anti-worteldoek_1" => Magento\UrlRewrite\Service\V1\Data\UrlRewrite^ {#5403
    #_data: array:6 [
      "entity_type" => "product"
      "entity_id" => "55008"
      "request_path" => "tuin/p040014401-upyard-upyard-anti-worteldoek"
      "target_path" => "catalog/product/view/id/55008/category/6087"
      "store_id" => 1
      "metadata" => "{"category_id":"6087"}"
    ]
    #defaultValues: array:4 [
      "redirect_type" => 0
      "is_autogenerated" => 1
      "metadata" => null
      "description" => null
    ]
    -serializer: Magento\Framework\Serialize\Serializer\Json^ {#473}
  }
  "tuin/serres-en-kweekbakken/p040014401-upyard-upyard-anti-worteldoek_1" => Magento\UrlRewrite\Service\V1\Data\UrlRewrite^ {#5417
    #_data: array:6 [
      "entity_type" => "product"
      "entity_id" => "55008"
      "request_path" => "tuin/serres-en-kweekbakken/p040014401-upyard-upyard-anti-worteldoek"
      "target_path" => "catalog/product/view/id/55008/category/6150"
      "store_id" => 1
      "metadata" => "{"category_id":"6150"}"
    ]
    #defaultValues: array:4 [
      "redirect_type" => 0
      "is_autogenerated" => 1
      "metadata" => null
      "description" => null
    ]
    -serializer: Magento\Framework\Serialize\Serializer\Json^ {#473}
  }
]

2.4.7-p2

 array:7 [
  "p040014401-upyard-upyard-anti-worteldoek_1" => Magento\UrlRewrite\Service\V1\Data\UrlRewrite^ {#4870
    #_data: array:5 [
      "entity_type" => "product"
      "entity_id" => "55008"
      "request_path" => "p040014401-upyard-upyard-anti-worteldoek"
      "target_path" => "catalog/product/view/id/55008"
      "store_id" => 1
    ]
    #defaultValues: array:4 [
      "redirect_type" => 0
      "is_autogenerated" => 1
      "metadata" => null
      "description" => null
    ]
    -serializer: Magento\Framework\Serialize\Serializer\Json^ {#275}
  }
  "tuin/serres-en-kweekbakken/kweekbakken/p040014401-upyard-upyard-anti-worteldoek_1" => Magento\UrlRewrite\Service\V1\Data\UrlRewrite^ {#4884
    #_data: array:6 [
      "entity_type" => "product"
      "entity_id" => "55008"
      "request_path" => "tuin/serres-en-kweekbakken/kweekbakken/p040014401-upyard-upyard-anti-worteldoek"
      "target_path" => "catalog/product/view/id/55008/category/6375"
      "store_id" => 1
      "metadata" => "{"category_id":"6375"}"
    ]
    #defaultValues: array:4 [
      "redirect_type" => 0
      "is_autogenerated" => 1
      "metadata" => null
      "description" => null
    ]
    -serializer: Magento\Framework\Serialize\Serializer\Json^ {#275}
  }
  "tuin/p040014401-upyard-upyard-anti-worteldoek_1" => Magento\UrlRewrite\Service\V1\Data\UrlRewrite^ {#5478
    #_data: array:6 [
      "entity_type" => "product"
      "entity_id" => "55008"
      "request_path" => "tuin/p040014401-upyard-upyard-anti-worteldoek"
      "target_path" => "catalog/product/view/id/55008/category/6087"
      "store_id" => 1
      "metadata" => "{"category_id":"6087"}"
    ]
    #defaultValues: array:4 [
      "redirect_type" => 0
      "is_autogenerated" => 1
      "metadata" => null
      "description" => null
    ]
    -serializer: Magento\Framework\Serialize\Serializer\Json^ {#275}
  }
  "tuin/serres-en-kweekbakken/p040014401-upyard-upyard-anti-worteldoek_1" => Magento\UrlRewrite\Service\V1\Data\UrlRewrite^ {#5490
    #_data: array:6 [
      "entity_type" => "product"
      "entity_id" => "55008"
      "request_path" => "tuin/serres-en-kweekbakken/p040014401-upyard-upyard-anti-worteldoek"
      "target_path" => "catalog/product/view/id/55008/category/6150"
      "store_id" => 1
      "metadata" => "{"category_id":"6150"}"
    ]
    #defaultValues: array:4 [
      "redirect_type" => 0
      "is_autogenerated" => 1
      "metadata" => null
      "description" => null
    ]
    -serializer: Magento\Framework\Serialize\Serializer\Json^ {#275}
  }
  "tuin/serres-en-kweekbakken/kweekbakken/p040014401-upyard-upyard-anti-worteldoek_4" => Magento\UrlRewrite\Service\V1\Data\UrlRewrite^ {#5510
    #_data: array:6 [
      "entity_type" => "product"
      "entity_id" => "55008"
      "request_path" => "tuin/serres-en-kweekbakken/kweekbakken/p040014401-upyard-upyard-anti-worteldoek"
      "target_path" => "catalog/product/view/id/55008/category/6375"
      "store_id" => 4
      "metadata" => "{"category_id":"6375"}"
    ]
    #defaultValues: array:4 [
      "redirect_type" => 0
      "is_autogenerated" => 1
      "metadata" => null
      "description" => null
    ]
    -serializer: Magento\Framework\Serialize\Serializer\Json^ {#275}
  }
  "jardin/p040014401-upyard-upyard-anti-worteldoek_4" => Magento\UrlRewrite\Service\V1\Data\UrlRewrite^ {#5533
    #_data: array:6 [
      "entity_type" => "product"
      "entity_id" => "55008"
      "request_path" => "jardin/p040014401-upyard-upyard-anti-worteldoek"
      "target_path" => "catalog/product/view/id/55008/category/6087"
      "store_id" => 4
      "metadata" => "{"category_id":"6087"}"
    ]
    #defaultValues: array:4 [
      "redirect_type" => 0
      "is_autogenerated" => 1
      "metadata" => null
      "description" => null
    ]
    -serializer: Magento\Framework\Serialize\Serializer\Json^ {#275}
  }
  "jardin/serres-et-bacs-a-semis/p040014401-upyard-upyard-anti-worteldoek_4" => Magento\UrlRewrite\Service\V1\Data\UrlRewrite^ {#5549
    #_data: array:6 [
      "entity_type" => "product"
      "entity_id" => "55008"
      "request_path" => "jardin/serres-et-bacs-a-semis/p040014401-upyard-upyard-anti-worteldoek"
      "target_path" => "catalog/product/view/id/55008/category/6150"
      "store_id" => 4
      "metadata" => "{"category_id":"6150"}"
    ]
    #defaultValues: array:4 [
      "redirect_type" => 0
      "is_autogenerated" => 1
      "metadata" => null
      "description" => null
    ]
    -serializer: Magento\Framework\Serialize\Serializer\Json^ {#275}
  }
]

Note: If i run the command with store 0 (admin), then the urs are correctly formed. If i run this without any parameter or using store specific parameter like store id 1 (NL) then it is not executed properly.

The NL store and FR are in the same "Group". I see that \Magento\CatalogUrlRewrite\Model\ProductScopeRewriteGenerator::generateCategoryUrlsInStoreGroup will also execute french urls for the NL storeview as this belongs to same group. Maybe this give a clear starting point where to dive into.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant