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

#36423: Fixed Uncaught SyntaxError: Unexpected token '}' #38401

Closed
wants to merge 1 commit into from

Conversation

andrewbess
Copy link

Description (*)

This pull request (PR) provides fixes to resolve the problem described in the #36423

Fixed Issues (if relevant)

  1. Fixes Adminhtml - Product with custom option date [required] when creating an order via admin #36423

Manual testing scenarios (*)

Please use steps to reproduce from affected issue

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

Copy link

m2-assistant bot commented Jan 31, 2024

Hi @andrewbess. Thank you for your contribution!
Here are some useful tips on how you can test your changes using Magento test environment.

Add the comment under your pull request to deploy test or vanilla Magento instance:
  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names.

Allowed build names are:
  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here
ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review.


For more details, review the Code Contributions documentation.
Join Magento Community Engineering Slack and ask your questions in #github channel.

@m2-community-project m2-community-project bot added the Priority: P3 May be fixed according to the position in the backlog. label Jan 31, 2024
@m2-github-services m2-github-services added Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner labels Jan 31, 2024
@andrewbess
Copy link
Author

@magento run all tests

Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

Copy link
Collaborator

@korovitskyi korovitskyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @andrewbess
Thank you for your work here.

Please remove underscore for the follow variables $_option and $_optionId.
Thank you.

@andrewbess
Copy link
Author

@magento run all tests

@andrewbess
Copy link
Author

Hello @korovitskyi
Thank you for your review and suggestions.
It has been fixed.

Please review it again.

Thank you in advance.

@andrewbess
Copy link
Author

@magento run Static Tests, Functional Tests CE

@andrewbess
Copy link
Author

@magento run Functional Tests CE, Functional Tests EE

@andrewbess
Copy link
Author

@magento run Functional Tests CE, Functional Tests EE, Functional Tests B2B

@andrewbess
Copy link
Author

@magento run Functional Tests EE, Functional Tests B2B

1 similar comment
@andrewbess
Copy link
Author

@magento run Functional Tests EE, Functional Tests B2B

Copy link
Collaborator

@korovitskyi korovitskyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes looks good for me.
@andrewbess, thank you for yout work here!

@engcom-Delta
Copy link
Contributor

Hi @andrewbess , @korovitskyi

Thanks for the collaboration & contribution!

### :x: QA not Passed

What is the issue

Manual Scenario Steps

Precondition:

Magento Version 2.4-develop
PHP 8.3
Magento installed with custom date module

Steps To reproduce:

1.Set Date as drop down in Stores > Configuration > Catalog > [Date & Time Custom Options]
2.set the Date Fields Order - Day / Month / Year
3.save and clear cache
4.go to Catalog > Products > Select or add a new product
5.Add a date custom option to a product with date.phtml as required
6.go to Sales > Order
7.Create a new order, with new customer
8.Select add products
9.Select the product with the required custom option date

✔️ Expected result After Fix 

We should n't be getting any error and should be able proceed further with the product

❌ Actual result After Fix 

Screenshot 2024-03-07 at 3 48 28 PM Screenshot 2024-03-07 at 3 48 44 PM Screenshot 2024-03-07 at 4 08 35 PM Screenshot 2024-03-07 at 4 14 42 PM Screenshot 2024-03-07 at 4 52 59 PM Screenshot 2024-03-07 at 4 59 51 PM Screenshot 2024-03-07 at 5 03 45 PM Screenshot 2024-03-07 at 7 11 19 PM Screenshot 2024-03-07 at 7 11 53 PM Screenshot 2024-03-07 at 7 14 19 PM Screenshot 2024-03-07 at 7 51 01 PM Screenshot 2024-03-07 at 7 52 05 PM Screenshot 2024-03-07 at 7 51 11 PM Screenshot 2024-03-07 at 7 51 19 PM

-> One more point I want to add that even if we are getting error in the console, we are able to proceed further to add the product and submit the order before the PR changes, after the PR changes we are getting different error but we are able to proceed further as earlier.

Copy link
Contributor

@engcom-Delta engcom-Delta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are getting the below error

Uncaught TypeError: $(...).filter(...).collapse is not a function
at HTMLDivElement. (theme.js:629:12)
at Function.each (VM31570 jquery.js:383:35)
at theme.js:626:7
at Object.execCb (require.js:1696:33)
at Module.check (require.js:883:51)
at Module. (require.js:1139:34)
at require.js:134:23
at require.js:1189:21
at each (require.js:59:31)
at Module.emit (require.js:1188:17)

@engcom-Dash
Copy link
Contributor

Hello @andrewbess,

Thanks for your contributions!

Please resolve the conflict so we can proceed with this PR.

Thanks!

@engcom-Dash
Copy link
Contributor

Closing this PR since it has not been updated in a while. Please feel free to reopen if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner Priority: P3 May be fixed according to the position in the backlog.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adminhtml - Product with custom option date [required] when creating an order via admin
5 participants