help to better help you:
Please: add always Joomla / JEM version and details to your posts, so we can try to reproduce your issue!
Clicking at name registered user at event will give error
- r.spierings
- Topic Author
- Offline
- New Member
- Posts: 12
- Thanks: 1
Clicking at name registered user at event will give error
5 years 10 months ago
Using JEM 2.2.3 and Joomla 3.9.2
Reproduce:
- open event at the backend
- Click at the reg.users tot manage attendees
- Click at the name of one of the registered users
The following error appears:
"The most recent request was denied because it had an invalid security token. Please refresh the page and try again."
url after clicking: .../administrator/index.php?option=com_jem&task=attendees.edit&cid[]=1
Seems like a bug?
Remark: Using the selectbox at the left of the name and then clicking the "edit"- button works normal.
Reproduce:
- open event at the backend
- Click at the reg.users tot manage attendees
- Click at the name of one of the registered users
The following error appears:
"The most recent request was denied because it had an invalid security token. Please refresh the page and try again."
url after clicking: .../administrator/index.php?option=com_jem&task=attendees.edit&cid[]=1
Seems like a bug?
Remark: Using the selectbox at the left of the name and then clicking the "edit"- button works normal.
The following user(s) said Thank You: jojo12
Please Log in or Create an account to join the conversation.
Re: Clicking at name registered user at event will give error
5 years 10 months ago
Hi, I can reproduce your item. But I never used it like that. When I wanted to open it, I always used the edit button.
What for should this be? Not for edit, perhaps for access in that users profile?
What for should this be? Not for edit, perhaps for access in that users profile?
Please Log in or Create an account to join the conversation.
Re: Clicking at name registered user at event will give error
5 years 10 months ago - 5 years 10 months ago
You can fix this with small code editions. I will commit that to JEM Responsive if you have successfully tried this solution.
Solution:
Go to JoomlaRoot/administrator/components/com_jem/views/attendees/tmpl and open default.php
Go to line 29 and insert this code after that line. This function simulates "click to the checkbox and then click the edit button".
Go to linie 101 and change
to
Attention, this solution may not work in Microsoft Internet Explorer or Microsoft Edge (because of the "return false;").
Explanation of the problem:
I think this error message occurs because you are calling the edit form for an attendee directly. But normally the table of the attendees is a big form with an session token. This token is checked in the edit form. But when you call the edit form directly via the url, the token is not transferred. So I disabled the link and replace it with javascript that submits the form and thus transfers the token.
Solution:
Go to JoomlaRoot/administrator/components/com_jem/views/attendees/tmpl and open default.php
Go to line 29 and insert this code after that line. This function simulates "click to the checkbox and then click the edit button".
Code:
JFactory::getDocument()->addScriptDeclaration('
function submitName(node) {
node.parentNode.previousElementSibling.childNodes[0].checked = true;
Joomla.submitbutton("attendees.edit");
}
');
Go to linie 101 and change
Code:
<td><a href="<?php echo JRoute::_('index.php?option=com_jem&task=attendees.edit&cid[]='.$row->id); ?>"><?php echo $row->name; ?></a></td>
Code:
<td><a href="#" onclick="submitName(this); return false;"><?php echo $row->name; ?></a></td>
Attention, this solution may not work in Microsoft Internet Explorer or Microsoft Edge (because of the "return false;").
Explanation of the problem:
I think this error message occurs because you are calling the edit form for an attendee directly. But normally the table of the attendees is a big form with an session token. This token is checked in the edit form. But when you call the edit form directly via the url, the token is not transferred. So I disabled the link and replace it with javascript that submits the form and thus transfers the token.
Last edit: 5 years 10 months ago by Egnarts.
The following user(s) said Thank You: jojo12, r.spierings
Please Log in or Create an account to join the conversation.
- r.spierings
- Topic Author
- Offline
- New Member
- Posts: 12
- Thanks: 1
Re: Clicking at name registered user at event will give error
5 years 10 months ago
Thx for pointing out the exact location of the code.
I just made a "dirty" override of the default attendees view at my administrator template (Isis) and removed the complete link to avoid problems.
I just made a "dirty" override of the default attendees view at my administrator template (Isis) and removed the complete link to avoid problems.
Please Log in or Create an account to join the conversation.
Time to create page: 0.490 seconds