This repository has been archived by the owner on Sep 14, 2020. It is now read-only.
urldecoded URL rewrites grid custom columns #186
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.
We ran into an issue recently where we had a need to create URL keys for products and categories with non-Latin characters, and they were not showing up properly in the URL rewrites grid. The URL keys are stored in the database in their encoded form with all of those ugly percent signs, and only decoded when they need to be displayed. We utilised EAG custom columns to achieve this in the URL rewrites grid.
This adds custom columns for the URL rewrites grid that urldecode ID, request and target paths when viewing them. In order to allow filtering with these non-Latin characters, we also have to add a custom filter class which encodes the value entered by the user.
As you can see from the third commit, currently we have to set the value on the filter object, then get the condition array, then set it back to the decoded version again. It would be nice if we could just pass the encoded version to the
getCondition()
method to avoid having to do this. Could you advise on whether we missed something, or if we should be going about this differently?