<ul><li><strong>Module identified</strong>: Page 7 = Frequently Asked Questions FAQ (ItemID=7, FAQManager)</li><li><strong>N+1 query fix — list_faq_categories.php</strong>: Removed per-row DB query for parent category inside foreach loop; replaced with single pre-cached lookup array built before the loop — eliminates up to 92 queries per page load</li><li><strong>N+1 query fix — insert_update.php (getCategoryTable action)</strong>: Same pattern fixed — parent category lookup moved out of foreach loop into single pre-cached array</li><li><strong>Missing indexes added on demo_youportal</strong>: domain_tbl_faq_items.sitelinkid_fk (idx_sitelinkid_fk), domain_tbl_faq_items.FAQCategoryID_fk (idx_faqcategoryid_fk), domain_tbl_faq_items_category.sitelinkid_fk (idx_sitelinkid_fk), domain_tbl_faq_items_category.tempid_fk (idx_tempid_fk)</li><li><strong>faq.controller.php getAllFaq()</strong>: Fixed undefined variable  /  when  is falsy — initialized both to empty array before conditional block to prevent PHP warning on count()</li><li><strong>inc_faq_manager.php — onload_getNotifSetting()</strong>: Changed $.post to $.ajax with error handler; wrapped JSON.parse in try/catch to prevent uncaught exceptions on malformed response</li><li><strong>inc_faq_manager.php — allow_notificationSetting()</strong>: Added $.ajax error handler; wrapped JSON.parse in try/catch; removed unreachable code after return statement; added null guard on data.status access</li><li><strong>Backups created</strong>: list_faq_categories-bk-v3.php, list_faq_items-bk-v3.php, faq.controller-bk-v2.php, insert_update-bk-v3.php, inc_faq_manager-bk-v4.php</li><li><strong>EXPLAIN validation</strong>: Main JOIN query now uses siteid_fk index on faq_items and PRIMARY on faq_items_category — rows examined reduced to 1</li><li>PHP lint: 0 errors across all modified files</li></ul>