Hub and location missing during registration

Hello!

Hub and location cannot be selected during registration. The browser reports :

Warning:  Invalid argument supplied for foreach() in /usr/www/users/virtuajj/sachsenexpress/sxp-crew/lib/skins/ocean_blue/registration_mainform.php on line 39

Warning:  Invalid argument supplied for foreach() in /usr/www/users/virtuajj/sachsenexpress/sxp-crew/lib/skins/ocean_blue/registration_mainform.php on line 49

Hello!

Hub and location cannot be selected during registration. The browser reports :

I can’t find the error because I didn’t change the original files.

Could someone please help. Thank you

Best regards
Andreas

 

 

 

\<dt\>Hub: \*\</dt\> \<dd\> \<select name="hub" id="hub"\> \<?php foreach($hub\_list as $hub) { echo '\<option value="'.$hub-\>icao.'"\>'.$hub-\>icao.' - ' . $hub-\>name .'\</option\>'; } ?\> \</select\> \</dd\> \<dt\>Location: \*\</dt\> \<dd\>\<select name="location"\> \<?php foreach($country\_list as $countryCode=\>$countryName) { if(Vars::POST('location') == $countryCode) { $sel = 'selected="selected"'; } else { $sel = ''; } echo '\<option value="'.$countryCode.'" '.$sel.'\>'.$countryName.'\</option\>'; } ?\> \</select\> \<?php if($location\_error == true) { echo '\<p class="error"\>Please enter your location\</p\>'; } ?\> \</dd\>

Long before you open up your site for Public Registration , the following should be already done; First , how many Airports are in your System, Second, how many routes have you done, and have you assigned any of your Airports as a “HUB” ? Standard install of phpvms classic version, installs KJFK as a Hub. You also need to import Airports into the system first or do them by hand, I recommend you import Airports via/csv file format first into your system. You can’t do routes, or assign hubs without any airports, this also will show that on the Registration page upon a new registration. 

The install of phpvms DOES NOT install airports for you, only the one I’ve mentioned above. And also , how many aircraft are in your system ? This is only a start, let me know on this much.

Jim

Hello, Jim,

I have 287 airports in the database, including two hubs. None is displayed.

The variable $hub_list and $country_list is undefined.  You need to check for the correct variable in core/modules/Registration/Registration.php

Try changing those variables to $allhubs and $countries respectively.

Hello shakamonkey88,

That’s it. Now everything works. Thank you!

Best regards Andreas

Was gonna post that , thanks shakamonkey88, figured I’d get all the basics out first, lol, you know how that goes sometimes, Glad everything worked out for You Andi170.

Jim