skip to Main Content

I can’t figure out what’s wrong. After moving my site and upgrading Yii to a more recent version, the glyphicons no longer display properly in GridView.

I’m using Yii 2.0.29 with PHP 7.3.

My bootstrap line in composer.json file is

"yiisoft/yii2-bootstrap": "~2.0.0"

Here’s a screenshot of what appears

Gridview Screenshot

2

Answers


  1. I think this is because of bootstrap 4!

    > See the Migrating to v4, Components

    You can do one of the following:

    .glyphicon {
        font-family: "Font Awesome 5 Free";
        font-weight: 900;
    }
    
    .glyphicon-pencil::before {
        content: "f044";
    }
    
    .glyphicon-trash::before {
        content: "f2ed";
    }
    
    .glyphicon-eye-open::before {
        content: "f06e";
    }
    Login or Signup to reply.
  2. add old bootstrap.css’s @font-face and its glyphicons class to your new bootstrap.css . I mean you have old bootstrap in bower-asset and new bootstrap in your npm-asset and you have to first copy bower-asset/bootstrap/fonts folder to your npm-asset/bootstrap/dist/ and open npm-assets bootstrap.css and add old bootstrap.css’s @font-face object and glyphicon’s all object there
    then and check it !!!!!!!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search