1

I got the Gii module working but when I try to create a Model using the generator, I click preview, the page refreshes but nothing happens - no generate button, no warning, no error and nothing in the logs.

Any advice or comment very appreciated.

EDIT : Preview is null and it seems to be the issue. Could anyone post what he has in the debugger ? thanks.

Preview is null !??

kfa
  • 2,106
  • 4
  • 17
  • 22

2 Answers2

2

You just have to first click Preview, it will show you which files it will build. Then, click Generate.

After you click Preview, following table will acquire under the Preview, then you have to choose the files to build:

enter image description here

Bfcm
  • 2,686
  • 2
  • 27
  • 34
  • Hey thanks for the answer bfcm, I did... The page just reloads and nothing happens – kfa May 19 '15 at 11:52
  • I see. That's not the normal behavior of Gii. Unfortunately can not help further except advicing to try reinstall Gii/Yii. – Bfcm May 19 '15 at 12:04
0

Ok fixed it.

If you have such problem open /vendor/yiisoft/yii2-gii/views/default/view/view.php and append a value attribute to the buttons.

Works like a charm.

Cheers.

enter image description here

kfa
  • 2,106
  • 4
  • 17
  • 22
  • It's just a temporary hack, you will lose these changes on the next `composer update`. Remember, you should not modify any files in`vendor` folder. – arogachev May 19 '15 at 16:15
  • And as for the code - it's better to insert it as text instead of image. – arogachev May 19 '15 at 16:27
  • Thank you arogachev. You're absolutely right, this is a temporary hack but necessary if you want to use the generator at this stage... Unless I absolutely have to, I won't change any vendor files. – kfa May 20 '15 at 10:59