I have a VF page that leverages a custom object's StandardSetController to compare records. I created a custom button to allow users to select records of that object from a related list and compare them with the click of a button.
With every new session,
StandardSetController.getSelected() comes up empty the very first time I click the button to open the VF page. All subsequent requests are fine.
It appears to be related to the passing of the session details to VF because there's a very quick redirect to
<base_url>/visualforce/session/ before seeing the VF page. To confirm this, I embedded an empty VF page into the standard layout of the page that contains the related list, and things work as expected.
Is this a bug? Any other solutions to get around this issue besides the one above?