magento2-38663: GraphQL type error when encoding custom selected option attribute UIDs
Community fix magento2-38663 merged into magento/magento2 on 2024-09-05, released in 2.4.8; applies cleanly to 11 releases from 2.4.7 to 2.4.7-p10.
Fixes the GraphQL type error when encoding custom selected option attribute UIDs edited
- Pull request title
- [Graphql] Type issue in 2.4.7
- Pull request
- magento/magento2#38663
- Issues
- #38662 human
- Author
- @Nuranto
- Merged
- 2024-09-05
- Fixed in
- 2.4.8
- Reported on
- 2.4.7
- Categories
- Customer, Web API
- Components
- magento/module-customer-graph-ql
Labels
- Area
- APIs
- Component
- CustomerAttributes
- Priority
- P2
- Severity
- —
- Reported on (labels)
- 2.4.7
Issue
Title and steps come from the upstream issue and pull request.
Description
main.ERROR: Magento\Framework\GraphQl\Query\Uid::encode(): Argument #1 ($id) must be of type string, int given, called in /var/www/html/vendor/magento/module-customer-graph-ql/Model/Customer/GetCustomSelectedOptionAttributes.php on line 58
Steps to reproduce
Expected result
Actual result
main.ERROR: Magento\Framework\GraphQl\Query\Uid::encode(): Argument #1 ($id) must be of type string, int given, called in /var/www/html/vendor/magento/module-customer-graph-ql/Model/Customer/GetCustomSelectedOptionAttributes.php on line 58
Taken from the upstream issue.
Code match per tag
Each tag was checked with git apply --check against that tag's files. A clean match means the change applies; it is not a test result. Tags that already contain the fix are marked.
| Line | Code match per tag | Tests |
|---|---|---|
| 2.4.6 | 2.4.6 file-missing 2.4.6-p1 file-missing 2.4.6-p2 file-missing 2.4.6-p3 file-missing 2.4.6-p4 file-missing 2.4.6-p5 file-missing 2.4.6-p6 file-missing 2.4.6-p7 file-missing 2.4.6-p8 file-missing 2.4.6-p9 file-missing 2.4.6-p10 file-missing 2.4.6-p11 file-missing 2.4.6-p12 file-missing 2.4.6-p13 file-missing 2.4.6-p14 file-missing 2.4.6-p15 file-missing | 2.4.6: no test data 2.4.6-p1: no test data 2.4.6-p2: no test data 2.4.6-p3: no test data 2.4.6-p4: no test data 2.4.6-p5: no test data 2.4.6-p6: no test data 2.4.6-p7: no test data 2.4.6-p8: no test data 2.4.6-p9: no test data 2.4.6-p10: no test data 2.4.6-p11: no test data 2.4.6-p12: no test data 2.4.6-p13: no test data 2.4.6-p14: no test data 2.4.6-p15: no test data |
| 2.4.7 | 2.4.7 clean 2.4.7-p1 clean 2.4.7-p2 clean 2.4.7-p3 clean 2.4.7-p4 clean 2.4.7-p5 clean 2.4.7-p6 clean 2.4.7-p7 clean 2.4.7-p8 clean 2.4.7-p9 clean 2.4.7-p10 clean | 2.4.7: no test data 2.4.7-p1: no test data 2.4.7-p2: no test data 2.4.7-p3: no test data 2.4.7-p4: no test data 2.4.7-p5: no test data 2.4.7-p6: no test data 2.4.7-p7: no test data 2.4.7-p8: no test data 2.4.7-p9: no test data 2.4.7-p10: no test data |
| 2.4.8 | 2.4.8 conflictcontains the fix 2.4.8-p1 conflictcontains the fix 2.4.8-p2 conflictcontains the fix 2.4.8-p3 conflictcontains the fix 2.4.8-p4 conflictcontains the fix 2.4.8-p5 conflictcontains the fix | 2.4.8: no test data 2.4.8-p1: no test data 2.4.8-p2: no test data 2.4.8-p3: no test data 2.4.8-p4: no test data 2.4.8-p5: no test data |
| 2.4.9 | 2.4.9 conflictcontains the fix | 2.4.9: no test data |
Triage
Model @cf/cloudflare/clef. Probability this is a bug fix: 98.2%. Probability it is security relevant: 1.0%.
Show the model's answers and probabilities
| Question | Answer | Probabilities | Confidence |
|---|---|---|---|
| Change kind | bugfix | bugfix 97.0%, refactor 1.1%, tests_only 0.5%, feature 0.5%, dependency 0.5%, docs_only 0.4% | 92.9% |
| Area | graphql_api | graphql_api 93.5%, customer 3.5%, catalog 1.0% | 85.8% |
| Reported version | 2.4.7 | 2.4.7 61.7%, 2.4.7-p1 1.5%, 2.4.7-p7 1.3% | 37.6% |
| Scope | 0.17 of 2 | 0 86.3%, 1 10.8%, 2 2.9% | 63.6% |
| Risk | 0.14 of 2 | 0 89.5%, 1 6.6%, 2 3.9% | 70.9% |
| Worth backporting | 1.73 of 2 | 2 78.6%, 1 15.9%, 0 5.5% | 47.0% |
Download
For cweagans/composer-patches, choose a version below and download the bundle. Copy its magento2-38663/ folder into patches/composer/, merge composer.patches.json into composer.json, then run composer install. Test files are always removed; paths are relative to each package root, using the default -p1 level.
Bundle README (what the ZIP ships)
# magento2-38663 Community fix merged upstream into magento/magento2, adapted by magento.watch. This is not a patch published by Adobe. Pull request: https://github.com/magento/magento2/pull/38663 Issue: https://github.com/magento/magento2/issues/38662 Author: @Nuranto Source commit: 2235083ee87c25e46005be47fdcc4f5a28a838e6 Modifications: test files and documentation removed, paths rewritten relative to each Composer package. Licence: OSL-3.0 / AFL-3.0, as the original Magento Open Source code. Maintainer: Łukasz Bajsarowicz (@lbajsarowicz)
Licence: Magento Open Source code under OSL-3.0 and AFL-3.0. The bundle carries the original author, source commit and the list of modifications.
