I built this blog using great Articles Modx add-on. Suddenly an issue appeared on page which was supposed to list tag related articles. Instead of articles content array of all parameters was printed on screen.

I went to back-end manager and looked into Error Log where I found the error: Could not get table name for class: modFileMediaSource along with Error 42S22 executing query: SELECT .... Unknown column '' in 'field list'. 

Discussion regarding this issue is on Modx forum but quick workaround and working solution I found on russian modx community blog - thanks a lot guys:

Fix is to create plugin which runs before others on OnHandleRequest event and explicitly loads problematic class modMediaSource.

I called this snippet: fixMediaSourceError, description: temporary plugin to fix error as result of not loaded MediaSource class - this will load class explicitly, in System Events check OnHandleRequest, insert code:

if($modx->context->key == 'mgr') return;
Leave a Comment »