Complex UI component, using dynamic rows in admin, for a product attribute, is not saving when removing all rowsMagento 2 Adminhtml spreading forms across multiple tabsHow to access the last added element in a dynamic rows componentMagento 2 - Dynamic rows based on related products modal grid on custom form with tabsHow to create a simple Dynamic rows in admin using Data Provider?Magento 2 - insertListing ui componentMagento 2.2.0 : TypeError: element.getRecordCount is not a function in dynamic rows in admin formAn Error while add a complex component modal as insertlisting for add dynamic row in my ui-component admin formCreating admin grid for custom eav model using ui componentError is showing saved data from database and display in dynamic row grid Magento 2Dynamic Rows can not delete in edit form in admin magento 2

Does this smartphone photo show Mars just below the Sun?

Is space radiation a risk for space film photography, and how is this prevented?

Why do proponents of guns oppose gun competency tests?

Should I take out a personal loan to pay off credit card debt?

Did the Sith know of Force ghosts?

How to continue a line in Latex in math mode?

is it possible to terraform a planet made of human excrement into habitable planet?

How to halve redstone signal strength?

Is Network I/O included in the timings for "RPC complete" seen in SQL Profiler?

The heat content of the products is more than that of the reactant in an ............. reaction

Is it true that control+alt+delete only became a thing because IBM would not build Bill Gates a computer with a task manager button?

Repeated! Factorials!

Will a paper be retracted if a flaw in released software code invalidates its central idea?

How many years before enough atoms of your body are replaced to survive the sudden disappearance of the original body’s atoms?

Onenote - Reducing Storage Footprint on PC

Was Richard I's imprisonment by Leopold of Austria justified?

Secure my password from unsafe servers

How to realistically deal with a shield user?

Does the length of a password for Wi-Fi affect speed?

How do I get the =LEFT function in excel, to also take the number zero as the first number?

Should I self-publish my novella on Amazon or try my luck getting publishers?

What is the German idiom or expression for when someone is being hypocritical against their own teachings?

Why do private jets such as Gulfstream fly higher than other civilian jets?

What is the bio-mechanical plausibility of a fox with venomous fangs?



Complex UI component, using dynamic rows in admin, for a product attribute, is not saving when removing all rows


Magento 2 Adminhtml spreading forms across multiple tabsHow to access the last added element in a dynamic rows componentMagento 2 - Dynamic rows based on related products modal grid on custom form with tabsHow to create a simple Dynamic rows in admin using Data Provider?Magento 2 - insertListing ui componentMagento 2.2.0 : TypeError: element.getRecordCount is not a function in dynamic rows in admin formAn Error while add a complex component modal as insertlisting for add dynamic row in my ui-component admin formCreating admin grid for custom eav model using ui componentError is showing saved data from database and display in dynamic row grid Magento 2Dynamic Rows can not delete in edit form in admin magento 2






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















I created a complex product attribute entry in product admin, which uses dynamic rows.



Same idea as this core one:



enter image description here



UI works fine, but if you remove all rows, and save, the attribute does not update, and reloads back to the rows prior to removed. So, basically, you cannot clear out the rows/entries.



However, this example core one works 100%.



My entry is adjusted using UI Components modifiers, exactly like this core attribute is done.



https://github.com/magento/magento2/blob/2.3-develop/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/AdvancedPricing.php#L433



(they used a derived UI component called Magento_Catalog/js/components/dynamic-rows-tier-price in place of Magento_Catalog/js/components/dynamic-rows, but they are essentially the same. Tested as well by making my component use the same, which did not solve the issue (just in case)



So, essentially, we have ability to build these complex input components, but they cannot be cleared.










share|improve this question
































    2















    I created a complex product attribute entry in product admin, which uses dynamic rows.



    Same idea as this core one:



    enter image description here



    UI works fine, but if you remove all rows, and save, the attribute does not update, and reloads back to the rows prior to removed. So, basically, you cannot clear out the rows/entries.



    However, this example core one works 100%.



    My entry is adjusted using UI Components modifiers, exactly like this core attribute is done.



    https://github.com/magento/magento2/blob/2.3-develop/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/AdvancedPricing.php#L433



    (they used a derived UI component called Magento_Catalog/js/components/dynamic-rows-tier-price in place of Magento_Catalog/js/components/dynamic-rows, but they are essentially the same. Tested as well by making my component use the same, which did not solve the issue (just in case)



    So, essentially, we have ability to build these complex input components, but they cannot be cleared.










    share|improve this question




























      2












      2








      2


      1






      I created a complex product attribute entry in product admin, which uses dynamic rows.



      Same idea as this core one:



      enter image description here



      UI works fine, but if you remove all rows, and save, the attribute does not update, and reloads back to the rows prior to removed. So, basically, you cannot clear out the rows/entries.



      However, this example core one works 100%.



      My entry is adjusted using UI Components modifiers, exactly like this core attribute is done.



      https://github.com/magento/magento2/blob/2.3-develop/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/AdvancedPricing.php#L433



      (they used a derived UI component called Magento_Catalog/js/components/dynamic-rows-tier-price in place of Magento_Catalog/js/components/dynamic-rows, but they are essentially the same. Tested as well by making my component use the same, which did not solve the issue (just in case)



      So, essentially, we have ability to build these complex input components, but they cannot be cleared.










      share|improve this question
















      I created a complex product attribute entry in product admin, which uses dynamic rows.



      Same idea as this core one:



      enter image description here



      UI works fine, but if you remove all rows, and save, the attribute does not update, and reloads back to the rows prior to removed. So, basically, you cannot clear out the rows/entries.



      However, this example core one works 100%.



      My entry is adjusted using UI Components modifiers, exactly like this core attribute is done.



      https://github.com/magento/magento2/blob/2.3-develop/app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/AdvancedPricing.php#L433



      (they used a derived UI component called Magento_Catalog/js/components/dynamic-rows-tier-price in place of Magento_Catalog/js/components/dynamic-rows, but they are essentially the same. Tested as well by making my component use the same, which did not solve the issue (just in case)



      So, essentially, we have ability to build these complex input components, but they cannot be cleared.







      magento2 uicomponent dynamic-rows






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jul 29 at 5:49







      ProxiBlue

















      asked Jul 28 at 5:17









      ProxiBlueProxiBlue

      8,9583 gold badges26 silver badges54 bronze badges




      8,9583 gold badges26 silver badges54 bronze badges























          1 Answer
          1






          active

          oldest

          votes


















          1














          I am placing this answer, to allow someone having same issue get help.



          Investigating how magento core solves this issue (thinking I am missing something in my UI Component setup), I found this line of code:



          https://github.com/magento/magento2/blob/2.3-develop/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper.php#L202



          $productData['tier_price'] = isset($productData['tier_price']) ? $productData['tier_price'] : [];



          So, seems like this issue is solved (by core) as part of the product data initialisation



          Essentially, the issue is that since the attribute contains no data, at saving, it is not in the POST data, so is not handled.



          That line of code solves this.



          The solution I did was to place a before interceptor to the initializeFromData method, and handle my own attribute the same.



          Personally, I think this stinks. The UI component system should have a way to deal with this, and not need to place such code.






          share|improve this answer





























            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
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f283555%2fcomplex-ui-component-using-dynamic-rows-in-admin-for-a-product-attribute-is-n%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









            1














            I am placing this answer, to allow someone having same issue get help.



            Investigating how magento core solves this issue (thinking I am missing something in my UI Component setup), I found this line of code:



            https://github.com/magento/magento2/blob/2.3-develop/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper.php#L202



            $productData['tier_price'] = isset($productData['tier_price']) ? $productData['tier_price'] : [];



            So, seems like this issue is solved (by core) as part of the product data initialisation



            Essentially, the issue is that since the attribute contains no data, at saving, it is not in the POST data, so is not handled.



            That line of code solves this.



            The solution I did was to place a before interceptor to the initializeFromData method, and handle my own attribute the same.



            Personally, I think this stinks. The UI component system should have a way to deal with this, and not need to place such code.






            share|improve this answer































              1














              I am placing this answer, to allow someone having same issue get help.



              Investigating how magento core solves this issue (thinking I am missing something in my UI Component setup), I found this line of code:



              https://github.com/magento/magento2/blob/2.3-develop/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper.php#L202



              $productData['tier_price'] = isset($productData['tier_price']) ? $productData['tier_price'] : [];



              So, seems like this issue is solved (by core) as part of the product data initialisation



              Essentially, the issue is that since the attribute contains no data, at saving, it is not in the POST data, so is not handled.



              That line of code solves this.



              The solution I did was to place a before interceptor to the initializeFromData method, and handle my own attribute the same.



              Personally, I think this stinks. The UI component system should have a way to deal with this, and not need to place such code.






              share|improve this answer





























                1












                1








                1







                I am placing this answer, to allow someone having same issue get help.



                Investigating how magento core solves this issue (thinking I am missing something in my UI Component setup), I found this line of code:



                https://github.com/magento/magento2/blob/2.3-develop/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper.php#L202



                $productData['tier_price'] = isset($productData['tier_price']) ? $productData['tier_price'] : [];



                So, seems like this issue is solved (by core) as part of the product data initialisation



                Essentially, the issue is that since the attribute contains no data, at saving, it is not in the POST data, so is not handled.



                That line of code solves this.



                The solution I did was to place a before interceptor to the initializeFromData method, and handle my own attribute the same.



                Personally, I think this stinks. The UI component system should have a way to deal with this, and not need to place such code.






                share|improve this answer















                I am placing this answer, to allow someone having same issue get help.



                Investigating how magento core solves this issue (thinking I am missing something in my UI Component setup), I found this line of code:



                https://github.com/magento/magento2/blob/2.3-develop/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper.php#L202



                $productData['tier_price'] = isset($productData['tier_price']) ? $productData['tier_price'] : [];



                So, seems like this issue is solved (by core) as part of the product data initialisation



                Essentially, the issue is that since the attribute contains no data, at saving, it is not in the POST data, so is not handled.



                That line of code solves this.



                The solution I did was to place a before interceptor to the initializeFromData method, and handle my own attribute the same.



                Personally, I think this stinks. The UI component system should have a way to deal with this, and not need to place such code.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Jul 29 at 6:45

























                answered Jul 28 at 5:21









                ProxiBlueProxiBlue

                8,9583 gold badges26 silver badges54 bronze badges




                8,9583 gold badges26 silver badges54 bronze badges






























                    draft saved

                    draft discarded
















































                    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.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f283555%2fcomplex-ui-component-using-dynamic-rows-in-admin-for-a-product-attribute-is-n%23new-answer', 'question_page');

                    );

                    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







                    Popular posts from this blog

                    Grendel Contents Story Scholarship Depictions Notes References Navigation menu10.1093/notesj/gjn112Berserkeree

                    Area configuration aggregation error after install Porto themeMagento 2.1 CE Installed but front/backend not loading/workingCSS not loading on page within Magento 2 pageCannot install module in Magento 2no commands defined in the “setup” namespace. in Magento2Magento 2: Static files are present but shows 404Why do i have to always run the commands to clean cache in Magento 2.1.8?Failure reason: 'Unable to unserialize value.'Error 500 after magento migrationIn production mode the site does not loadMagento 2 : Error 500 after installing

                    Middle Expansion Olielle Resaix Definition: Uttering songs of triumph shouting with joy triumphant exulting Sejunction Journal 붙다 달 고급 품목 외출 The stretch trades the screeching tin. Definition: The act of speaking with a drawl a drawl Cough Sand Definition: An uproar a quarrel a noisy outbreak Shake Iron Publicize Horse House Baby 사과 Resaix Flaggy Jelly Temporary Unequaled Puppet A drop in the bucket Shrew 성격 회원 성질 미팅 The burn frames the tacky quality. Materialistic The smoke reduces the way. Yammoe Nondescript Cheek 얼굴 배 약하다 날리다 타다 The illegal country shows the iron. Help Rule Drearien Smoke Teaching Meaty Wasp Abraham Lincoln Jaws 진심 수리하다 Size Cork Idea Convert Think Lark John Lennon 거울 청소 군 추천하다 아이스크림