Moodle has lost theme formatting

Moodle has lost theme formatting

by Jim Maxson -
Number of replies: 14

Moodle has lost HTML formatting.  Site just shows plain HTML page with no theme.  Unexpected change.  Turned on debugging and below are the results with debugging set to normal.

Moodle version:  3.31

PHP 5.6

MySQL


Error output, so disabling automatic redirect.


Warning: include(/home/hcuonlin/public_html/hcumoodle/repository/video/version.php): failed to open stream: No such file or directory in /home/hcuonlin/public_html/hcumoodle/lib/classes/plugin_manager.php on line 305


Warning: include(): Failed opening '/home/hcuonlin/public_html/hcumoodle/repository/video/version.php' for inclusion (include_path='/home/hcuonlin/public_html/hcumoodle/lib/pear:.:/opt/alt/php56/usr/share/pear:/opt/alt/php56/usr/share/php') in /home/hcuonlin/public_html/hcumoodle/lib/classes/plugin_manager.php on line 305

Plugin repository_video does not declare valid $plugin->component in its version.php.

line 315 of /lib/classes/plugin_manager.php: call to debugging()

line 335 of /lib/classes/plugin_manager.php: call to core_plugin_manager->load_present_plugins()

line 217 of /lib/classes/plugininfo/base.php: call to core_plugin_manager->get_present_plugins()

line 143 of /lib/classes/plugininfo/base.php: call to core\plugininfo\base->load_disk_version()

line 97 of /lib/classes/plugininfo/base.php: call to core\plugininfo\base::make_plugin_instance()

line 395 of /lib/classes/plugin_manager.php: call to core\plugininfo\base::get_plugins()

line 43 of /admin/settings/plugins.php: call to core_plugin_manager->get_plugins_of_type()

line 8004 of /lib/adminlib.php: call to require()

line 19 of /admin/settings.php: call to admin_get_root()

Attachment Moodle Screen Capture.PNG
Average of ratings: -
In reply to Jim Maxson

Re: Moodle has lost theme formatting

by Ken Task -
Picture of Particularly helpful Moodlers

In a git acquired stock Moodle 3.3.1+

$release  = '3.3.1+ (Build: 20170810)'; // Human-friendly version name

there is no video directory in moodlecode/repository/

Is that a 3rd party addon/plugin not compat with version or a mis-placed plugin meant for something else? 

OR was it to be a file system repository for videos?  If this one ... that belongs in moodledata/respository/video/


'spirit of sharing', Ken


In reply to Ken Task

Re: Moodle has lost theme formatting

by Jim Maxson -

Ken,

 Thank you so much for your quick reply.   I was able to do a restore and get everything back.  

You are correct regarding the video folder.  However, I had added that folder a long time ago and just did not remove it.  That leads me to believe that something else happened.  Though I am currently up and running, as  a newby to Moodle, do you have a recommendation as to where to get some background information on working with PHP?

Again, thank you for your very fast response.  I was working on panic mode smile

Jim


In reply to Jim Maxson

Re: Moodle has lost theme formatting

by Ken Task -
Picture of Particularly helpful Moodlers

So you restored the site?   Hmmmm ... kinda like taking a sledge hammer to a job that required a tack hammer for a finishing nail, isn't it? ;)

Oh well ... back up and running.

That 'something else happening' is anyone's guess but there are times Moodle would check things and maybe it finally did a check and caught it.

Not sure what you are seeking concerning more background information on working with PHP.  The only time one would do anything with the PHP scripts that make up moodle is when one is going to develop something.   And, if one were to study up on that, think I'd concentrate on future ... before long, PHP 7.x will be required me thinks (Moodle 3.4->).

You might want to re-phrase the question about PHP.   Am not a programmer myself ... there is a developers forum, however, that might fit your needs.

'spirit of sharing', Ken


In reply to Ken Task

Re: Moodle has lost theme formatting

by Jim Maxson -

Thanks again Ken for the quick reply.  My initial post was my first to the forum and wasn’t sure of the timeframe for a response.  Therefore the sledge hammer…

 

I renamed the rogue folder and will see how that works out.

 

Again, thank you for the help.  It is very reassuring that there are solid resources through the forum.

 

Have an awesome day!

 

Jim

(Edited by Helen Foster to remove quoted copy of post being replied to - original submission Tuesday, 15 August 2017, 9:15 PM)

In reply to Jim Maxson

Re: Moodle has lost theme formatting

by Ken Task -
Picture of Particularly helpful Moodlers

*** Uhhh ... moderator might want to edit the posting just above so that no one can attempt 'Un-subscribing' nor change digest preferences of another user. ;)

'renamed the directory' .... why?   What's in it?   And how is it being used in Moodle?  If it's a directory of videos to which you are linking, don't place it in any of the directories used by Moodle.   That shouidn't make Moodle hickup if you use full URL's to videos.

Renamed and in same location, you might discover, later, when you least need Moodle to mis-behave, it finds and complains about whatever you renamed it to.   You'll know what to do to fix it? ... but won't solve the problem should the issue raise it's ugly head again.

My 2 cents, of course!

spirit of sharing', Ken


In reply to Ken Task

Re: Moodle has lost theme formatting

by Jim Maxson -

Ken,

 

The issue is back  

I went to add a facebook link to the footer of the Fordson theme and BOOM I have lost my Moodle formatting again.  As you mentioned it reared its ugly head at a most inopportune time.  I had renamed the folders with an XX in from of the folder name the last time we communicated and since it came back up I thought that was the fix.  Since the issue has come up again I went into the C-panel file manager and removed the folder.  That didn’t work either.  Here is what debug is throwing out…

 

 

Warning: include(/home/hcuonlin/public_html/hcumoodle/repository/video/version.php): failed to open stream: No such file or directory in /home/hcuonlin/public_html/hcumoodle/lib/classes/component.php on line 1165

Warning: include(): Failed opening '/home/hcuonlin/public_html/hcumoodle/repository/video/version.php' for inclusion (include_path='/home/hcuonlin/public_html/hcumoodle/lib/pear:.:/opt/alt/php56/usr/share/pear:/opt/alt/php56/usr/share/php') in /home/hcuonlin/public_html/hcumoodle/lib/classes/component.php on line 1165

Warning: include(/home/hcuonlin/public_html/hcumoodle/repository/video/version.php): failed to open stream: No such file or directory in /home/hcuonlin/public_html/hcumoodle/lib/classes/plugin_manager.php on line 305

Warning: include(): Failed opening '/home/hcuonlin/public_html/hcumoodle/repository/video/version.php' for inclusion (include_path='/home/hcuonlin/public_html/hcumoodle/lib/pear:.:/opt/alt/php56/usr/share/pear:/opt/alt/php56/usr/share/php') in /home/hcuonlin/public_html/hcumoodle/lib/classes/plugin_manager.php on line 305

Plugin repository_video does not declare valid $plugin->component in its version.php.

  • line 315 of /lib/classes/plugin_manager.php: call to debugging()

  • line 335 of /lib/classes/plugin_manager.php: call to core_plugin_manager->load_present_plugins()

  • line 217 of /lib/classes/plugininfo/base.php: call to core_plugin_manager->get_present_plugins()

  • line 143 of /lib/classes/plugininfo/base.php: call to core\plugininfo\base->load_disk_version()

  • line 97 of /lib/classes/plugininfo/base.php: call to core\plugininfo\base::make_plugin_instance()

  • line 395 of /lib/classes/plugin_manager.php: call to core\plugininfo\base::get_plugins()

  • line 646 of /lib/classes/plugin_manager.php: call to core_plugin_manager->get_plugins_of_type()

  • line 361 of /auth/oauth2/classes/api.php: call to core_plugin_manager->get_plugin_info()

  • line 43 of /auth/oauth2/lib.php: call to auth_oauth2\api::is_enabled()

  • line 5023 of /lib/navigationlib.php: call to auth_oauth2_extend_navigation_user_settings()

  • line 4570 of /lib/navigationlib.php: call to settings_navigation->generate_user_settings()

  • line 4003 of /lib/navigationlib.php: call to settings_navigation->load_user_settings()

  • line 759 of /lib/pagelib.php: call to settings_navigation->initialise()

  • line 820 of /lib/pagelib.php: call to moodle_page->magic_get_settingsnav()

  • line 3425 of /lib/navigationlib.php: call to moodle_page->__get()

  • line 640 of /theme/boost/classes/output/core_renderer.php: call to navbar->get_items()

  • line 48 of /theme/fordson/layout/frontpage.php: call to theme_boost\output\core_renderer->region_main_settings_menu()

  • line 1162 of /lib/outputrenderers.php: call to include()

  • line 1092 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()

  • line 114 of /index.php: call to core_renderer->header()

I would appreciate any help or direction you would be willing to offer.

 

Thank you again.

 

Jim

(Edited by Helen Foster to remove quoted copy of post being replied to - original submission Tuesday, 22 August 2017, 6:55 PM)

In reply to Jim Maxson

Re: Moodle has lost theme formatting

by Ken Task -
Picture of Particularly helpful Moodlers

Do you have the most recent version of that theme?

https://moodle.org/plugins/pluginversions.php?plugin=theme_fordson

What happens if you change the theme to 'clean'?

It says in /public_html/hcumoodle/repository/ there is a 'video' directory which doesn't appear to be an add-on or plugin to moodle.   That directory has no 'version.php' file.

We'll take this one step at a time ....

What is in that 'video' directory?

'spirit of sharing', Ken

Also ... not sure how a copy of responses are getting into your postings with links.   Are you using just Email to post/repond etc. to moodle forums?     Try clicking the link that takes one to the forum and use the links on the forum to reply, etc.


In reply to Ken Task

Re: Moodle has lost theme formatting

by Jim Maxson -

Version:1.0 StartHTML:0000000105 EndHTML:0000049532 StartFragment:0000040331 EndFragment:0000049492

Ken,

 

The issue is back ☹ 

I went to add a facebook link to the footer of the Fordson theme and BOOM I have lost my Moodle formatting again.  As you mentioned it reared its ugly head at a most inopportune time.  I had renamed the folders with an XX in from of the folder name the last time we communicated and since it came back up I thought that was the fix.  Since the issue has come up again I went into the C-panel file manager and removed the folder.  That didn’t work either.  Here is what debug is throwing out…

 

 

Warning: include(/home/hcuonlin/public_html/hcumoodle/repository/video/version.php): failed to open stream: No such file or directory in /home/hcuonlin/public_html/hcumoodle/lib/classes/component.php on line 1165

Warning: include(): Failed opening '/home/hcuonlin/public_html/hcumoodle/repository/video/version.php' for inclusion (include_path='/home/hcuonlin/public_html/hcumoodle/lib/pear:.:/opt/alt/php56/usr/share/pear:/opt/alt/php56/usr/share/php') in /home/hcuonlin/public_html/hcumoodle/lib/classes/component.php on line 1165

Warning: include(/home/hcuonlin/public_html/hcumoodle/repository/video/version.php): failed to open stream: No such file or directory in /home/hcuonlin/public_html/hcumoodle/lib/classes/plugin_manager.php on line 305

Warning: include(): Failed opening '/home/hcuonlin/public_html/hcumoodle/repository/video/version.php' for inclusion (include_path='/home/hcuonlin/public_html/hcumoodle/lib/pear:.:/opt/alt/php56/usr/share/pear:/opt/alt/php56/usr/share/php') in /home/hcuonlin/public_html/hcumoodle/lib/classes/plugin_manager.php on line 305

Plugin repository_video does not declare valid $plugin->component in its version.php.

  • line 315 of /lib/classes/plugin_manager.php: call to debugging()
  • line 335 of /lib/classes/plugin_manager.php: call to core_plugin_manager->load_present_plugins()
  • line 217 of /lib/classes/plugininfo/base.php: call to core_plugin_manager->get_present_plugins()
  • line 143 of /lib/classes/plugininfo/base.php: call to core\plugininfo\base->load_disk_version()
  • line 97 of /lib/classes/plugininfo/base.php: call to core\plugininfo\base::make_plugin_instance()
  • line 395 of /lib/classes/plugin_manager.php: call to core\plugininfo\base::get_plugins()
  • line 646 of /lib/classes/plugin_manager.php: call to core_plugin_manager->get_plugins_of_type()
  • line 361 of /auth/oauth2/classes/api.php: call to core_plugin_manager->get_plugin_info()
  • line 43 of /auth/oauth2/lib.php: call to auth_oauth2\api::is_enabled()
  • line 5023 of /lib/navigationlib.php: call to auth_oauth2_extend_navigation_user_settings()
  • line 4570 of /lib/navigationlib.php: call to settings_navigation->generate_user_settings()
  • line 4003 of /lib/navigationlib.php: call to settings_navigation->load_user_settings()
  • line 759 of /lib/pagelib.php: call to settings_navigation->initialise()
  • line 820 of /lib/pagelib.php: call to moodle_page->magic_get_settingsnav()
  • line 3425 of /lib/navigationlib.php: call to moodle_page->__get()
  • line 640 of /theme/boost/classes/output/core_renderer.php: call to navbar->get_items()
  • line 48 of /theme/fordson/layout/frontpage.php: call to theme_boost\output\core_renderer->region_main_settings_menu()
  • line 1162 of /lib/outputrenderers.php: call to include()
  • line 1092 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
  • line 114 of /index.php: call to core_renderer->header()

I would appreciate any help or direction you would be willing to offer.

 

Thank you again.

 

Jim


In reply to Jim Maxson

Re: Moodle has lost theme formatting

by Ken Task -
Picture of Particularly helpful Moodlers

Where did this:

Version:1.0 StartHTML:0000000105 EndHTML:0000049532 StartFragment:0000040331 EndFragment:0000049492

come from?

Mind providing a listing of what is in that 'moodlecode/repository/video/' directory?

'spirit of sharing', Ken

In reply to Ken Task

Re: Moodle has lost theme formatting

by Jim Maxson -

I apologize, the version:1.0xxxxx.... copied in from the clipboard...

To answer your other question regarding what was in the subdirectories please see the attached screen shots.  The folders and files are insignificant and can be deleted.  I created them before I really knew where the actual video repository was.

Changing the theme to Clean worked smile  Though I would like to feel that was the fix, previous experience says NO.  Awaiting further instruction...

Thanks again for reaching out.

Best Regards,

Jim


Attachment Capture.JPG1.JPG
Attachment Capture.JPG2.JPG
In reply to Jim Maxson

Re: Moodle has lost theme formatting

by Ken Task -
Picture of Particularly helpful Moodlers
Move the video directory out of moodle code.

I asked from where that version stuff came and you say clipboard?   Copied from what file located where?

If changing theme to something stock ... ie, comes with initial moodle code ... works ... then the only conclusion I can make is the theme you were attempting to use needed to be upgraded.   Did you check the version of the theme you have vs the version available for download/installing for your Moodle version?

Dunno what else I can say!!!!! ;)
'spirit of sharing', Ken

In reply to Ken Task

Re: Moodle has lost theme formatting

by Jim Maxson -

Ken,

Other than going into the c-panel file manager and moving the video directory, how do I move it out of the code?

Best Regards,

Jim


In reply to Jim Maxson

Re: Moodle has lost theme formatting

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Given the stack trace you have a missing or corrupted version.php file for the video repository plugin, therefore:

  1. Get a new version of the plugin as a ZIP etc. of the same version you have installed.
  2. Backup any non-plugin content you have in /home/hcuonlin/public_html/hcumoodle/repository/video/.
  3. Re-upload the version.php file from the extracted ZIP file to /home/hcuonlin/public_html/hcumoodle/repository/video/.
  4. Purge all caches and check the 'Notifications'.

If the problem happens again (you may lose course links to video files):

  1. On the server delete the files in /home/hcuonlin/public_html/hcumoodle/repository/video/ and all sub files / folders within that folder.  You can do this through the UI for plugins (or in the repository I think) then that should run the DB scripts to clear the Database of the plugin's specific data.
  2. Re-upload the contents of the extracted ZIP file to /home/hcuonlin/public_html/hcumoodle/repository/video/.
  3. Purge all caches and check the 'Notifications'.

If the problem happens a second time:

  1. Contact the developer.
  2. Double check your FTP settings to make sure ASCII / Binary files are transferred as such.  Also don't edit the files locally unless using an editor that is UTF-8 and Byte Order Mark aware.

Note: Don't move the folder out of where it should be, that will only confuse Moodle even more!

In reply to Jim Maxson

Re: Moodle has lost theme formatting

by Mark Sharp -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

I have a feeling that you don't actually have a video repository plugin there, but you are trying to upload videos into the repository folder of Moodle.

What you should be doing is enabling the File system repository (https://docs.moodle.org/31/en/File_system_repository)

Then upload your files to the `moodledata` folder.

moodledata\respository\videos

If you can, always plan to test in a test environment rather than a live server.