Skip to content

[PS 9.0.2] Error when editing product: "catalogPriceRuleId" parameter missing for route "admin_catalog_price_rules_edit" #1639

Description

@christiandouchamps

Prerequisites

Describe the bug and add attachments

Describe the bug

When trying to edit any product in the back office, I get the following error:

Parameter "catalogPriceRuleId" for route "admin_catalog_price_rules_edit" must match "\d+" ("catalog_price_rule_id" given) to generate a corresponding URL.

Steps to reproduce

  1. Go to Catalog > Products
  2. Click "Edit" on any product
  3. Error 500 appears

Expected behavior

Product edit page should load normally.

Environment

  • PrestaShop version: 9.0.2 (upgraded from 9.0.1)
  • PHP version: 8.3.28
  • Table ps_specific_price_rule is empty

Additional context

The bug seems to be in CatalogPriceRulesType.php where catalog_price_rule_id is used but the route expects catalogPriceRuleId.

Expected behavior

The product edit page should load normally without any error.

Steps to reproduce

  1. Install PrestaShop 9.0.1
  2. Upgrade to PrestaShop 9.0.2 using the 1-Click Upgrade module
  3. Go to Back Office > Catalog > Products
  4. Click "Edit" on any product
  5. Error 500 appears with the InvalidParameterException

PrestaShop version(s) where the bug happened

9.0.2 (upgraded from 9.0.1)

How you installed PrestaShop

Upgraded using 1-Click Upgrade module

PHP version(s) where the bug happened

8.3.28

If your bug is related to a module, specify its name and its version

Not related to a module - core bug in CatalogPriceRulesType.php

Your company or customer's name goes here (if applicable).

StrassDentaires

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status
    Blocked

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions