New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix default positioning for thumbnailDefinition in Classic UI #425
Conversation
Quality Gate passedIssues Measures |
@rliebi Could you please rebase the PR to 1.4? Thanks |
This commit addresses a critical issue in the Pimcore Admin UI Classic Bundle related to the thumbnail configuration process. Specifically, it fixes a problem where the `positioning` parameter of the `thumbnailDefinition` could be left undefined or empty in the generated YAML file. This situation arises in the frontend component responsible for generating this configuration, leading to potential misconfigurations and unexpected behaviors in thumbnail rendering. The fix is applied directly to the frontend JavaScript responsible for assembling the thumbnail definition data, at line 676 of `public/js/pimcore/settings/thumbnail/item.js`. The introduced code snippet ensures that if the `positioning` data is either undefined or an empty string, it defaults to "center". This guarantees that every thumbnailDefinition has a valid `positioning` value, thus preventing errors and ensuring consistent rendering behavior across the board. ```javascript if (typeof data.positioning == "undefined" || data.positioning == "") { data.positioning = "center"; } ``` This proactive correction streamlines the thumbnail setup process, ensuring that administrators and users benefit from a more reliable and error-free experience when configuring thumbnails in the Pimcore Admin UI. It emphasizes our commitment to quality and user satisfaction by addressing potential issues at their root, enhancing the overall stability and usability of the Pimcore platform.
Quality Gate passedIssues Measures |
Hi @rliebi I found some lines above your code a similar logic. Doesn't this fix your problem? |
Interesting, would have to check, maybe I am on an older version and it got fixed in the meantime. Will check next week. |
@rliebi Are there any news on that? |
It seems as #449 was addressed faster than this. |
This commit addresses an issue in the Pimcore Admin UI Classic Bundle related to the thumbnail configuration process. Specifically, it fixes a problem where the
positioning
parameter of thethumbnailDefinition
could be left undefined or empty in the generated YAML file. This situation arises in the frontend component responsible for generating this configuration, leading to potential misconfigurations and unexpected behaviors in thumbnail rendering.The fix is applied directly to the frontend JavaScript responsible for assembling the thumbnail definition data, at line 676 of
public/js/pimcore/settings/thumbnail/item.js
. The introduced code snippet ensures that if thepositioning
data is either undefined or an empty string, it defaults to "center". This guarantees that every thumbnailDefinition has a validpositioning
value, thus preventing errors and ensuring consistent rendering behavior across the board.This proactive correction streamlines the thumbnail setup process, ensuring that administrators and users benefit from a more reliable and error-free experience when configuring thumbnails in the Pimcore Admin UI. It emphasizes our commitment to quality and user satisfaction by addressing potential issues at their root, enhancing the overall stability and usability of the Pimcore platform.