Skip to content

Fixed: error in creating category image content. (OFBIZ-12011) - #1694

Open
rehan3586 wants to merge 1 commit into
apache:trunkfrom
rehan3586:OFBIZ-12011
Open

Fixed: error in creating category image content. (OFBIZ-12011)#1694
rehan3586 wants to merge 1 commit into
apache:trunkfrom
rehan3586:OFBIZ-12011

Conversation

@rehan3586

Copy link
Copy Markdown
Contributor

Fixed: error in creating category image content
(OFBIZ-12011)

Explanation: the root cause was essentially a combination of incorrect parameter/field handling and missing ID propagation between the services involved in the category image upload process.

The fix ensures that the uploaded image is correctly received, its data resource is maintained, the generated content remains identifiable, and any service failure is properly surfaced

Thanks:
Aakash Jain for reporting the issue.

createCategoryContent.contentId = creConRes.contentId

createCategoryContent.contentId = parameters.contentId
run service: 'createCategoryContent', with: createCategoryContent
Map createCategoryResult = run service: 'createCategoryContent', with: createCategoryContent

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should add service response handling here for the createCategoryContent call because if the service fails, the contentId will be added to the createCategoryResult, which is an error result.
Also, the contentId is optional=false in the service definition of this service, as it has to be returned properly in case of success.
Please check if this is properly handled here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants