Not all render engines have material or rendered mode.
Note: This is not working at the moment, submitting for review to get some light shed on it.
How to reproduce the original (unreported issue):
- Change render engine to Workbench.
- Press "Z" in the viewport for the shading menu.
Once this is out of the way a similar fix should be applied to the extended menu as well.
The problem with this patch is that I seem to always get all modes (MATERIAL included) in: