Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[3.0.0] partialProductPublish shouldn't throw an error for not yet pulished Products #6051

@janus-reith

Description

@janus-reith

Each time the configuration of an inventory item changes, an event afterInventoryUpdate is emitted. The startup function of the core inventory plugin will listen for these events and call partialProductPublish for the configuration.

There are cases when an inventory status could be updated before a product is published, resulting in an error about the failing desctructure from catalogItem;

Possible Solution

After searching for the catalog product in partialProductPublish, simply skip if nothing is found, or just Log and info that publish was skipped. Another option might be to differentiate between implicit and explicit calls using the startFrom parameter, although "inventory" is the only value this is currently called with.

Versions

release-3.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugFor issues that describe a defect or regression in the released software

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions