Uncaught TypeError: Cannot read property 'apply' of undefined at Function.ko.observableArray.fn.(anonymous function) [as push]Magento 2 - jsError - Cannot read property 'autocomplete' of undefinedCannot read property `scopeLabel` of undefined on Product Detail PageKnockoutJS cannot read property 'fromJS' of undefinedMagento 2: Uncaught TypeError: Cannot read property '*' of undefined in (section-config.js:33)Cannot read property 'RFC_2822' of undefinedjQuery UI breaks when clicking on draggable element: “Cannot read property 'defaultView' of undefined”Uncaught TypeError: Cannot read property 'top' of undefined at step-navigator.jsPassword Strength Meter - Uncaught TypeError: Cannot read property 'toLowerCase' of undefinedMagento 2.3 | Knockout.js - Unexpected end of inputMagento 2.2.5 - Uncaught TypeError: Cannot read property 'dialog' of undefined
1025th term of the given sequence.
How did pilots avoid thunderstorms and related weather before “reliable” airborne weather radar was introduced on airliners?
Found more old paper shares from broken up companies
Is there an English word to describe when a sound "protrudes"?
Book in which the "mountain" in the distance was a hole in the flat world
Why Lie algebras if what we care about in physics are groups?
Oriented vector bundle with odd-dimensional fibers
Can "Taking algebraic closure" be made into a functor?
What does the following chess proverb mean: "Chess is a sea where a gnat may drink from and an elephant may bathe in."
Plotting maxima within a simplex
Count the identical pairs in two lists
How to handle not being able to attend as often as I'd like
Reissue US, UK, Canada visas in stolen passports
Why does the salt in the oceans not sink to the bottom?
What does a Nintendo Game Boy do when turned on without a game cartridge inserted?
Calculating Fibonacci sequence in several different ways
How does mathematics work?
What kind of curve (or model) should I fit to my percentage data?
As the Ferris wheel turns
How can I remove studs and screws from the inside of drywall when installing a pocket door without needing to do paint and patch work on both sides?
Function pointer parameter without asterisk
Is there any direct train from LHR Airport to Newcastle Gateshead?
Why are Oscar, India, and X-Ray (O, I, and X) not used as taxiway identifiers?
Has Iron Man made any suit for underwater combat?
Uncaught TypeError: Cannot read property 'apply' of undefined at Function.ko.observableArray.fn.(anonymous function) [as push]
Magento 2 - jsError - Cannot read property 'autocomplete' of undefinedCannot read property `scopeLabel` of undefined on Product Detail PageKnockoutJS cannot read property 'fromJS' of undefinedMagento 2: Uncaught TypeError: Cannot read property '*' of undefined in (section-config.js:33)Cannot read property 'RFC_2822' of undefinedjQuery UI breaks when clicking on draggable element: “Cannot read property 'defaultView' of undefined”Uncaught TypeError: Cannot read property 'top' of undefined at step-navigator.jsPassword Strength Meter - Uncaught TypeError: Cannot read property 'toLowerCase' of undefinedMagento 2.3 | Knockout.js - Unexpected end of inputMagento 2.2.5 - Uncaught TypeError: Cannot read property 'dialog' of undefined
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have created a custom attribute(multiselect) for product with the same filter type as category selection on Magento 2. Attribute selection is working fine when creating a new product however it is not working on edit form. I have noticed below error from knockout js on console.
knockout.js:1449 Uncaught TypeError: Cannot read property 'apply' of undefined at Function.ko.observableArray.fn.(anonymous function) [as push]
Also I have attached the screenshots of the error I am facing.
A help to fix this issue would be much appreciated.
magento2 knockoutjs
add a comment |
I have created a custom attribute(multiselect) for product with the same filter type as category selection on Magento 2. Attribute selection is working fine when creating a new product however it is not working on edit form. I have noticed below error from knockout js on console.
knockout.js:1449 Uncaught TypeError: Cannot read property 'apply' of undefined at Function.ko.observableArray.fn.(anonymous function) [as push]
Also I have attached the screenshots of the error I am facing.
A help to fix this issue would be much appreciated.
magento2 knockoutjs
any luck? i had the same after magento upgrade 2.2.2
– Antonio Pedicini
Dec 28 '17 at 14:14
add a comment |
I have created a custom attribute(multiselect) for product with the same filter type as category selection on Magento 2. Attribute selection is working fine when creating a new product however it is not working on edit form. I have noticed below error from knockout js on console.
knockout.js:1449 Uncaught TypeError: Cannot read property 'apply' of undefined at Function.ko.observableArray.fn.(anonymous function) [as push]
Also I have attached the screenshots of the error I am facing.
A help to fix this issue would be much appreciated.
magento2 knockoutjs
I have created a custom attribute(multiselect) for product with the same filter type as category selection on Magento 2. Attribute selection is working fine when creating a new product however it is not working on edit form. I have noticed below error from knockout js on console.
knockout.js:1449 Uncaught TypeError: Cannot read property 'apply' of undefined at Function.ko.observableArray.fn.(anonymous function) [as push]
Also I have attached the screenshots of the error I am facing.
A help to fix this issue would be much appreciated.
magento2 knockoutjs
magento2 knockoutjs
asked Sep 9 '17 at 5:05
user50326user50326
211 bronze badge
211 bronze badge
any luck? i had the same after magento upgrade 2.2.2
– Antonio Pedicini
Dec 28 '17 at 14:14
add a comment |
any luck? i had the same after magento upgrade 2.2.2
– Antonio Pedicini
Dec 28 '17 at 14:14
any luck? i had the same after magento upgrade 2.2.2
– Antonio Pedicini
Dec 28 '17 at 14:14
any luck? i had the same after magento upgrade 2.2.2
– Antonio Pedicini
Dec 28 '17 at 14:14
add a comment |
1 Answer
1
active
oldest
votes
The reason this probably fails is because you are retrieving data from database as a string.
You should edit your DataProvider ( Namespace/Module/Model/Test/DataProvider.php
) and change the getData()
method with something like
foreach ($items as $test)
...
$this->loadedData[$test->getId()] = $test->getData();
$customAttributes = ['Test1', 'Test2']; // here you should do your own retrieving of data from the database
$this->loadedData[$test->getId()]['custom_attribute'] = $customAttributes;
...
return $this->loadedData;
This did the trick for me because I add the multiselect in a UI component that relies on a DataProvider.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f192599%2funcaught-typeerror-cannot-read-property-apply-of-undefined-at-function-ko-obs%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The reason this probably fails is because you are retrieving data from database as a string.
You should edit your DataProvider ( Namespace/Module/Model/Test/DataProvider.php
) and change the getData()
method with something like
foreach ($items as $test)
...
$this->loadedData[$test->getId()] = $test->getData();
$customAttributes = ['Test1', 'Test2']; // here you should do your own retrieving of data from the database
$this->loadedData[$test->getId()]['custom_attribute'] = $customAttributes;
...
return $this->loadedData;
This did the trick for me because I add the multiselect in a UI component that relies on a DataProvider.
add a comment |
The reason this probably fails is because you are retrieving data from database as a string.
You should edit your DataProvider ( Namespace/Module/Model/Test/DataProvider.php
) and change the getData()
method with something like
foreach ($items as $test)
...
$this->loadedData[$test->getId()] = $test->getData();
$customAttributes = ['Test1', 'Test2']; // here you should do your own retrieving of data from the database
$this->loadedData[$test->getId()]['custom_attribute'] = $customAttributes;
...
return $this->loadedData;
This did the trick for me because I add the multiselect in a UI component that relies on a DataProvider.
add a comment |
The reason this probably fails is because you are retrieving data from database as a string.
You should edit your DataProvider ( Namespace/Module/Model/Test/DataProvider.php
) and change the getData()
method with something like
foreach ($items as $test)
...
$this->loadedData[$test->getId()] = $test->getData();
$customAttributes = ['Test1', 'Test2']; // here you should do your own retrieving of data from the database
$this->loadedData[$test->getId()]['custom_attribute'] = $customAttributes;
...
return $this->loadedData;
This did the trick for me because I add the multiselect in a UI component that relies on a DataProvider.
The reason this probably fails is because you are retrieving data from database as a string.
You should edit your DataProvider ( Namespace/Module/Model/Test/DataProvider.php
) and change the getData()
method with something like
foreach ($items as $test)
...
$this->loadedData[$test->getId()] = $test->getData();
$customAttributes = ['Test1', 'Test2']; // here you should do your own retrieving of data from the database
$this->loadedData[$test->getId()]['custom_attribute'] = $customAttributes;
...
return $this->loadedData;
This did the trick for me because I add the multiselect in a UI component that relies on a DataProvider.
answered Mar 26 '18 at 10:55
tuxilinatuxilina
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f192599%2funcaught-typeerror-cannot-read-property-apply-of-undefined-at-function-ko-obs%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
any luck? i had the same after magento upgrade 2.2.2
– Antonio Pedicini
Dec 28 '17 at 14:14