<ul>
<li><strong>BUG FIX [CRITICAL] — Faq.class.php</strong>: Removed 33 leading spaces before &lt;?php tag — caused every API response (getAllFaq, getAllFaqsRaw, getFaqItems, etc.) to emit 33 bytes of whitespace before JSON, breaking strict JSON parsers ($.parseJSON) and corrupting API responses on the public FAQ page</li>
<li><strong>BUG FIX [HIGH] — faq.php</strong>: Fixed broken double-quote in JS string: <code>html2 += '&lt;div class=""col-lg-12"&gt;'</code> → <code>&lt;div class="col-lg-12"&gt;</code> — generated invalid HTML in modules section</li>
<li><strong>BUG FIX [HIGH] — faq.php</strong>: Fixed 2x broken iframe closing tags: <code>&lt;iframe/&gt;</code> → <code>&lt;/iframe&gt;</code> in video-only and image+video carousel sections</li>
<li><strong>BUG FIX [HIGH] — faq.php</strong>: Replaced deprecated <code>$.parseJSON(response)</code> with safe <code>JSON.parse(response.trim())</code> wrapped in try/catch — prevents silent failure on malformed response</li>
<li><strong>BUG FIX [HIGH] — faq.php</strong>: Added <code>.fail()</code> handler to getAllFaq AJAX call — previously a network failure left &quot;Loading...&quot; spinner stuck open forever</li>
<li><strong>BUG FIX [MEDIUM] — modal_faq.php</strong>: Fixed undefined variable <code>['FaqRelatedLink_target']</code> → <code>['FaqRelatedLink_target']</code> on line 89 — caused PHP Warning on every FAQ modal with a related link</li>
<li><strong>BUG FIX [MEDIUM] — faq_sidebar_sec.php</strong>: Fixed 3 broken hardcoded legacy AJAX URLs (<code>/faq/inc/ajax.php</code>, <code>/administration/support/faqadmin/inc/ajax.php</code>, <code>/administration/faqadmin/inc/ajax.php</code>) — all resolved to 404; updated to correct paths</li>
<li><strong>BUG FIX [LOW] — faq_sidebar_sec.php</strong>: Removed extra stray <code>}</code> closing brace in CSS style block that caused invalid CSS</li>
<li><strong>BUG FIX [MEDIUM] — faq.controller.php getAllCategory()</strong>: Fixed <code>Trying to access array offset on value of type null</code> warning — <code>['CategoryName']</code> was accessed without null check when getFaqCategory() returns null for root categories</li>
<li><strong>SPEED FIX [HIGH] — N+1 Queries eliminated</strong>: Added <code>getAllFaqVidGroupedByMod()</code> to Faq.class.php — single query replaces 28 per-module getfaqvidBymodidfk() calls inside foreach loops in getAllFaq(), getFaqItems(), and getAllFaqsRaw() (was 28+ DB queries, now 1)</li>
<li><strong>SPEED FIX [HIGH] — N+1 Queries eliminated</strong>: getAllCategory() in controller now pre-indexes category data in PHP array to resolve parentCategName without 102 per-category getFaqCategory() DB calls</li>
<li><strong>SAFETY FIX [MEDIUM] — Faq.class.php getFaqIterated()</strong>: Added empty guard on <code>$mods</code> array before implode() — if no modules purchased, implode would produce empty string causing MySQL IN () syntax error</li>
<li><strong>Files modified</strong>: Faq.class.php, faq.controller.php, faq.php, modal_faq.php, faq_sidebar_sec.php (all backed up before changes)</li>
</ul>