Module:CRTModel: Difference between revisions
No edit summary |
No edit summary |
||
| Line 212: | Line 212: | ||
'}}' | '}}' | ||
local modsResult = frame:preprocess(modsQueryWikitext) | local modsResult = frame:preprocess(modsQueryWikitext) | ||
-- DEBUG: Always show mods section with raw query result | |||
addSectionRow(container, 'Mods (DEBUG)') | |||
local debugDiv = container:tag('div') | |||
css(debugDiv, 'grid-column: 1 / -1; padding:0.2em 0.4em; background:#ffe0e0; font-family:monospace; font-size:80%; white-space:pre-wrap; word-break:break-all;') | |||
debugDiv:wikitext('Query result length: ' .. tostring(#(modsResult or '')) .. '\n\nRaw result:\n' .. (modsResult or 'NIL')) | |||
-- Parse mods and build display | -- Parse mods and build display | ||
| Line 227: | Line 233: | ||
table.insert(cells, trim(cleanContent)) | table.insert(cells, trim(cleanContent)) | ||
end | end | ||
-- DEBUG: Show what we parsed from each row | |||
local rowDebug = container:tag('div') | |||
css(rowDebug, 'grid-column: 1 / -1; padding:0.2em 0.4em; background:#e0ffe0; font-family:monospace; font-size:80%;') | |||
rowDebug:wikitext('Row cells: ' .. #cells .. ' | ' .. table.concat(cells, ' | ')) | |||
-- cells[1] = subobject, cells[2] = type, cells[3] = description, cells[4] = feasible, cells[5] = url | -- cells[1] = subobject, cells[2] = type, cells[3] = description, cells[4] = feasible, cells[5] = url | ||
| Line 247: | Line 258: | ||
end | end | ||
end | end | ||
-- DEBUG: Show parsed mods count | |||
local countDebug = container:tag('div') | |||
css(countDebug, 'grid-column: 1 / -1; padding:0.2em 0.4em; background:#e0e0ff; font-family:monospace; font-size:80%;') | |||
countDebug:wikitext('Parsed mods count: ' .. #mods .. ', hasMods: ' .. tostring(hasMods)) | |||
-- Display mods section if there are any mods | -- Display mods section if there are any mods | ||