after upgrade problems "bgColor"


  • Translator

    Please can someone explain how I in the mongo database "objects"
    must proceed to find the problem?

    is there a category without bgColor?
    Can I just delete the category when I find them?
    I think it best?

    or can I intercept the code "zero"? probably not ..

    Bildschirmfoto vom 2015-09-27 11:12:48.png


  • Admin

    That should be fixed in core, please post your git commit hash. Looks like a undefined category is passed to the helper. Also specify what route this is happening on.


  • Translator

    I'm doing a git commit.

    I have a request if else in the helpers.js

      if (category.bgColor) {
           style.push ('background-color:' + category.bgColor);
     } else {
          console.log ('no bgColor');
     }
    

    that will not do.

    but perhaps a negative query

     if (! category.bgColor || category.bgColor == NULL) {
          // Console.log ('no bgColor');
          style.push ('background-color: #fff');
     } else {
          style.push ('background-color:' + category.bgColor);
     }
    

    I tried only the first variant.


Log in to reply
 


Looks like your connection to NodeBB was lost, please wait while we try to reconnect.