Jump to content

Error when attemping to add flight


atrdriver

Recommended Posts

OK, first thing is I can't seem to access the demo site to try to reproduce the issue there.  My site runs php ver 7.3.28.  Not sure what version of mySQL, and not sure how to find out.  I use a paid hosting service (Siteground). 

My phpvms version is 7.0.0-dev+210521.d3ec0f. 

 

When I attempt to add a flight I get 2 part error.  The first states "APP_DEBUG is set to true while APP_ENV is not local".  This is in red.  I searched how to turn off the DEBUG, and all I could find was how to turn it on by editing config.php under the app directory.  I do not have that file under the app directory.  Where can I find that file if it is indeed what I need to edit to get rid of this error.

 

The second part of the error states "

ErrorException

Trying to get property 'id' of non-object (View: /home/customer/www/shootingstarfan.com/phpvms/resources/views/admin/flights/scripts.blade.php)"

I don't have any idea where to even start on this one.  There is a lot of stuff below this error that I don't understand.  I am trying to add one or two flights so I can look at the database and get the format so I can reformat my existing data and then upload it to the database directly.  If you need any more information please let me know.  Thanks in advance.

 

john croft

 

Link to comment
Share on other sites

Hi,

 

I am not sure that you can re-produce this error on the demo site 'cause that demo site always uses the latest development build and the error you mentioned was fixed a while ago (around 24th or 25th MAY). Your version 210521.d3ec0f is from 21th MAY.

 

So to fix it, you just need to update your phpvms to latest dev.

 

And the second one, the APP_DEBUG message in red, is not an error, it is a warning for your applications (phpvms) and server's security. To change the debug options, you need to edit your ENV.php file, located at the root of your install. In that file you will see two debug options, just change APP_DEBUG=true to APP_DEBUG=false and save the file.

 

From that moment on, when an error occurs on any page, you need to get the details from your logs (located under storage/logs folder) 'cause the pages will not provide you any debug or stacktrace info.

 

For the last part, about adding your old data from v5.xx series or any other management software, I would kindly suggest you to use the built-in importers (for flights and fleet) and not messing up with your database (until you really get familiar with how v7 works in the background, how the tables and their data are connected to each other etc.)

 

And if you have some basic questions and want to know v7 a little bit better, you can just spare some time and read the basic guides provided here at this forum.

 

Hope this helps

Edited by DisposableHero
Link to comment
Share on other sites

Thanks for the reply!

 

I know I'm new to phpvms, and I am trying really hard to not ask really stupid questions.  That said,  when I go to the download section it says the latest ver 7 dev file was last updated on January 27th.  Is that the file I need to download, and if so is there a way to just update the install or do I need to start over?  I have been searching for a guide to update and I have not yet found one.  Believe it or not I have been googling the snot out of all this and have had very little success.  If I need to start over it's not a big deal at this point because I'm just trying to get everything set up.  And that file, as well as the one I downloaded, said it was the latest dev version and is for testing only.  Is there a stable version out there that I could run for a period of time without having up update? 

 

And I attempted to use the built in importer to import my airports and ran into a problem, so I just reformatted my current data and imported them directly into the database.  I am trying to move over from Virtual Airline Manager because it won't work on any version of php newer than 7.0, and my host is going to so letting me use that version soon.

 

And thanks for the env.php, in the docs I read it said the debug was found in config.php, and I couldn'lt find that file.  I have already edited the env.php file.

Link to comment
Share on other sites

Do not mind the date the link posted ;) The contents of that link is always the latest build ... So that topic was posted (or the file entry to forum done) at Jan.27 but the contents you download when you click that link is the latest.

 

http://downloads.phpvms.net/phpvms-7.0.0-dev.tar.gz

http://downloads.phpvms.net/phpvms-7.0.0-dev.zip

 

Latest dev is stable, that error you faced lived only a day or two days and was a little mistake to add some scripts to a wrong place :) Fixing it without an update was possible easily.

 

Starting from over or just updating is up to you ... Both possible since you are at the beginning and trying to get it working and learning, but later your only chance will be an update :) So try updating first to get used to that (which is only uploading and overwriting though but may need some special operations depending on the update).

 

PhpVms v7 is not yet published or released, this is why you have only some beta releases and the latest development build. You can of course stick with latest dev and do not update it for a long period of time, what you will miss is possible new features and/or bug fixes etc. And if you follow basic procedures, updating the application does not affect your changes and or theme. So why keep yourself from using always the updated latest build ?

 

Anyway, just follow some guides, use theme duplicating procedures and have your own theme files and keep your visual changes safe from updates. This way you can easily update your core application without any hesitations. I am not here to force you to do some things, but believe me, importing data directly to database would probably give you more headaches and will lead you more bigger problems when you think that all is ok. This is the main advise, the main developer and us (users/3rd party developers), we give to new users ... Do not mess up with the database unless you really know what you are doing and what will be the results on v7 core code. 

 

I do not know how was the VAM data, if it is really in a shape matching all phpvms requirements then it may be fine, I do say 'may' because it is really risky ;) What was the problem when you tried to import an airport, was it not found , was the icao correct, does that airport had all necessary fields in the csv file for import etc etc ? I kindly suggest importing flights though, phpvms v7 will add necessary (missing) airports to your database, no need to have all world airports there in the beginning.

 

You can read my guides about this logic too 'cause right now I am just repeating myself about things I already wrote and all is open publicly. 

 

https://docs.phpvms.net/

 

https://forum.phpvms.net/forum/57-general-discussions/ ( 4 pinned topics there )

 

https://forum.phpvms.net/forum/64-disposable-hero-addons/ ( 2 pinned topic here too , even though you do not use any of my addons, that theme duplicating procedure explained there applies to all themes including default )

 

Hope you manage this out and have a working v7 copy soon

 

 

Edited by DisposableHero
Link to comment
Share on other sites

Honestly the main reason that I was looking at the databases in the first place was to get the format of the .csv file that the importer would expect.  I know that the export of my VAM files is in the wrong order, and has a lot of fields that aren't going to be in the phpvms database.  So my original plan was to add a couple of flights, airports, planes, etc manually, then export the .csv files to see what the expected order of the data would be so I could reformat my existing data.  I hope that makes sense.  As far as adding the airports directly to the database, I don't remember what error I was encountering when I tried to import, but I got frustrated and just put them directly into the database.

 

But to what you said in your last post, if the airport database in empty and I add a flight, say from KJFK to EGLL, you are saying that it would automatically add those airports to the airport database?

 

Thanks for all your assistance.  I really don't want my VA to end because I can't get this configured :)

 

john croft

 

Link to comment
Share on other sites

3 hours ago, atrdriver said:

But to what you said in your last post, if the airport database in empty and I add a flight, say from KJFK to EGLL, you are saying that it would automatically add those airports to the airport database?

 

Looks like you do not want to read the basic guide with attention or skipped that part 'cause I think I was clear enough when writing exactly this about airports;

 

 

Quote

 

Best way to add airports to v7 is importing flights (or some call them schedules or routes). With the `Automatic airport lookup` option enabled, missing airports from the flights you imported will be added to your database, and with correct/reliable information in the correct format.

 

By using this method, you will get what you need and when you need. To import flights, just do an export of your current flight(s), you will have a proper csv file. Then you can edit it,

 

 

So the answer of your question was yes and still yes ;)

 

Just read guides, you will set it up and not loose your va, it is not quantum science after all but without reading (docs and forum posts) you will keep asking already explained details when you encounter a problem. Which is a time loss for both you and the person trying to help you :) We all passed that first steps and that guides (and official docs) are the best way to overcome that period.

 

Best wishes,

 

 

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...