Skip to content

v1.0.41

Choose a tag to compare

@nmarquev nmarquev released this 18 Feb 02:59
· 20 commits to main since this release

Fix: Color mapping persistence for new images

Problem: When uploading new images with auto-detected color from filename, the color was assigned in the admin UI (yellow selector visible) but never persisted to the database. Propagation then treated these images as "generic" and copied them to ALL child products instead of only the matching color child.

Root cause: New images in the admin gallery get temporary hash value_ids in JavaScript. After Product::save(), Magento assigns real numeric DB value_ids. The color mapping form data uses the temp hashes as keys, so the PHP lookup by real value_id finds nothing — associated_attributes stays NULL.

Fix: The admin JS now sends a secondary rollpix_color_mapping_by_file mapping keyed by image file path (which is stable across the save operation). The PHP plugin uses file paths as fallback for images not matched by value_id, ensuring color assignments are written to the DB before propagation runs.