Incorrect message JOOMLA URL MISCONFIGURED IN MOODLE PLUGIN
- John Feagans
- Topic Author
- Offline
- Junior Member
-
Less
More
13 years 7 months ago #1
by John Feagans
Incorrect message JOOMLA URL MISCONFIGURED IN MOODLE PLUGIN was created by John Feagans
I have 3 working Moodle 1.9x + Joomla 1.5x + Joomdle .82 installations. My latest installation gets the Misconfigured Joomla URL in system check.
Investigating further I found this in my system error log:
20120901T141513: www.********.com/administrator/index.php
PHP Warning: strncmp() expects parameter 1 to be string, array given in /hermes/bosweb/web077/b779/ipw.*******/public_html/administrator/components/com_joomdle/helpers/content.php on line 1309
PHP Warning: substr() expects parameter 1 to be string, array given in /hermes/bosweb/web077/b779/ipw.********/public_html/administrator/components/com_joomdle/helpers/content.php on line 1312
The code in content.php from line 1309 on is as follows:
if (strncmp ($response, 'XML-RPC Error (1): Access Denied', 32) == 0)
{
$system[3] = 0;
$system[3] = JText::_ ('CJ IP NOT ALLOWED') . substr ( $response, 32 );
}
else {
$system[3] = 0;
$system[3] = JText::_ ('CJ JOOMLA URL MISCONFIGURED IN MOODLE PLUGIN');
The response from Moodle is set by auth.php
function system_check ()
{
$system = is_enabled_auth('joomdle');
$system = is_enabled_auth('mnet');
$joomla_url = get_config (NULL, 'joomla_url');
if ($joomla_url == '')
{
$system = 0;
}
else
{
$system = 1;
$data = $this->call_method ("test");
$system = $data;
}
return $system;
}
if joomdle_configured is set to zero for a missing URL, the following code yields the missing URL error:
else if ($response == 0)
{
$system[3] = 0;
$system[3] = JText::_ ('CJ JOOMLA URL NOT CONFIGURED IN MOODLE PLUGIN');
}
The system is actually try to tell me that there is an "IP NOT ALLOWED" condition but PHP dumps on the first case and falls into the JOOMLA URL MISCONFIGURED IN MOODLE PLUGIN.
I see a lot of questions about users being misled by the MISCONFIGURED JOOMLA URL when it may actually be the later error condition. I hope this helps explain some of the queries with no answer that I see on this forum.
Investigating further I found this in my system error log:
20120901T141513: www.********.com/administrator/index.php
PHP Warning: strncmp() expects parameter 1 to be string, array given in /hermes/bosweb/web077/b779/ipw.*******/public_html/administrator/components/com_joomdle/helpers/content.php on line 1309
PHP Warning: substr() expects parameter 1 to be string, array given in /hermes/bosweb/web077/b779/ipw.********/public_html/administrator/components/com_joomdle/helpers/content.php on line 1312
The code in content.php from line 1309 on is as follows:
if (strncmp ($response, 'XML-RPC Error (1): Access Denied', 32) == 0)
{
$system[3] = 0;
$system[3] = JText::_ ('CJ IP NOT ALLOWED') . substr ( $response, 32 );
}
else {
$system[3] = 0;
$system[3] = JText::_ ('CJ JOOMLA URL MISCONFIGURED IN MOODLE PLUGIN');
The response from Moodle is set by auth.php
function system_check ()
{
$system = is_enabled_auth('joomdle');
$system = is_enabled_auth('mnet');
$joomla_url = get_config (NULL, 'joomla_url');
if ($joomla_url == '')
{
$system = 0;
}
else
{
$system = 1;
$data = $this->call_method ("test");
$system = $data;
}
return $system;
}
if joomdle_configured is set to zero for a missing URL, the following code yields the missing URL error:
else if ($response == 0)
{
$system[3] = 0;
$system[3] = JText::_ ('CJ JOOMLA URL NOT CONFIGURED IN MOODLE PLUGIN');
}
The system is actually try to tell me that there is an "IP NOT ALLOWED" condition but PHP dumps on the first case and falls into the JOOMLA URL MISCONFIGURED IN MOODLE PLUGIN.
I see a lot of questions about users being misled by the MISCONFIGURED JOOMLA URL when it may actually be the later error condition. I hope this helps explain some of the queries with no answer that I see on this forum.
Please Log in or Create an account to join the conversation.
- John Feagans
- Topic Author
- Offline
- Junior Member
-
13 years 7 months ago - 13 years 7 months ago #2
by John Feagans
Replied by John Feagans on topic Incorrect message JOOMLA URL MISCONFIGURED IN MOODLE PLUGIN
Please correct me if I am wrong, but my proposed fix looks like this for lines 1309 and 1312:
if (strncmp ($response, 'XML-RPC Error (1): Access Denied', 32) == 0)
{
$system[3] = 0;
$system[3] = JText::_ ('CJ IP NOT ALLOWED') . substr ( $response, 32 );
Now my system gets the IP not allowed error message instead of the bogus misconfigured...
With that information I went into the access log for my server, discovered the IP address being used for communication between Joomla and Moodle. Because it was Joomla 1.5, I entered the IP address through the plugin manager for XMLRPC-Joomdle.
if (strncmp ($response, 'XML-RPC Error (1): Access Denied', 32) == 0)
{
$system[3] = 0;
$system[3] = JText::_ ('CJ IP NOT ALLOWED') . substr ( $response, 32 );
Now my system gets the IP not allowed error message instead of the bogus misconfigured...
With that information I went into the access log for my server, discovered the IP address being used for communication between Joomla and Moodle. Because it was Joomla 1.5, I entered the IP address through the plugin manager for XMLRPC-Joomdle.
Last edit: 13 years 7 months ago by John Feagans. Reason: More information to help others with same problem
Please Log in or Create an account to join the conversation.
- Chris
-
- Offline
- Moderator
-
13 years 7 months ago #3
by Chris
Replied by Chris on topic Incorrect message JOOMLA URL MISCONFIGURED IN MOODLE PLUGIN
Thanks for this. I shall highlight this to Antonio once he returns from holidays. Thus far I see most cases the "misconfigured" message is resolved - perhaps by knowledge of what to do or trial and error and thus an additional message could decrease the time required to solve a problem.
Thanks again
Thanks again
Please Log in or Create an account to join the conversation.