Yii Framework Forum: Removing yii2-Debugging-Symbol - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Removing yii2-Debugging-Symbol [solved]

#1 User is offline   tklustig 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 303
  • Joined: 20-April 17
  • Location:Hannover

Posted 29 December 2017 - 05:51 PM

Hi guys,
although being in developpment modus, i intend to remove debugging symbol, which is at bottom right corner of screen(see Screenshot: Application.jpg) I have no idea, where this symbol comes from. Here is code:

[size=3]<?php
[size=3]use yii\helpers\Html;
[size=3]use common\wsl_components\AdminLteAsset;
[size=3]AdminLteAsset::register($this);
[size=3]?>
[size=3]<?php $this->beginPage() ?>
[size=3]<!DOCTYPE html>
[size=3]<html lang="<?= Yii::$app->language ?>">
[size=3]    <head>
[size=3]        <meta charset="<?= Yii::$app->charset ?>"/>
[size=3]        <meta name="viewport" content="width=device-width, initial-scale=1">
[size=3]        <?= Html::csrfMetaTags() ?>
[size=3]        <title><?= Html::encode($this->title) ?></title>
[size=3]        <?php $this->head() ?>
[size=3]    </head>
[size=3]    <body class="hold-transition skin-blue sidebar-mini">
[size=3]        <?php $this->beginBody() ?>
[size=3]        <div class="wrapper">
[size=3]            <?=
[size=3]            $this->render(
[size=3]                    'header.php'
[size=3]            )
[size=3]            ?>
[size=3]            <?=
[size=3]            $this->render(
[size=3]                    'left.php'
[size=3]            )
[size=3]            ?>
[size=3]            <?=
[size=3]            $this->render(
[size=3]                    'content.php', ['content' => $content]
[size=3]            )
[size=3]            ?>
[size=3]        </div>
[size=3]        <?php $this->endBody() ?>
[size=3]    </body>
[size=3]</html>
[size=3]<?php $this->endPage() ?>


Any ideas,how to remove this symbol?

Attached File(s)


0

#2 User is offline   alrazi 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,533
  • Joined: 08-August 12
  • Location:Durban, South Africa

Posted 30 December 2017 - 02:11 AM

comment out the debug module in config/web.php remove the following section or comment it out

$config['bootstrap'][] = 'debug';
$config['modules']['debug'] = [
    'class' => 'yii\debug\Module',
    // uncomment the following to add your IP if you are not connecting from localhost.
    //'allowedIPs' => ['127.0.0.1', '::1'],
];

1

#3 User is offline   softark 

  • Keep It Simple
  • Yii
  • Group: Moderators
  • Posts: 3,500
  • Joined: 16-February 11
  • Location:Japan

Posted 30 December 2017 - 08:28 PM

The toolbar with debug icon at the bottom of the screen is generated dynamically by yii2-debug module's javascript. So there's no way other than disabling the yii2-debug module if you want to remove the debug icon. That's what @alrazi says implies.

But I would like to recommend that you keep it enabled in the debug mode.
The yii2-debug module is a very convenient tool for developing yii2 web app. Especially useful is the capability that shows all the database queries that are executed in the current page.

For example:
Attached File  yii-1.png (132.17K)
Number of downloads: 2
Clicking on the "DB" button, you'll see the following:
Attached File  yii-2.png (129.33K)
Number of downloads: 2
1

#4 User is offline   tklustig 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 303
  • Joined: 20-April 17
  • Location:Hannover

Posted 30 December 2017 - 09:59 PM

View Postsoftark, on 30 December 2017 - 08:28 PM, said:

The toolbar with debug icon at the bottom of the screen is generated dynamically by yii2-debug module's javascript. So there's no way other than disabling the yii2-debug module if you want to remove the debug icon. That's what @alrazi says implies.

But I would like to recommend that you keep it enabled in the debug mode.
The yii2-debug module is a very convenient tool for developing yii2 web app. Especially useful is the capability that shows all the database queries that are executed in the current page.

For example:
Attachment yii-1.png
Clicking on the "DB" button, you'll see the following:
Attachment yii-2.png


So, this debug icon will be removed in RelaseVersion, 'cause I will deactivate debug modus in RelaseVersion of course, but not in development modus,'cause I need debug modus there. Is that correct?
0

#5 User is offline   softark 

  • Keep It Simple
  • Yii
  • Group: Moderators
  • Posts: 3,500
  • Joined: 16-February 11
  • Location:Japan

Posted 30 December 2017 - 10:04 PM

Yes, you are right.
0

#6 User is offline   tklustig 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 303
  • Joined: 20-April 17
  • Location:Hannover

Posted 31 December 2017 - 07:58 AM

View Postsoftark, on 30 December 2017 - 10:04 PM, said:

Yes, you are right.

Okay. Thx for both, arazi and softdark.
This thread can be closed as succesfully solved



0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users