Calendar issue, already tracked?

Calendar issue, already tracked?

by João Ciocca -
Number of replies: 8

I'm testing  3.4dev+ (Build: 20171021), dunno if this is the best place to post this - please redirect me if it's not.

When opening calendar/view.php?view=month, instead of showing the previous month on the first panel of the three months, on the sidebar, it's showing the current month twice, and then the next month.

The links for changing months on the main calendar are showing correctly last month and previous month, but if I click on either, I get this error:

invalidparameter

Valor inválido de parâmetro detectado
File: /lib/externallib.php
Line: 315
Stack trace:
Missing required key in single structure: year
Error code: invalidparameter
* line 315 of /lib/externallib.php: invalid_parameter_exception thrown
* line 223 of /lib/externallib.php: call to external_api::validate_parameters()
* line 59 of /lib/ajax/service.php: call to external_api::call_external_function()
Missing required key in single structure: year
Error code: invalidparameter
* line 315 of /lib/externallib.php: invalid_parameter_exception thrown
* line 223 of /lib/externallib.php: call to external_api::validate_parameters()
* line 59 of /lib/ajax/service.php: call to external_api::call_external_function()

This looks similar to this comment on MDL-60065, but not exactly the same (the comment says it's missing required key "time", where here it says "year").

Now, I think the release I'm testing is older and this problem could have been fixed later, since 60065 ends saying it's available, but I'm now sure how to update to the latest release, and the guy who usually does this is away for a couple days.

Can anyone confirm if simply replacing the installation files will update to the latest release, or if there's something else I need to do? Or should I just wait? Or even inform if this problem has already been solved?

Average of ratings: -
In reply to João Ciocca

Odp: Calendar issue, already tracked?

by Kate James -

Hey,

I have it's the same problem. Can U have a solution?

In reply to Kate James

Re: Odp: Calendar issue, already tracked?

by Dana Wortman -

I'm also having this problem on my Front Page since migrating to a new site and upgrading to Moodle 3.5.  I'm using the Degrade theme, if that makes a difference.  I have not had time to attempt to dig into this and find a solution or find out what's wrong/debug anything.

In reply to Dana Wortman

Odp: Re: Odp: Calendar issue, already tracked?

by Kate James -

So, problem is when you hide the mini calendar in the template. 
You have to exclude some validation of checking if the calendar is on the subpage. I don't know how yet, but try.

In reply to João Ciocca

إعادة: Calendar issue, already tracked?

by D.ALI ALAMRI -

Missing required key in single structure: year
Error code: invalidparameter
* line 315 of /lib/externallib.php: invalid_parameter_exception thrown
* line 223 of /lib/externallib.php: call to external_api::validate_parameters()
* line 59 of /lib/ajax/service.php: call to external_api::call_external_function()
so i have this problem
In reply to D.ALI ALAMRI

Re: إعادة: Calendar issue, already tracked?

by John Web -

Was really stuck on this .. it seems only on the Essential theme 

in the end I did this in \lib\ajax\service.php


//new if statement to return dummy JSON on false calls

foreach ($requests as $request) {

$response = array();

$methodname = clean_param($request['methodname'], PARAM_ALPHANUMEXT);

$index = clean_param($request['index'], PARAM_INT);

$args = $request['args'];

if(!empty($args)){

$response = external_api::call_external_function($methodname, $args, true);

$responses[$index] = $response;

if ($response['error']) {

// Do not process the remaining requests.

break;

}

echo json_encode($responses);

}else{

$response = '';

$responses[$index] = $response;

echo json_encode($responses);

}

}

#echo json_encode($responses);


In reply to John Web

Re: إعادة: Calendar issue, already tracked?

by Diana Gonzaga -

have you configured which tab these parameters?

In reply to João Ciocca

Re: Calendar issue, already tracked?

by Dan Rapoza -

I'm not sure if anyone here was able to resolve this, but I was getting the same error. I'm using the Essential Theme on 3.6, though I was having same issue on 3.5. The error would only appear after initial login, and I never saw it as an admin. I had to log in as a regular user.

For me, it was related to the Calendar block. I had it down in the "admin only" area at the bottom. If I moved it to a side panel, the error would go away. I ended up putting it in the side panel, but then hitting the gear and hiding the panel. So I see it only if I'm editing that page, and users never see it at all. After doing that, no error at all.

This is more of a workaround rather than a fix, but I hope it helps.

In reply to Dan Rapoza

Re: Calendar issue, already tracked?

by Diana Gonzaga -

Hello in my case does not appear the error for the administrator but for all others, could you please forward me the "print" or an image of how you have changed?