Yii Framework Forum: Found Two Yii 2.0 Bugs With Gii - Yii Framework Forum

Jump to content

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

Found Two Yii 2.0 Bugs With Gii Rate Topic: -----

#1 User is offline   djtech 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 18
  • Joined: 11-November 10

Posted 09 May 2014 - 10:16 AM

While playing with Yii 2.0, I have identified two problems with Gii.

Bug 1
You will never be able to connect to Gii from a host other than localhost. As per documentation, you should modify the allowedIPs array as follows:
'gii' => [
    'class' => 'yii\gii\Module',
    'allowedIPs' => ['127.0.0.1', '::1', '192.168.0.*', '192.168.178.20'] // adjust this to your needs
],


This does not work. The temporary solution I found was to update the @vendor/yiisoft/yii2-gii/Module.php file and adjust the public attribute as:
public $allowedIPs = ['127.0.0.1', '::1', '192.168.1.*','69.123.296.114']; //adjust this to your needs for now.


Bug 2
The CRUD generator creates the wrong Namespace in the controllers it generates using "app" instead of "frontend":

//incorrectly created by gii:
namespace app\controllers;

//corrected namespace:
namespace frontend\controllers;


I hope this helps anyone encountering gii issues with yii2.
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