Skip to content

Unable to assign more sources to stock in inventory/stock/edit  #2238

@willtran

Description

@willtran

Preconditions (*)

  1. Magento MSI
  2. At least 2 sources
  3. Create a new stock with 1 or more initial sources.

Steps to reproduce (*)

  1. On page load there is a javascript error:
    Uncaught TypeError: Unable to process binding "click: function(){return $data.deleteRecord.bind($data,$record().index,$record().recordId) }" Message: Cannot read property 'bind' of undefined
  2. Proceed to the admin to edit stock, click on assign sources button.
  3. Select any number of Stock Source to add
  4. Click done, there will be a javascript error:
    Uncaught TypeError: Unable to process binding "if: function(){return elem.template }" Message: Unable to process binding "template: function(){return elem.template }" Message: Unable to process binding "click: function(){return $data.deleteRecord.bind($data,$record().index,$record().recordId) }" Message: Cannot read property 'bind' of undefined
    The loading wheel never stop if more than 1 source is selected in step 3.
  5. Click Save to save Stock. The /inventory/stock/save controller will return fatal error:

Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Inventory\Model\StockSourceLink::setPriority() must be of the type integer or null, string given

Expected result (*)

  1. Admin user should be able to assign more sources to stock

Actual result (*)

  1. JavaScript error prevented adding / sorting and saving stock with newly assigned source(s)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions