Bruno17/MIGX

MIGX 3.0.2 show warning "media_source_id" when use "this.renderChunk"

oleang opened this issue · 2 comments

oleang commented

I have created my Input/Show data form MIGXdb. I found that if i use "this.renderChunk" in columns, it will be have warning about "media_source_id" every time of render (see attached) in error log. The columns display correct but how to avoid the warning. Need i define a "media_source_id" or not?

MODX 3.0.4
MIGX 3.0.2
PHP 8.2.5

01-column-show
02-error-log
03-column-setting
04-render-chunk

Need i define a "media_source_id" or not?

This won't fix the warning.

To get rid of the warning, you have to change the code:
Change this line

$properties['_media_source_id'] = $this->config['media_source_id'];

to this instead:

$properties['_media_source_id'] = isset($this->config['media_source_id']) ? $this->config['media_source_id'] : 0;
oleang commented

@halftrainedharry Thanks, That work.