When using a popup dont have a trigger from your button onto the area in which your popup is. Behaviour: popup.show in code brought back nothing no popup and the code works elsewhere. Solution: move the popup to an area outside of the refreshed area.
The Incident Archive: A blog to store my knowledge on the errors that I fix on a daily basis