gjbarnard / moodle-theme_adaptable

Adaptable theme for Moodle
GNU General Public License v3.0
7 stars 13 forks source link

Piwik code is asking for string from local_analytics #5

Open nbartley opened 1 year ago

nbartley commented 1 year ago

Describe the bug The get_pwiki code for analytics in classes/output/core_renderer_toolbox.php on lines 799 and 801 call for strings from local_analytics instead of theme_adaptable.

Generates a string not found error when debuging is turned up and piwik is enabled.

gjb2048 commented 1 year ago

Please use common sense. If Piwik analytics isn't installed and you tell Adaptable that it is then of course it won't work!

gjb2048 commented 1 year ago

P.S. Please complete version information as requested in the issue template otherwise the line numbers are guesswork.

nbartley commented 1 year ago

Version V401.1.2

https://github.com/gjb2048/moodle-theme_adaptable/blob/master/classes/output/core_renderer_toolbox.php

Lines 799 and 801.

$trackurl .= $pageinfo[1]->fullname.'/'.get_string('edit', 'local_analytics'); } else { $trackurl .= $pageinfo[1]->fullname.'/'.get_string('view', 'local_analytics');

Why would local analytics plugin be required for basic Piwik tracking from the site... it loads the piwik jscript code from trackerurl not local moodle.

gjb2048 commented 1 year ago

I don't know why, I didn't write this code!

nbartley commented 1 year ago

That's my point, it isn't required, probably just an old copy paste bug. Anywho, I've let ya know, it is a bug and it generates lovely error messages when piwik tracking is enabled.

gjb2048 commented 1 year ago

Thanks, I'll get my shovel.

gjb2048 commented 1 year ago

@nbartley Fixed in development repository - will be in the next release for M4.1, possibly backported.