Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"planet_b_building_id" default value #115

Closed
MahmutHizal opened this issue May 16, 2016 · 15 comments
Closed

"planet_b_building_id" default value #115

MahmutHizal opened this issue May 16, 2016 · 15 comments
Assignees
Labels
Bug Issues that is an error, bug or it is not working as expected Fixed Issues that after being labeled as Bug have been resolved
Milestone

Comments

@MahmutHizal
Copy link

i tried create first planet(first installation step), show this error:
|127.0.0.1|SQL Error|Database query failed: Field 'planet_b_building_id' doesn't have a default value Last SQL Query:
INSERT INTO xgp_planets SETplanet_name= 'unTouchabLe',planet_user_id= '1',planet_galaxy= '1',planet_system= '1',planet_planet= '1',planet_last_update= '1463431187',planet_type= '1',planet_image= 'trockenplanet08',planet_diameter= '10031',planet_field_max= '100',planet_temp_min= '184',planet_temp_max= '224',planet_metal= '500',planet_metal_perhour= '90',planet_crystal= '500',planet_crystal_perhour= '45',planet_deuterium= '0',planet_deuterium_perhour= '0';
|Where called: line 77 of application\core\Database
(in PlanetLib.php)|2016/05/16 23:39:47||

@BeReal86
Copy link
Member

@MahmutHizal
Hi, can you please explain in more detail?
Merhaba, lütfen daha ayrıntılı açıklar mısınız?

@MahmutHizal
Copy link
Author

Yeni kurulum yaptığım sırada böyle bi hata ile karşılaştım.

  • Veritabanı bağlantısı. Tamam
  • config.php dosyası oluşturuldu. Tamam
  • Tablolar oluşturuldu. Tamam
  • Yönetici hesabı oluşturuldu. Tamam
  • Yönetici gezegeni oluşturuldu. HATA

Bu hataya rağmen admin paneline eriştim ve admin panelinden yeni bir gezegen oluşturmayı denedim ancak aynı hata ile karşılaştım

I saw this issue when I trying to install

  • Database Connection. Done
  • Create config.php file. Done
  • Create database tables. Done
  • Create admin user. Done
  • Create admin planet(first planet in the game). ERROR

although this issue, i was access the admin panel. And tried to create a planet on admin area. But saw the same error

@BeReal86
Copy link
Member

BeReal86 commented May 16, 2016

@MahmutHizal Tek dilde yazmanız yeterlidir. İsterseniz ingilizce isterseniz türkçe iletiniz ben gerekli durumlarda ingilizceye yada ispanyolcaya çevirebilirim.

Öncelik ile kurmaya çalıştığınız sürümü ve php bilgilerini rica edeceğim.

Eğerki denemiş olduğunuz sürüm 3.0rc ise ne localhost ne de normal bir hosting hizmetinde hata vermemektedir.

@MahmutHizal
Copy link
Author

MahmutHizal commented May 16, 2016

@BeReal86 kullandığım php sürümü 7.0.4-7ubuntu1, MySql sürümü 5.7.12-0ubuntu1 localhost olarak kurmayı deniyorum

@BeReal86
Copy link
Member

@MahmutHizal Bazı denemeler yaptım fakat kurulum esnasında herhangi bir hata yada db hata kaydına rastlamadım. xampp-win32-7.0.6-0-VC14-installer kullandım.
php 7.0.6
mysql 5.5.5-10.1.13-MariaDB
web server Apache v2.4.18

Normal hostinglerde de bir sorun rastlamadım.

@BeReal86
Copy link
Member

Farklı local programlar ile deneme yapıp sonucunu bildirirseniz iyi olur veya kullandığınız programı söyleyin bizde denemeler yaparız. lakin şuan için bir sorun yoktur.

@MahmutHizal
Copy link
Author

Sunucu olarak php development serverda deniyorum.
1

[Tue May 17 20:10:11 2016] 127.0.0.1:48084 [302]: /
[Tue May 17 20:10:12 2016] 127.0.0.1:48086 [200]: /install/
[Tue May 17 20:10:12 2016] 127.0.0.1:48088 [200]: /application/styles/css/bootstrap.min.css
[Tue May 17 20:10:12 2016] 127.0.0.1:48090 [200]: /application/styles/css/admin.css
[Tue May 17 20:10:12 2016] 127.0.0.1:48094 [200]: /public/js/bootstrap.min.js
[Tue May 17 20:10:12 2016] 127.0.0.1:48096 [200]: /favicon.ico
[Tue May 17 20:10:22 2016] 127.0.0.1:48100 Invalid request (Unexpected EOF)

Başarılı bir şekilde kurulum sayfasına eriştim.

2

[Tue May 17 20:11:38 2016] 127.0.0.1:48112 [200]: /install/index.php?page=installation&mode=step1
[Tue May 17 20:11:38 2016] 127.0.0.1:48114 [200]: /application/styles/css/bootstrap.min.css
[Tue May 17 20:11:38 2016] 127.0.0.1:48118 [200]: /application/styles/css/admin.css
[Tue May 17 20:11:38 2016] 127.0.0.1:48116 [200]: /public/js/bootstrap.min.js
[Tue May 17 20:11:38 2016] 127.0.0.1:48122 [200]: /favicon.ico
[Tue May 17 20:11:43 2016] 127.0.0.1:48124 Invalid request (Unexpected EOF)
[Tue May 17 20:12:03 2016] 127.0.0.1:48126 Invalid request (Unexpected EOF)

Veritabanı bağlantı bilgilerini girdim.

3

[Tue May 17 20:13:42 2016] 127.0.0.1:48142 [302]: /install/index.php?page=installation&mode=step1
[Tue May 17 20:13:43 2016] 127.0.0.1:48146 [200]: /install/index.php?page=installation&mode=step2
[Tue May 17 20:13:43 2016] 127.0.0.1:48144 [200]: /application/styles/css/bootstrap.min.css
[Tue May 17 20:13:43 2016] 127.0.0.1:48150 [200]: /application/styles/css/admin.css
[Tue May 17 20:13:43 2016] 127.0.0.1:48152 [200]: /public/js/bootstrap.min.js
[Tue May 17 20:13:43 2016] 127.0.0.1:48154 [200]: /favicon.ico
[Tue May 17 20:13:51 2016] 127.0.0.1:48156 Invalid request (Unexpected EOF)
[Tue May 17 20:14:01 2016] 127.0.0.1:48158 Invalid request (Unexpected EOF)
[Tue May 17 20:14:38 2016] 127.0.0.1:48164 Invalid request (Unexpected EOF)

Insert data sekmesine kadar her sorunsuz geldim.
4

5
Yönetici hesap bilgilerini girdim. Butona tıkladığımda:

6

ErrorLog.php:

Database query failed: Field 'planet_b_building_id' doesn't have a default value Last SQL Query:

INSERT INTO sa_planets SETplanet_name= 'mahmuthizal',planet_user_id= '1',planet_galaxy= '1',planet_system= '1',planet_planet= '1',planet_last_update= '1463505591',planet_type= '1',planet_image= 'trockenplanet05',planet_diameter= '10341',planet_field_max= '106',planet_temp_min= '186',planet_temp_max= '226',planet_metal= '500',planet_metal_perhour= '90',planet_crystal= '500',planet_crystal_perhour= '45',planet_deuterium= '0',planet_deuterium_perhour= '0';

@jonamix-ar
Copy link

Acabo de probar el instalador y lo instala bien...

@MahmutHizal
Copy link
Author

Kendi düzenlediğim klonda veritabanı sınıfı olarak laravelin database sınıfını kullanıyorum. Laravel/Database kullanılarak oluşturulan veritabanı tabloları ve veritabanı verilerinde sıkıntı olmuyor ancak saf kurulumda bahsettiğim hata ile karşılaşıyorum

parent::$db->create(USERS, function($table){
            $table->increments('id');
            $table->string('username', 60);
            $table->string('password', 32);
            $table->string('email', 60);
            $table->string('email_permanent', 60);
            $table->integer('authlevel')->default(0);
            $table->integer('homeplanet');
            $table->integer('galaxy');
            $table->integer('system');
            $table->integer('planet');
            $table->integer('current_planet');
            $table->string('last_ip', 16)->nullable();
            $table->string('ip_at_reg', 16);
            $table->text('user_agent');
            $table->string('current_page', 20);
            $table->text('fleet_shortcuts');
            $table->integer('ally_id')->nullable();
            $table->integer('ally_request')->nullable();
            $table->text('ally_request_text')->nullable();
            $table->timestamp('ally_register_time')->nullable();
            $table->integer('ally_rank_id')->nullable();
            $table->text('settings');
            $table->timestamps();
            $table->softDeletes();
        });```

@jonamix-ar
Copy link

@MahmutHizal A que Nucleo pertenece eso, por que en XG no se encuentra esa función. eso es de 2moons. si es así no damos soporte a esa version.

@MahmutHizal At Core belongs to that, because XP is not found this function. That is 2moons. if so, we do not support this version.

@MahmutHizal
Copy link
Author

@FGServers I am trying to install clean version of XGP. The code shared by me at last comment, in my forked XGP.

@jonamix-ar
Copy link

@MahmutHizal Ok I'll try to see if I can see the error to fix.

@LucasKovacs LucasKovacs added the Bug Issues that is an error, bug or it is not working as expected label May 18, 2016
@LucasKovacs LucasKovacs added this to the v3.0.1 milestone May 18, 2016
@LucasKovacs LucasKovacs self-assigned this May 18, 2016
LucasKovacs added a commit that referenced this issue May 18, 2016
Applied same fix to other fields.
@LucasKovacs LucasKovacs added the Fixed Issues that after being labeled as Bug have been resolved label May 18, 2016
LucasKovacs added a commit that referenced this issue May 19, 2016
More improvements to solve MySQL not allowing a text column have a
default value in MySQL, and not allowing fields to not have a default
value.
@MahmutHizal
Copy link
Author

This issue still go on

@MahmutHizal
Copy link
Author

I fixed it like this:
find this file: application/libraries/PlanetLib.php Line: 145
before add this line:

,'planet_b_building_id' => '0',
'planet_b_hangar_id' => '0'

find this file: application/libraries/PlanetLib.php Line: 213
before add this line:

,'planet_b_building_id' => '0',
'planet_b_hangar_id' => '0'

@LucasKovacs LucasKovacs modified the milestones: v3.0.4, v3.0.1 Nov 10, 2016
@LucasKovacs LucasKovacs reopened this Nov 10, 2016
@ropnom
Copy link

ropnom commented Dec 5, 2016

Confirmado error con las mismas versiones 5.7.16-0ubuntu0.16.04.1 - (Ubuntu) version 10 protocolo.

Confirmed error, same versions 5.7.16-0ubuntu0.16.04.1 - (Ubuntu) protocol version 10.

MahmutHizal thanks i tray to fix it.

LucasKovacs added a commit that referenced this issue Aug 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues that is an error, bug or it is not working as expected Fixed Issues that after being labeled as Bug have been resolved
Projects
None yet
Development

No branches or pull requests

5 participants