moodle-theme_snap icon indicating copy to clipboard operation
moodle-theme_snap copied to clipboard

Moodle 3.8 PHP 7.3.11 SNAP theme 3.8.3 2020061102 Forum display on My Courses & Page error

Open btaylorcsusm opened this issue 4 years ago • 6 comments

Hello,

We just upgraded and are having two issues.

  1. Forum display error on the My Courses page

forumpostnoticeerror

  1. Coding error when clicking on a Page.

pagecodingerror

Any ideas on what is causing either of these errors?

Thanks,

Barbara

btaylorcsusm avatar Aug 18 '20 00:08 btaylorcsusm

I will add that for the Page issue, if we click the link it gives the error. If we click the "read more" it takes us to the page.

btaylorcsusm avatar Aug 18 '20 01:08 btaylorcsusm

Saw this error on another development site.

Coding error detected, it must be fixed by a programmer: Invalid context id specified context::instance_by_id()

  • line 5248 of /lib/accesslib.php: coding_exception thrown
  • line 1217 of /lib/accesslib.php: call to context::instance_by_id()
  • line 38 of /theme/snap/rest.php: call to get_context_info_array()

btaylorcsusm avatar Aug 18 '20 11:08 btaylorcsusm

The inspected code is

function(b) { var h = a(this).closest(".modtype_page"); c.scrollToElement(h); var j = h.hasClass("state-expanded"); h.toggleClass("state-expanded"); var k = h.find(".pagemod-readmore"), l = h.find(".pagemod-content"); if (1 == l.data("content-loaded")) { i(h); var m = M.cfg.wwwroot + "/theme/snap/rest.php?action=read_page&contextid=" + k.data("pagemodcontext"); if (!j) { a.ajax({ type: "GET", async: !0, url: m, success: function success(a) { d.ifErrorShowBestMsg(a).done(function(b) { if (b) {} else { g(h, a.completionhtml) } }) } }) } } else { if (!j) { var n = e.get_string("loading", "theme_snap"); a.when(n).done(function(a) { h.find(".contentafterlink").prepend("<div class="ajaxstatus alert alert-info">" + a + "") }); var o = M.cfg.wwwroot + "/theme/snap/rest.php?action=get_page&contextid=" + k.data("pagemodcontext"); a.ajax({ type: "GET", async: !0, url: o, success: function success(a) { d.ifErrorShowBestMsg(a).done(function(b) { if (b) {} else { l.prepend(a.html); l.data("content-loaded", 1); h.find(".contentafterlink .ajaxstatus").remove(); i(h, a.completionhtml); f.notifyFilterContentUpdated(".pagemod-content") } }) } }).then(function() { a(document).trigger("snap-course-content-loaded") }) } else { i(h) } } b.preventDefault() }

btaylorcsusm avatar Aug 18 '20 11:08 btaylorcsusm

@dvdcastro Do you know when someone can look at these older tickets?

btaylorcsusm avatar Dec 12 '20 21:12 btaylorcsusm

@jgg9026 @fabianbatioja would you guys happen to know if we solved anything similar to this?

dvdcastro avatar Dec 17 '20 21:12 dvdcastro

Hi, @btaylorcsusm have some news about this ? I'm having the same issue.

image

monadah avatar Jan 21 '21 14:01 monadah