Theme Issues

Theme Issues

by Fergal McCann -
Number of replies: 25

Hi All,


I went into my theme settings this morning and I was presented with this error. Please see screenshot attached.


Can anyone advise on how to fix this problem??


Thanks,


Fergal

Attachment Screen Shot 2014-07-16 at 12.25.59.png
Average of ratings: -
In reply to Fergal McCann

Re: Theme Issues

by Bret Miller -
Picture of Particularly helpful Moodlers

I haven't seen the error before. Did you try clicking on "more information about this error" to see if it would tell you more? All the error says is it can't access some file. You might also check your apache error log to see if an error is registered there.

In reply to Bret Miller

Re: Theme Issues

by Fergal McCann -

I have click on the "more information about this error" and I this is what is shown up.

http://docs.moodle.org/26/en/error/moodle/storedfilecannotread


This error occurred when I was swapping a moodle 2 installation from one server to another and the actual file in the moodledata directory was not copied over correctly.

The entry in the Moodle 2 database referenced a legacy resource file but the actual file did not exist on the server.

The screen reported Permissions error which is kind of correct but "file not found" would be more appropriate.

See also


It seem to be a problem with the moodledata folder but I am at a lost as how I can fix this issue!!! 

Any Suggestions?

In reply to Fergal McCann

Re: Theme Issues

by John Fones -

I don't know, but guess this might be to do with the upgrade to 2.7.

I have just lost many of my themes as a result of this.

My Moodle site is hosted at mdl2.com and - good though it is - the guys don't automatically re-install all the plug-ins when there is an upgrade.  Why should they?

I'm sure they will act on my request, but this removal or amendment of themes is one of the most frustrating things about Moodle upgrades.

I am shortly beginning my own hosting (purely for my own courses) and will no doubt find that there is extra work to be done, now that all these extra skins have to be installed as plug-ins.

I didn't see any warning of this, and I'm not sure I would have been able to act on it had it appeared.

This isn't a good way for the Moodle meisters to proceed.  Please stop it!

However - Good luck anyway - please post if you have a solution.

In reply to John Fones

Re: Theme Issues

by Floyd Saner -

@John & @Fergal:  I understand your frustration and have been in the same situation many times. However software does evolve, and at some point support for legacy features has to be discontinued.

Moodle clearly documented the theme changes in the Moodle 2.7 release notes.  Moodle 2.7, and subsequent releases, will use Bootstrap-based themes in the core releases. There was discussion about this in various Moodle forums for quite some time prior to the release of Moodle 2.7.  

The good news for you is that the old themes can be downloaded and installed from the Moodle plugins directory.  There is also a section on Themes in the Moodle 2.7 Upgrading documentation.

-Floyd

In reply to Floyd Saner

Re: Theme Issues

by Fergal McCann -

Hi Guys,


Thanks for the input thus far... 

Can this be fixed or what steps will I need to take to fix this problem???



In reply to Fergal McCann

Re: Theme Issues

by Fergal McCann -

I have updated to the latest release of the theme. 


The problem is a moodledata connection problem. I have a slide show and 3 out of the 4 images are not displaying..

The paths to the images are different. The image that is working has the following path:

http://moodle.customizedtraining.co.uk/theme/image.php/essential/theme/1405679614/default_slide

The images that are not working how ever are looking at the following path for the images:

http://moodle.customizedtraining.co.uk/pluginfile.php/1/theme_essential/slide1image/1405679614/CiNP.png


Any suggestions? 


Thanks,

Fergal

In reply to Fergal McCann

Re: Theme Issues

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

Hi Fergal,

Moderator - please move post to themes forum,

Ok, this is odd.  When I updated the slider I deliberately did not change the name of the setting, I.e 'slide1image' so that there would not be an upgrade issue as has been mentioned.  The big number in the URL is correct but when you say the URL had changed, in what way please?  Knowing  the but that has changed will help.

I don't know why you cannot access the settings, does not make sense.  Please can you turn on developer level dubugging which will print lots more info and paste here.

Gareth

In reply to Gareth J Barnard

Re: Theme Issues

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

P.s. for some reason I cannot see the original error message image, could you repost as text please.

In reply to Fergal McCann

Re: Theme Issues

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

Hi Fergal,

This is odd as I can now see the screen shot and even though the slider on the site is the update the rest of the site looks like the old version?  Have you made any customisations?

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Theme Issues

by Fergal McCann -

Hi Gareth,

Sorry for not getting back to you. Was on leave from work. 

I updated the theme from the moodle notifications. I am not sure why or what has happened to the site. I have made no customisations to the theme. 

If you want to dig a bit deeper I can give you access to the site and you can take a look for yourself...

 

In reply to Fergal McCann

Re: Theme Issues

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

Hi Fergal,

Thank you for the offer but I think for the moment more information will be achieved by you turning on developer level debugging and reporting any errors please.

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Theme Issues

by Fergal McCann -

Gareth,

Please see the images debugging errors below:


Debug info: [dataroot]/filedir/5f/10/5f1046c4c1ed5ace245958518298a9b968bbf96d
Error code: storedfilecannotread
Stack trace:
  • line 187 of /lib/filestorage/stored_file.php: file_exception thrown
  • line 881 of /lib/filestorage/stored_file.php: call to stored_file->update()
  • line 424 of /lib/filelib.php: call to stored_file->set_source()
  • line 8307 of /lib/adminlib.php: call to file_prepare_draft_area()
  • line 1376 of /lib/adminlib.php: call to admin_setting_configstoredfile->output_html()
  • line 125 of /admin/settings.php: call to admin_settingpage->output_html()

Thanks,

Fergal

In reply to Fergal McCann

Re: Theme Issues

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

Hi Fergal,

Thank you for the information.  It appears that the theme and the API call is operating correctly and in fact there is an issue with the dataroot permissions in $CFG->dataroot/filedir/5f/10/ where file '5f1046c4c1ed5ace245958518298a9b968bbf96d' may exist and cannot be read by the web server or does not exist for some other reason.  Therefore there is nothing to fix in the theme.  Thank you.

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Theme Issues

by Fergal McCann -

Gareth,

Thanks for your reply! If the issue is not the theme, then what do I need to fix the issue?

Fergal

In reply to Fergal McCann

Re: Theme Issues

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

The easiest thing to do is to delete the image for the one that are not showing up and reload them.

smile

Mary

In reply to Mary Evans

Re: Theme Issues

by Fergal McCann -

Hi Mary,

Thanks for the reply. I have tried but I am unable to access this section of the moodle site as I keep getting an error stating that there is a file permission issue. I am unsure of how to retrieve this or fix this dir.

Any one able to shine some light on this?

Thanks,

Fergal

In reply to Fergal McCann

Re: Theme Issues

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

If I were you, I would change the theme to Clean theme, then uninstall your theme.

Site Administration > Plugins > Manage plugins

In this page scroll to bottom of the page and find your theme. The click on Uninstall 

Then, when told, remove the theme from your site.

Next get the latest version of the theme and install it.

That will fix the problems you seem to have.

Average of ratings: Useful (1)
In reply to Fergal McCann

Re: Theme Issues

by Hartmut Scherer -

Hi Fergal,

Try Mary's suggestion first. If it didn't help with your issue, I suggest the following.

Did you check whether the file 5f1046c4c1ed5ace245958518298a9b968bbf96d is in your Moodledata? Go to cPanel, open the File manager or if you have FTP access to your Moodle installation, you can use FileZilla and look for your Moodledata directory. Then, you need to open the filedir folder, then 5f and then 10. So the complete path should be: Moodledata/filedir/5f/10. Now do you see the file 5f1046c4c1ed5ace245958518298a9b968bbf96d in this folder? If yes, check the permission of the file (my files have 0666 as permission)

If there is no file, you need to check your Moodle DB (cPanel -> phpMyAdmin)

Export entire database -> Click on "Export" in the top menu where all the tables are listed



Customize export-> Select "Custom" (#1) -> add the date of today behind the @ sign (#2) -> select "gzipped" (#3) and scroll down and click on "go." 


After you backed up your database, click on "Structure" in the top menu (same line as "Export") so that you see all the tables of your database.












mdl_files Press on mdl_files. If you like, you can back up this table - just click on "export." It doesn't take long and saves you time in case, you have to import mdl_tables.





searchPress "Search" at the top. Now you should see a list (like below).







pathnamehashGo to "pathnamehash" (#1), change to equal (#2) and add the complete and exact filename with copy and paste into the box (#3).

5f1046c4c1ed5ace245958518298a9b968bbf96d










delete fileIf you have exported your database before and probably also the mdl_files table, you can delete the entry in the database.

Keep the database OPEN.

Now, try to access your Moodle site and see whether it functions properly.



With kind regards,

Hartmut

Average of ratings: Useful (2)
In reply to Hartmut Scherer

Re: Theme Issues

by Fergal McCann -

Hi Hartmut,

Thanks for the reply.

I have followed all your steps but the file doesn't exist anywhere...

I looked in the file dir and the dir 5f is there but the the dir 10 is not see screenshot.

Within the Database I searched for the missing file and it returned as not being present. Again see Screenshot.

Any other suggestions?


Thanks,

Fergal 

In reply to Fergal McCann

Re: Theme Issues

by Hartmut Scherer -

Hi Fergal,

Did you try out Mary's suggestion, switiching to Clean theme, deleting and reinstalling your theme?

What is the debug message when using the Clean theme?

With kind regards,

Hartmut

Average of ratings: Useful (2)
In reply to Hartmut Scherer

Re: Theme Issues

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

Ok, this is really odd.  I've been messing with turning on and off theme designer mode (TDM) and can replicate the issue but with TDM off and therefore the URL's contain a '-1' for theme revision.  This is standard core API stuff, so should affect all themes.  I'll look out for it in others.  Try turning on and off TDM.

In reply to Gareth J Barnard

Re: Theme Issues

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

Ok, possible solution.  Discovered in the access.log of the web server "[31/Jul/2014:14:46:20 +0100] "GET /pluginfile.php/1/theme_essential/slide3image/-1/IMG_2626.JPG HTTP/1.1" 304 -" therefore with a 304 this means 'not modified', therefore despite a purge all caches the browser thought the image had not changed and yet at some point had not retrieved the file for some reason.  Clearing the browsers local cache fixed it for me.

In reply to Gareth J Barnard

Re: Theme Issues

by Fergal McCann -

Problem Solved.

I followed Mary's advice and uninstalled the theme and re-installed it. I lost all the settings but everything is fully functioning now.

Thank you to everyone who provided me with advice and guidance with this issue, it was much appreciated.

Thank you!!

Fergal