Contributions 2 min read
Classification store key deletion fix
Check out how one of our Pimcore developers helped improve Pimcore by fixing issues in Pimcore's classification store!
What was the issue?
The problem was with classification store keys. When you delete the key from the classification store it wouldn’t delete it from the classification store group that contains it. That leads to objects still having deleted keys as their field.
How did you solve it?
Problem was that the Pimcore team implemented soft delete of the classification store keys. Instead of calling a function that deletes the key from the database, it calls a function that updates that key and sets its attribute “enabled” to 0.
I added a condition in the function that updates the key, that checks if the field that is being updated is “enabled” and is being updated to value 0. If the condition is true then it would remove the key from all the groups that contained it.
Why is this fix important?
This is important because classification store keys are used for making object fields that not all instances of objects contain. And if we remove a key from a classification store it means that for some reason we don’t need that information anymore. It could be because all instances of objects now must have that attribute or because that attribute is not used anymore.
No matter what is the reason we wouldn’t need to fill out that attribute anymore, so if we delete the key from a classification store but it still persists in the classification store group we would still need to fill that attribute. It leads to having to do more work, having more data in the database, and ever so slightly slowing down the page loading time.
How does it feel to contribute to a platform such as Pimcore?
The feeling is amazing. Knowing that anyone can contribute to something this big is fantastic. Even while contributing to the platform, during the merge request, someone from the Pimcore development team took their time to explain something to me. Also, he gave me some advice on how to make my code even more optimized and better overall.
And if you want to check out this pull request, just follow the link!
Related
Contributions Fixing the invisible field inside block element
Another Pimcore fix is coming straight from Factory! Our Pimcore developer, Dino, recently fixed the issue related to invisible fields inside block elements. Visit us and read more… 1 min read
Contributions Unit listing – missing condition variables fix
Check out one of our latest pull requests submitted by our Pimcore developers! 1 min read
Contributions Option to allow free input in select editable
More power is given to the developers through this fix. Now, it's up to them allow editors even more freedom when working in Pimcore. Find out what's new. 1 min read
