Loading

Large volume of "Error while generating a category URL" log messages in B2C Commerce

Publiceringsdatum: Jul 9, 2025
Beskrivning

You are seeing a large volume of WARN messages generated in the B2C Commerce logs which contain messages similar to the one below:

Error while generating a category URL: URL for category not found, input category id=men-young_mens-surf_performance-swimwear-boardshorts/jams-boardshort, context id=en_US

Lösning

This can occur when there are categories inside of the master catalog or a storefront catalog that are not assigned to any sites. When the sfcc-update-storefront-url system job tries to generate URLs for these categories, the WARN messages are generated in the logs. These WARN messages are also generated to prevent on-the-fly creation of categories in master or storefront catalogs on the Production instance.

There are a few ways to deal with this issue:

  • Optimize categories by removing unused or unwanted categories from master/storefront catalog so that this can reduce the logs to some extent. 
  • Please consider the below workarounds to mitigate the issue
    • Workaround 1:
      • Log into Business Manager and go to SEO > URL Rules:
        • In the Catalog URLs tab, uncheck the Generate URL mappings for Offline Categories box and click Validate.
        • In the Content URLs tab, uncheck the Generate URL mappings for Offline Folders box and click Validate.
      • Mark the categories under the catalog as offline by exporting the catalogs and importing them back with the category status marked as offline in the XML. Doing this ensures that all the categories are still be available but just marked offline.
      • Verify that the URL mappings for Offline Categories and Folders are unchecked.
      • Since the system job only checks for the categories that are online, the categories that were marked offline wouldn't be eligible and hence no logs are generated. However, please remember that when the category page is opened, a few log entries will be generated.
    • Workaround 2:
      • Another way to mitigate this issue is to create a Storefront URL by assigning a category to the storefront / site catalog. To prevent these categories from being searchable or browsable where they appear in the site navigation, you can set the category offline but keep Generate URL Mappings for Offline Categories enabled.
      • For some exceptional cases, when you want the categories to appear in the navigation in the future, additional custom logic can be added so that these specific offline categories can be made accessible for the dedicated use cases.
    • Workaround 3:
      • Another option is to keep the category online and assigned but to disable the Show in Menu Navigation option located Merchant Tools > Products and Catalogs > Catalogs > Category Attributes> Custom section> Show in Menu Navigation in Business Manager.

Note: Certain Business Manager screens check for URLs and log the same warning if the SEO URLs have not been generated yet. A good example of this is when creating new categories via Business Manager. This warning can be safely ignored in those cases.

Knowledge-artikelnummer

000391267

 
Laddar
Salesforce Help | Article