So I have run into a bit of a strange problem and can not seem to find a solution. Maybe someone has had the same issue and can shed some light.
I am writing a component and I am adding front end editing to it, but when I save my front end form I end up with the following error:
You are not permitted to use that link to directly access that page (#1).
I have tracked the issue down to the checkEditId() function in JController. It returns false because "I have somehow just arrived at the form without clicking on a link". So I understand that I somehow have to setUserState('com_component.context.item', $id); as the problem is that the "id" is not in the userstate session.
But where do I add that? I have tried adding it manually using the setUserState() function but that does not appear to work and I can also see that com_content does not do it like that?
How am I meant to tell Joomla that the user is allowed to edit the item - not from an ACL point of view but from a - he just clicked on the edit link point of view?