Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Reproduce steps:
- Install commerce and commerce_product module.
- Create an product attribute "size" /admin/commerce/product-attributes and set element type as "Select list"
- Set commerce_product_variation's size field form widget as Select boxes(Single value).
- Create a product(Every thing works fine in this step).
- Edit last step's product, and add new variation. the size don't work, after open chrome's inspect and click Console, we can see js error
This error caused by the wrong loading order of js file, the select2.full.min.js and select2boxes.js is the last two loaded js file.
This is the relevant issue https://stackoverflow.com/questions/20034522/select2-is-not-a-function
Comments
Comment #2
lawxen CreditAttribution: lawxen at Sparkpad commentedComment #3
lawxen CreditAttribution: lawxen at Sparkpad commentedThis commit https://www.drupal.org/project/select2boxes/issues/2982822#comment-12676256 make this bug disappeared accidentally
Comment #4
matsbla CreditAttribution: matsbla commentedThat is great, thanks for reporting!
Comment #5
lawxen CreditAttribution: lawxen at Sparkpad commented@matsbla
But if we uninstall big_pipe, the issue come back when we use commerce_price_list module,
This module hasn't handle inline_entity_form rightly,
So this issue hasn't be fixed totally. But it become less important because most of drupal8 site will enable big_pipe.
Comment #6
matsbla CreditAttribution: matsbla commentedComment #7
Valentine94Hi guys, just tested it with just inline_entity_form - all seems OK, tried with commerce everything seems fine as well
Note: everything with uninstalled big_pipe of course
Comment #8
matsbla CreditAttribution: matsbla commented@caseylau
Please test with last dev version!
If you still encounter the problem, please provide steps to reproduce.