I figured it out. It was related to menus not being rebuilt.
The menus had to be rebuilt, but before that the row format on the civicrm_menu table had to be changed to dynamic. Somehow during the database copy from production to test, the test table row format was changed to dynamic so didn't have the issue.
ALTER TABLE civicrm_menu ROW_FORMAT=DYNAMIC
Then rebuild the menus ( I used CiviCRM Admin Utililties -> Rebuild Menu)
[debug_info] => TRUNCATE TABLE civicrm_menu [nativecode=1118 ** Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.]
[type] => DB_Error