Jump to content

"Cannot add aircraft"


cfitz619

Recommended Posts

phpvms 5.5.2.72

PHP: 7.2

Skin: blue ice v2 P7

mysql 5.6, md 10.2

 

Can someone help me please?  I have been trying to figure out why I can't add aircrafts.  I get the error message "cannot add aircraft".  

 

How do I turn on error reporting?  I have searched the forum but can't find what I am looking for.

 

Thank You.

Link to comment
Share on other sites

After figuring out how to turn on error reporting, I tried installing an aircraft and got the error: " cannot add aircraft".  I checked the error log, and here is the message:

 

Time: 01.20.21 14:29:04
Backtrace: DB::write_debug > DB::query > OperationsData::addAircraft > Operations->add_aircraft_post > Operations->aircraft > MainController::RunAllActions
Query: INSERT INTO phpvms_aircraft (`icao`, `name`, `fullname`, `registration`, `downloadlink`, `imagelink`, `range`, `weight`, `cruise`, `maxpax`, `maxcargo`, `airline`, `minrank`, `enabled`, `ranklevel`) VALUES ('B737', '737-700', 'boeing 737-700', 'N131MC', '', '', '3060', '154500', '41000', '140', '30000', '', '2', '1', '1')
Error: (1054) - Unknown column 'airline' in 'field list'

Link to comment
Share on other sites

  • Administrators

You indicated you are on MariaDB 10.2 - check with your host and ask them to turn Strict Mode OFF.

 

You might also try adding an aircraft again - but be sure each and every entry has something in it - even if that something is a space character.

Link to comment
Share on other sites

Here is the response from my hosting company, Hostinger:

 

Thank you for your patience!
I would like to kindly note that your hosting has 5.6 version already, and MySQL type is MariaDB 10.2 version

 

I will request that they turn off strict mode.  Thanks for your help ProAvia.  It is greatly appreciated.

Link to comment
Share on other sites

I just reinstalled phpvms, and everything was working flawlessly.  Then after about 20 minutes of adding airports, flights, and scedules I decided to upload Airport Lookup and now I can't add or edit my current fleet.  I am getting this error again:

 

Backtrace: DB::write_debug > DB::query > OperationsData::addAircraft > Operations->add_aircraft_post > Operations->aircraft > MainController::RunAllActions
Query: INSERT INTO phpvms_aircraft (`icao`, `name`, `fullname`, `registration`, `downloadlink`, `imagelink`, `range`, `weight`, `cruise`, `maxpax`, `maxcargo`, `airline`, `minrank`, `enabled`, `ranklevel`) VALUES ('B737', '737-700', 'boeing 737-700', 'N131MC', '', '', '3060', '154500', '41000', '140', '30000', '', '2', '1', '1')
Error: (1054) - Unknown column 'airline' in 'field list'

Link to comment
Share on other sites

  • Administrators

Look at the database table for aircraft - is there an 'airline' column? Actually, list all the columns in the aircraft table here for us.

 

I see that 'downloadlink', 'imagelink' and 'airline' fields are blank. Insert even a single character in them. Use the letter 'A' in each of those blank fields and let us know what happens.

Link to comment
Share on other sites

  • Administrators

APlookup shouldn't affect the aircraft.

 

In looking at your table, you are missing the 'airline' field between 'maxcargo' and 'minrank'. Once you figure out how to add the 'airline' column in the correct position the add aircraft should work. I think the 'airline' column is supposed to be added with a specific module you are using (maybe a schedule search module?). What modules have you installed?

 

As you can see in the error - there is no 'airline' entry available in the aircraft table.

Error Log.png

 

Notice the '' after '42505', ..... the '' is the missing airline , but you can't add it via add aircraft in the admin panel because it isn't there to be added. Again, guessing a module you added wasn't completely installed.

Link to comment
Share on other sites

  • Administrators

There is nothing in my phpVMS 5.5.2.72 or my APlookup files that you downloaded that have an 'airline' column in the aircraft table or the aircraft form. Are you adding aircraft manually or importing an aircraft file? Did you do any file edits exfept the APlookup mod?

Link to comment
Share on other sites

I know there is nothing in your airport lookup that would cause the error.  I was not implying that.  I am trying to add the aircraft manually.  It is just wierd that after I installed airport lookup, I can no longer add aircraft.  It's a coincidence.  I installed 3 aircrafts before installing airport lookup.

 

The error states that it is an unknown column "airline" in field list.  I do not see that in my sql

Link to comment
Share on other sites

  • Administrators

You aren't seeing in in the aircraft table cause it isn't present there. Something somewhere "thinks" it's supposed to be there - hence the error.

 

I can't see where 'airline' is in the add aircraft code. I've checked the data class , module and templates. 

 

Have you edited:

/core/common/OperationsData.class.php

/admin/modules/Operations/Operations.php

/admin/templates/ops_aircraftform.php

????

 

I think that is all the files that include the add aircraft code.

 

Send me admin credentials so I can log into you phpvms admin panel

Link to comment
Share on other sites

Cannot Edit Aircraft [SOLVED]

 

 Just wanted to let you know that I fixed this error by exporting the aircraft sql to my pc and edited with notepad++.  The error message was    Error: (1054) - Unknown column 'airline' in 'field list' so I just added 'airline' in the sql.

 

I went back into phpvms admin and added a Citation X and everything went flawlessly.

 

The steps I took to fix the issue:

 

The Error:  Backtrace: DB::write_debug > DB::query > OperationsData::addAircraft > Operations->add_aircraft_post > Operations->aircraft > MainController::RunAllActions
Query: INSERT INTO phpvms_aircraft (`icao`, `name`, `fullname`, `registration`, `downloadlink`, `imagelink`, `range`, `weight`, `cruise`, `maxpax`, `maxcargo`, `airline`, `minrank`, `enabled`, `ranklevel`) VALUES ('B737', '737-700', 'boeing 737-700', 'N131MC', '', '', '3060', '154500', '41000', '140', '30000', '', '2', '1', '1')
Error: (1054) - Unknown column 'airline' in 'field list'

 

1.) exported the aircraft sql to my pc

2.) added `airline` between max cargo and minrank using notepad++

3.) Deleted aircraft sql from server.

4.) Imported edited copy of airport sql to server

5.) Went into phpvms admin and added Citation X to see if the edited sql fixed my issue.  Added plane without problems.

6.) Issue resolved

 

Hope this helps others who may have this issue in the future.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...