Default Item on PXE boot menu does not work
My fog server ignores the default item setting, it always boots to local disk.
I’m using Fog trunk 7380
@Sebastian-Roth To help, it was the array causing the issue directly.
The FOG Controller tests if the data it’s receiving is numeric or an array. Because the getSubObjectID’s always returns an array, the is_array portion of the FOGController constructor was taking over. This was passing to the setQuery method.
The setQuery method is only meant to work on associative array’s where the left side are the relevant table/key information and the right side is the values that correspond to those keys. The getSubObjectID doesn’t send the keys to work again, just the array of data.
The fix, for what it’s worth, was to simply add
@max(self::getSubObjectIDs('PxeMenuOptions',array('default'=>1)))to the getter on the bootmenu page.
Thanks Tom! I played with that code for an hour or so yesterday but couldn’t get my head around it. The data array in the result was always empty which didn’t make any sense from my point of view. You know all that PHP code heaps better than I do - well you wrote most (if not all) of it!
@dvchuyen Can you please upgrade to the very latest version and let us know if things are working for you as well.
Found, confirmed, fixed, and pushed. Thanks for reporting.
Wayne Workman last edited by
Moved to bugs.
Confirmed. Need to look into this…
Did you uncheck default item for local disk?