Web server logs across multiple Moodle versions show "invalid subtype directory 'mod/lti/source' detected" in 'D:\inetpub\wwwroot\moodle/mod/lti'." Our installation does have the moodle/mod/lti/source directory but has no files or sub-directories, as we remove the shipped readme.txt and upgrade.txt files for security purposes. Is this the cause of the warning?
Yes, deleting expected directories is going to cause you problems (as you've found, and reported in MDL-79175)
If this is really for "security purposes" you'd be better looking at the following security recommendations and denying access via your webserver config, rather than deleting stuff: https://docs.moodle.org/402/en/Apache#Hiding_internal_paths
Hi Mike,
The removal of those 2 files inside the mod/lti/source directory, while not recommended, will not cause the error you're seeing there. That failure is caused by the following is_dir() check: https://github.com/moodle/moodle/blob/99a7a7c782f01f7d8e3776d8880804bf12d76899/lib/classes/component.php#L608-L611
I'd probably be looking at the permissions in that directory, or exploring why that call is failing, resulting in the error logging. The mod/lti/service directory is another subplugin directory within LTI and you aren't getting errors for that one, so might be a good comparison point. Noting that I'm on linux and that there may be a subtly different behaviour for is_dir() on windows. Not saying there definitely is, but it's perhaps something worth checking too.
Cheers,
The removal of those 2 files inside the mod/lti/source directory, while not recommended, will not cause the error you're seeing there. That failure is caused by the following is_dir() check: https://github.com/moodle/moodle/blob/99a7a7c782f01f7d8e3776d8880804bf12d76899/lib/classes/component.php#L608-L611
I'd probably be looking at the permissions in that directory, or exploring why that call is failing, resulting in the error logging. The mod/lti/service directory is another subplugin directory within LTI and you aren't getting errors for that one, so might be a good comparison point. Noting that I'm on linux and that there may be a subtly different behaviour for is_dir() on windows. Not saying there definitely is, but it's perhaps something worth checking too.
Cheers,