Bruno17 / MIGX

MIGX for revo 2.2 and above
83 stars 78 forks source link

Console error, variable undefined in PHP 8 #420

Open Azonesbz opened 8 months ago

Azonesbz commented 8 months ago

When I try to configure a model, the "definition of data" model variable is not visible.

Error report :

console.log('window_id','

[2023-11-06 16:16:04] (ERROR @ core/components/migx/elements/tv/migx.tpl : 85)
PHP warning: Undefined array key "window_id"

console.log('window_id','{$smarty.request.window_id}'); {if array_key_exists('window_id',$smarty.request)} this.parent_window = '{$smarty.request.window_id}'; {/if}

fixed: {if array_key_exists('window_id',$smarty.request)} console.log('window_id','{$smarty.request.window_id}'); this.parent_window = '{$smarty.request.window_id}'; {/if}

smg6511 commented 3 months ago

@Bruno17 - I was looking at this and wondering if it's necessary to get the value via $smarty.request here (and in the updatedwindow.tpl file); can you just use the $window_id variable that's established in the main MIGX class's prepareGrid method (~ line 1558)?