404 or request timed out when viewing joomdle users page

More
13 years 8 months ago #1 by sac
Joomla 1.7.3
Jomsocial 2.4.1
JSPT 3.3.745

I get Joomla's 404 page after loading for almost 5 minutes, I tried to transfer the site to another host which was powered by nginx and I got 504 Gateway time out

the url I'm trying to access:
http://<mywebsiteurl>/administrator/index.php?option=com_joomdle&view=users

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

More
13 years 8 months ago #2 by Antonio Durán
Hi.

How many users do you have? (joomla and moodle)

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

More
13 years 8 months ago - 13 years 8 months ago #3 by sac
joomla: 3346 users
moodle: 3037 users

The problem started after adding the last user batch almost 300 users! Now I can't access the users page to sync the added users to moodle.
Last edit: 13 years 8 months ago by sac. Reason: moodle users count corrected

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

More
13 years 8 months ago #4 by Antonio Durán
yes, this is a know joomdle problem with sites with many users. Problem is with execution time out I think.
Are you able to change that php setting?

Anyway, there is a workaround: edit "administrator/components/com_joomdle/views/users/view.html.php" and add:
$filter_type = 'joomla';

before the switch statment. This will set the filter to joomla users only, and this process takes less time than the default "all users".

I am still thinking about the best way to handle this problem.

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

More
13 years 8 months ago #5 by sac
Thanks Antonio but I tried the workaround and to set max_execution_time to 600 and I still get the 404

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

More
13 years 8 months ago #6 by Antonio Durán
That's weird. Workaround has worked other times.

This problem usually happens because with default config (no filter), all users (joomla and moodle) need to be loaded at once, to sort them, regardless of pagination settings.

But when you set "joomla" as filter, only the number of users in a page are loaded at once (usually 20).

You could try to debug which function is being called, to confirm you are using joomla filter.

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

More
13 years 8 months ago #7 by sac
Can you please specifiy what are the steps required to debug the function? Meanwhile is there a manual method of adding the last batch of users to moodle without viewing the users page?

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

More
13 years 8 months ago #8 by Antonio Durán
Edit: administrator/components/com_joomdle/views/users/view.html.php

Before:
Code:
switch ($filter_type) {

Add:
Code:
$filter_type = 'joomla';

Then after:
Code:
case 'joomla':

Add:
Code:
echo "HERE"; exit ();

If you get the HERE message when visiting users page, remove the echo and the exit, and test again.

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

More
13 years 8 months ago - 13 years 8 months ago #9 by sac
Thank you for the clear instructions.
I did as instructed but still got the 404 page, so I tried to move the debug line up (from top to bottom approach) to find where it will echo. It did echo only when I move it to line 33 as shown below if I move it down further one line I'd still get the 404 message.
Code:
function display($tpl = null) { global $mainframe, $option; // START Debug Code echo "HERE"; exit(); // END Debug Code $this->users = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); parent::display($tpl); return;
Last edit: 13 years 8 months ago by sac.

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

More
13 years 8 months ago #10 by Antonio Durán
Sorrry my fault. I was looking at 1.5 code.

Edit:
administrator/components/com_joomdle/models/users.php, function getItems.

And add:
$filter_type = 'joomla';

Before:
switch ($filter_type)

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