Fix #1745, #1760, fatal error in diagnostics & fix aliased during category recount

J3.0 Administration: Fatal error in diagnostics page
Admin tools: Fix aliases during category recount
Fix #1745: Preview link doesn't have menu item
Fix #1760: No categories are shown on first visit