Swatches disappearing












0















In the table eav_attribute_option_swatch (the one that holds the swatch options for the attributes) I have about 6k records.

Some are color codes, others are paths to images and most of them are null (in the value column).

But something, somewhere, sometime, somehow, deletes them and I don't know what, where, when or how.

It one point I randomly realize that in the frontend the configurable products don't show swatches anymore and I can see a regular dropdown with the options.

The table is not completely cleared. So far when it happened, there were somewhere between 1 and 10 records remaining. I could not find anything special about these except for one. There is always a record with option_id = 0. (not sure if relevant).



The main problem is not that it happens. The problem is that I cannot reproduce it.

What I've tried so far:




  • Save random attributes that have or don't have swatches.

  • Saved the attribute with the most options (2k+). I thought it may have something to do with max post size or max input vars. This works as expected.

  • Delete one attribute.

  • Delete one option

  • Delete and add a swatch at the same time.

  • Changed the attribute type from swatch to something else.

  • ... and back to swatch

  • Banging my head on the table.


None of the above helped (specially the last one).



I'm not looking for a full solution, though that would be great.

I need other examples (code or actions) that might touch the eav_attribute_option_swatch table.









share





























    0















    In the table eav_attribute_option_swatch (the one that holds the swatch options for the attributes) I have about 6k records.

    Some are color codes, others are paths to images and most of them are null (in the value column).

    But something, somewhere, sometime, somehow, deletes them and I don't know what, where, when or how.

    It one point I randomly realize that in the frontend the configurable products don't show swatches anymore and I can see a regular dropdown with the options.

    The table is not completely cleared. So far when it happened, there were somewhere between 1 and 10 records remaining. I could not find anything special about these except for one. There is always a record with option_id = 0. (not sure if relevant).



    The main problem is not that it happens. The problem is that I cannot reproduce it.

    What I've tried so far:




    • Save random attributes that have or don't have swatches.

    • Saved the attribute with the most options (2k+). I thought it may have something to do with max post size or max input vars. This works as expected.

    • Delete one attribute.

    • Delete one option

    • Delete and add a swatch at the same time.

    • Changed the attribute type from swatch to something else.

    • ... and back to swatch

    • Banging my head on the table.


    None of the above helped (specially the last one).



    I'm not looking for a full solution, though that would be great.

    I need other examples (code or actions) that might touch the eav_attribute_option_swatch table.









    share



























      0












      0








      0








      In the table eav_attribute_option_swatch (the one that holds the swatch options for the attributes) I have about 6k records.

      Some are color codes, others are paths to images and most of them are null (in the value column).

      But something, somewhere, sometime, somehow, deletes them and I don't know what, where, when or how.

      It one point I randomly realize that in the frontend the configurable products don't show swatches anymore and I can see a regular dropdown with the options.

      The table is not completely cleared. So far when it happened, there were somewhere between 1 and 10 records remaining. I could not find anything special about these except for one. There is always a record with option_id = 0. (not sure if relevant).



      The main problem is not that it happens. The problem is that I cannot reproduce it.

      What I've tried so far:




      • Save random attributes that have or don't have swatches.

      • Saved the attribute with the most options (2k+). I thought it may have something to do with max post size or max input vars. This works as expected.

      • Delete one attribute.

      • Delete one option

      • Delete and add a swatch at the same time.

      • Changed the attribute type from swatch to something else.

      • ... and back to swatch

      • Banging my head on the table.


      None of the above helped (specially the last one).



      I'm not looking for a full solution, though that would be great.

      I need other examples (code or actions) that might touch the eav_attribute_option_swatch table.









      share
















      In the table eav_attribute_option_swatch (the one that holds the swatch options for the attributes) I have about 6k records.

      Some are color codes, others are paths to images and most of them are null (in the value column).

      But something, somewhere, sometime, somehow, deletes them and I don't know what, where, when or how.

      It one point I randomly realize that in the frontend the configurable products don't show swatches anymore and I can see a regular dropdown with the options.

      The table is not completely cleared. So far when it happened, there were somewhere between 1 and 10 records remaining. I could not find anything special about these except for one. There is always a record with option_id = 0. (not sure if relevant).



      The main problem is not that it happens. The problem is that I cannot reproduce it.

      What I've tried so far:




      • Save random attributes that have or don't have swatches.

      • Saved the attribute with the most options (2k+). I thought it may have something to do with max post size or max input vars. This works as expected.

      • Delete one attribute.

      • Delete one option

      • Delete and add a swatch at the same time.

      • Changed the attribute type from swatch to something else.

      • ... and back to swatch

      • Banging my head on the table.


      None of the above helped (specially the last one).



      I'm not looking for a full solution, though that would be great.

      I need other examples (code or actions) that might touch the eav_attribute_option_swatch table.







      magento2 database magento2.2.6 swatches





      share














      share












      share



      share








      edited just now







      Marius

















      asked 8 mins ago









      MariusMarius

      164k28312663




      164k28312663






















          0






          active

          oldest

          votes











          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%2f258220%2fswatches-disappearing%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          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%2f258220%2fswatches-disappearing%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

          Magento 2 controller redirect on button click in phtml file

          Polycentropodidae