Skip to content

AttributeSlugRepository cannot save non existing slug #337

@gerrits-ecommerce

Description

@gerrits-ecommerce

In version v8.8.0 of the tweakwise/magento2-tweakwise module. The following happens.

When visiting a categorie with filters i get the following exception:

[2025-12-23T12:42:23.116453+00:00] main.CRITICAL: Magento\Framework\Exception\CouldNotSaveException: Die Seite konnte nicht gespeichert werden: Verletzung einer "Unique" Einschränkung gefunden in /data/web/apps/deploy.mysteel.hypernode.io/releases/12/vendor/tweakwise/magento2-tweakwise/Model/AttributeSlugRepository.php:107

It looks like the Save() function is trying to save an already existing slug to the tweakwise_attribute_slug table. When i dump: $attributeSlug->getSlug(); i get pulverbeschichtetem-stahl-1.

But when i than look in the table this slug does not exist:

Image

The result of this is that on this category page no filters are loaded. To temporarily fix this is disabled the CouldNotSaveException thrown on line 107 of vendor/tweakwise/magento2-tweakwise/Model/AttributeSlugRepository.php

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions