Andi170 Posted September 6, 2019 Report Share Posted September 6, 2019 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> Quote Link to comment Share on other sites More sharing options...
Heritage1 Posted September 6, 2019 Report Share Posted September 6, 2019 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 Quote Link to comment Share on other sites More sharing options...
Andi170 Posted September 6, 2019 Author Report Share Posted September 6, 2019 Hello, Jim, I have 287 airports in the database, including two hubs. None is displayed. Quote Link to comment Share on other sites More sharing options...
Moderators shakamonkey88 Posted September 6, 2019 Moderators Report Share Posted September 6, 2019 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. Quote Link to comment Share on other sites More sharing options...
Andi170 Posted September 6, 2019 Author Report Share Posted September 6, 2019 Hello shakamonkey88, That's it. Now everything works. Thank you! Best regards Andreas Quote Link to comment Share on other sites More sharing options...
Heritage1 Posted September 7, 2019 Report Share Posted September 7, 2019 @shakamonkey88 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.