Bruno17 / MIGX

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

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

Closed oleang closed 8 months ago

oleang commented 9 months ago

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

halftrainedharry commented 8 months ago

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

https://github.com/Bruno17/MIGX/blob/9ba78088b34781056ecd6dfc2f84b6f335624672/core/components/migx/model/migx/migx.class.php#L1676

to this instead:

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

@halftrainedharry Thanks, That work.