Skip to content
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

Checkout fields not showing with minified/bundled version #77

Open
Paulsky opened this issue Mar 21, 2023 · 12 comments
Open

Checkout fields not showing with minified/bundled version #77

Paulsky opened this issue Mar 21, 2023 · 12 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@Paulsky
Copy link

Paulsky commented Mar 21, 2023

When I enable minify and bundling (with magepack), Javascript errors are thrown and the checkout fields fail to load:

Cannot read properties of undefined (reading 'show_hide_address_fields') house-number-select.js line 18

Cannot read properties of undefined (reading 'setOptions') address-autofill-nl.js line 171

I suspect (not sure!) this is related to: #59

Paulsky added a commit to Paulsky/PostcodeNl_Api_Magento2 that referenced this issue Mar 21, 2023
@Paulsky Paulsky changed the title Checkout fields not showing Checkout fields not showing with minified/bundled version Mar 22, 2023
@marceldekoning
Copy link

@Paulsky,

Is there any news on this issue? With Magepack enabled and the patch from #77 installed, the address fields are still showed while this should be hidden.

image

Somehow, the data-bind="visible: visible,..." is gone on the street fieldset.

I hope someone has an anwer to this.

@Paulsky
Copy link
Author

Paulsky commented Apr 4, 2023

@marceldekoning I'm afraid I don't have any news on this issue. Did you try my changes in my pull request?

Do you have Javascript errors in the console?

@marceldekoning
Copy link

marceldekoning commented Apr 4, 2023

Hi @Paulsky,

After regenerating the magepack.config.js and bundles again, it worked after patching the module with your PR. For anyone who needs this too, I created a patch file for version 3.1.9:

https://pastebin.com/L6rKvcDt

All credits to @Paulsky off course! Thanks.

@Paulsky
Copy link
Author

Paulsky commented Apr 4, 2023

Great to hear that @marceldekoning and really nice of you for creating a patch! 🙏 Good to know my PR is also fixing your issue.

@JerrySmidt what do you think?

@JerrySmidt
Copy link
Contributor

Magento 2.4.6 with minified and Magepack-bundled files seems to work without any errors on release 3.1.9.

Is there anything else needed to reproduce this issue? Could you provide more info on how exactly to reproduce this issue (e.g. any other settings, modules etc that affect this)?

Otherwise we can't test for this issue and a future module version could have the same issue again.

Thanks for your efforts.

@Paulsky
Copy link
Author

Paulsky commented Apr 6, 2023

Thank you for your reply @JerrySmidt . Did you test it with the onestep checkout module from onestepcheckout-dot-com?

@JerrySmidt
Copy link
Contributor

@Paulsky, no I don't have that module,

But assuming you have it, could you check with onestepcheckout-dot-com disabled to see if you still get the error?

@Paulsky
Copy link
Author

Paulsky commented Apr 6, 2023

@JerrySmidt I will check it. But could you have a look at my PR. It's mostly only checking if some variables are set or not.

@marceldekoning are you also using OneStepCheckout from onestepcheckout-dot-com?

@marceldekoning
Copy link

@Paulsky,

No, I'm not using OSC, but just the native checkout with Magento 2.4.5-p1. I did not test this on 2.4.6 tho.

@Paulsky
Copy link
Author

Paulsky commented Apr 14, 2023

Thanks @marceldekoning. @JerrySmidt FYI: the screenshots in #72 (comment) seems to show the same problem (this.settings is undefined).

@hd-jeroen
Copy link

hd-jeroen commented Aug 25, 2023

This issue still persists using version 3.1.11 on Magento 2.4.6-p2 without minified/bundled JS, but only the first time after the cache has been cleared.

@JerrySmidt
Copy link
Contributor

See #72 (comment)

@JerrySmidt JerrySmidt added bug Something isn't working duplicate This issue or pull request already exists labels Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants