Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Clicking at name registered user at event will give error

Clicking at name registered user at event will give error 4 months 1 week ago #25674

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.
Attachments:
The following user(s) said Thank You: jojo12

Please Log in or Create an account to join the conversation.

Clicking at name registered user at event will give error 4 months 1 week ago #25676

  • jojo12
  • jojo12's Avatar
  • Away
  • Moderator
  • Moderator
  • Posts: 3046
  • Karma: 45
  • Thank you received: 311
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?
5.5.5-10.0.30-MariaDB-0+deb8u1
PHP 7.2.9 on different sites
Apache
JEM 2.3.0dev 2.0M and specials with Joomla! 3.9.3 stable on livesites
ja_simply, ja_purity_iii, multilingual DE EN IT FR

Please Log in or Create an account to join the conversation.

Clicking at name registered user at event will give error 4 months 1 week ago #25678

  • Egnarts
  • Egnarts's Avatar
  • Offline
  • Gold Boarder
  • Gold Boarder
  • Posts: 256
  • Karma: -3
  • Thank you received: 108
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".
JFactory::getDocument()->addScriptDeclaration('
    function submitName(node) {
      node.parentNode.previousElementSibling.childNodes[0].checked = true;
      Joomla.submitbutton("attendees.edit");
    }
');

Go to linie 101 and change
<td><a href="<?php echo JRoute::_('index.php?option=com_jem&task=attendees.edit&cid[]='.$row->id); ?>"><?php echo $row->name; ?></a></td>
to
<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.
Take a look at the responsive version of JEM: The Responsive JEM
The following user(s) said Thank You: jojo12, r.spierings

Please Log in or Create an account to join the conversation.

Last edit: by Egnarts.

Clicking at name registered user at event will give error 4 months 1 week ago #25679

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.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.197 seconds

Donate

If you find JEM useful and if you use it on your site, please consider a donation to the project.

Private Messages

You are not logged in.

Follow us......