Fix: Save translations for an attribute#319
Merged
ahuininga-orisha merged 20 commits intobetafrom Dec 9, 2025
Merged
Conversation
jansentjeu
requested changes
Dec 4, 2025
Collaborator
jansentjeu
left a comment
There was a problem hiding this comment.
At the description i see the following:
This pull request requires https://github.com/EmicoEcommerce/Magento2TweakwiseExport/pull/130 to work
So we need to require a specific new version of the Tweakwise export module, right? We have to require that in the composer.json.
Setup/Patch/Schema/ChangePrimaryKeyTweakwiseAttributeSlugTable.php
Outdated
Show resolved
Hide resolved
jansentjeu
requested changes
Dec 8, 2025
jansentjeu
requested changes
Dec 9, 2025
jansentjeu
approved these changes
Dec 9, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🛠️ Pull Request Fixes: Tweakwise attribute/filter issues
This pull request resolves two distinct issues related to how attribute values are saved and displayed in the system, specifically concerning the
tweakwise_attribute_slugtable and multi-store translations.Slugs are now saved with the associated store ID. A dedicated cron job has been implemented to allow for slug regeneration.
If you encounter any issues with existing slugs (e.g., URLs containing -1), or simply wish to regenerate them, you may run this cron job.
bin/magento tweakwise:regenerate:filter-url-slugsThis pull request requires EmicoEcommerce/Magento2TweakwiseExport#130 to work
Issue 1: Attribute value translation saving
Problem: Attribute value translations for different store views were not being saved correctly to the
tweakwise_attribute_slugtable. Only the default store view value was recorded.How to Reproduce:
tweakwise_attribute_slugtable; the translations are missing.I've solved this issue by adding the store id to the table. Without the store id, the the primary key was the attribute value. But some values where spelled differently, but mysql saw it as the same value (for example cortenová oceľ and cortenová ocel)
Issue 2: Incorrect slug for changed filter values
Problem: When a attribute value is used in a filter and has an modified spelling, the resulting slug on the front-end category page can be incorrect, even though the new value is saved correctly in the database.
How to Reproduce:
tweakwise_attribute_slugtable. It will have a slug (e.g., "one").tweakwise_attribute_slugtable, but its slug value is set to "one-1" (which wasn't used on the category page), indicating a mismatch in how the slug is generated and used.