I have a theme that was originally built for 2.9, that uses the 'clean' and 'bootstrapbase' themes as its parents. I am trying to make it work under 3.5.
In general, it seems to be working fine, but in some pages a popup 'invalidresponse' comes up from the lib/externallib.php file (see attachment).
The error message has something to do with 'larrow'. I cannot find anything in the theme files that refers to any of the details in the message. Can someone suggest methods to track this down? It must have something to do with the theme, as it only happens when the theme is enabled and used.
If you open up the browser's developer tools (F12) and go to the network tab, clear the existing log and reload the page, you should be able to see all the web service requests made from the page. Look for requests to /webservice/rest/server.php - the name of the method being called should be passed as a GET parameter. If you look at the response of the request, you should be able to find one which matches the error message you're seeing.
Once you've worked out which method is at fault, my ususal strategy is to use Xdebug and PHPStorm to step through the function and see how the return value is being set to the invalid type.
Nothing in the output appears to be calling /webservice/rest/server.php. I can see several calls to /lib/ajax/service.php and /lib/ajax/service-nologin.php.
Looking through each of these, it appears that the culprit is calling the core_calendar_get_calendar_monthly_view service. Now I guess I just need to figure out where this service is being called from. Searching the custom code, I can't find any reference to this service. Is there some way for me to determine where this call is coming from?
Okay. I think I found it. I decided to do another search for "Moodle theme larrow", and came across this - https://moodle.org/mod/forum/discuss.php?d=252153
I looked at the custom theme, and it was setting a value for $THEME->rarrow in its config.php file, but not one for $THEME->larrow. I added the line:
$THEME->larrow = " ";
and the problem went away.