[TECHNICAL SUPPORT] LPS-34846 Fixed groupId and type extraction logic when article is found

Hi Ray,

I'm pasting Vilmos' comment below, however, I've changed the code a bit. Correct me if I'm wrong, but I cannot see any reason why we should set the groupId again any time, as it's handled in the init.jps. In addition, if we change this to the chosen article's groupId why should we set this back right after. As I can see it's done in the http://issues.liferay.com/browse/LPS-12920 ticket.

As for the type, I changed the behavior according to the groupId's handling.

Regards,
Zsigmond