Moodle 3.3 upgrade

Moodle 3.3 upgrade

by Mike Sollitt -
Number of replies: 14

Hi .. first time, please be gentle!

Just upgraded from 3.1 to 3.3 and now some (not all) static content such as .docx and .pdf will not open correctly after download.  I can't find any other posts about this so .....

The .docx error says "the file cannot be opened because there are problems with the contents" although they are then subsequently recoverable by clicking through.  The more random .pdf error message varies seemingly dependent upon the browser being used, but they will not open.  There are 'workarounds' that I've found however:

1. Download the folder containing the pdf in its entirety, and then it opens fine.

2. Choose to ' Edit' the containing folder, right click the .pdf and then choose 'download' in the pop up. Select 'open with adobe reader' and all is fine.

I can't see an obvious pattern as to why some open and some don't, it doesn't seem to matter how big or small the file is nor whether it's an odler or newer inclusion on the site

This is across all my courses and on all browsers tried (Chrome, Edge, Firefox).  Server OS is linux, php v.5.6.24

Any help gratefully received..

Mike

Average of ratings: -
In reply to Mike Sollitt

Re: Moodle 3.3 upgrade

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Can you tell us how you upgraded?

In reply to Emma Richardson

Re: Moodle 3.3 upgrade

by Mike Sollitt -

Softaculous Installer, as I usually do .. 

In reply to Mike Sollitt

Re: Moodle 3.3 upgrade

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

That is probably the issue.  We always recommend not using installers as we do not know what they do and then it is very hard to troubleshoot.  You might check permissions maybe?

In reply to Mike Sollitt

Re: Moodle 3.3 upgrade

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Historically, these one-click installers seem to have pretty good success with the first install of Moodle (from what I have seen through the years, maybe 75% or better), but they have terrible success doing upgrades (from what I have seen through the years, maybe 10% or worse.)  The best solution is to learn how to upgrade manually.  Upgrading your moodle might only take 10 minutes or less, but learning how to upgrade might take several hours, or more.

In reply to Mike Sollitt

Re: Moodle 3.3 upgrade

by Ken Task -
Picture of Particularly helpful Moodlers

So the script installer provided by the hoster (which you pay for) did an upgrade skipping a version from 3.1 to 3.3 ... skipping 3.2.  And, lemmie guess, helpdesk where you host said to come to community forums for resolution to the problem ... a script hoster provides you did the upgrade.   No one in these forums works for hoster nor the company that makes the software that did the upgrade ....  Hmmmmm ....

Anyhoo ... other than checking permissions/ownership, might try turning on Debugging (all the way to developer) and try to download something/anything.   See if debug says anything.

You might also look at your apache (assuming you are running apache) error logs for things like 'warnings' related to downloads.   Those warnings are not errors serious enough to halt something but might give a clue.

Right after the upgrade, did the site look 'wonky'?   or was the site slower than before?

Go to Site Admin menu, Server, Environment and first update the component - link in upper right corner of that screen.

What, iF anything, does the environment check show that isn't 'green' or OK?

All hosters are not alike ... mind sharing with whom you host?   And is it a cheapo package?

'spirit of sharing', Ken


In reply to Ken Task

Re: Moodle 3.3 upgrade

by Mike Sollitt -

Hello Ken, I appreciate you taking the time to reply to my post, thanks for that.

On cPanel, I located the 'error logs' and there is nothing in there at all.

After the update, the site has generally been fine in all respects aside from this issue.

Yes a cheapo package, with United Hosting (who as you rightly identify are not generally any help whatsoever when things go awry.)

I will try the other measures that you've suggested at some point this afternoon.

Atb

Mike


In reply to Ken Task

Re: Moodle 3.3 upgrade

by Mike Sollitt -

Ok so I tried to update the environment component as you suggested and received an error message (see attached screenshot #1).  There are other issues that became apparent - see screenshot #2 and #3.

What order should I tackle these issues in please?

Mike

In reply to Mike Sollitt

Re: Moodle 3.3 upgrade

by Ken Task -
Picture of Particularly helpful Moodlers

Please find some way to share screen shots other than Microsoft docx or any Microsoft product.   Many help desk personal will not open such documents ... matter of fact they don't have MS Office on their workstation.

For the benefit of others I have converted each of the pics in the docx to png and am attaching here.

Do this one first ... acquire the enviroment files and place them in the proper sport.   Evidently your server/hosting is not allowing the download of the updated environment.xml file.

Will respond to the others in separate replies.

'spirit of sharing', Ken

Attachment downloadcomponent.png
In reply to Ken Task

Re: Moodle 3.3 upgrade

by Ken Task -
Picture of Particularly helpful Moodlers

The screen shot concerning php-opcache is optional.

But probably should be enabled.   That may not be something you can do on shared host if php-opcache isn't installed on the shared server.   That would be a provider helpdesk request.   Can tell you that on shared servers they are hesitant to do things for single customers because they do NOT know the affects on all the other customers on that shared host.



Attachment environmentchecks.png
In reply to Ken Task

Re: Moodle 3.3 upgrade

by Ken Task -
Picture of Particularly helpful Moodlers

This last one involves DB and one has to be superuser to make those changes.   On shared host your login/pass isn't superuser.  Here again, you could attempt a helpdesk request, but am almost certain they will say no to changing DB server config for the same reasons given above.

The one exception would be the recommendation you run your site as https ... which requires you to purchase a certificate from a CA ... that you might be able to do via whatever CPanel icon there is.   Before doing that, check with provider help desk ... that one they should be able to help you with.

Comment: IF you ever want full featured 3.3 and beyond, you will have to move upwards in hosting package where you are the only customer.   OR provider will have to start providing servers especially configured for Moodle.

'spirit of sharing', Ken


In reply to Ken Task

Re: Moodle 3.3 upgrade

by Mike Sollitt -

Hello Ken

Thanks again for your input.

Tried to 'upgrade' the xml file as suggested, but still get error message ref: screenshot #1.

It appears that the zip file extracted ok as 'environment' folder inside moodledata shows correct timestamp under 'last modified' (screenshot #4).

However the .xml file inside still shows a 'last modified' stamp of 29/6/17, i.e. when I performed 3.3 upgrade. (screenshot #5)

Is this a 'permissions' issue?

Regards

Mike


Attachment screenshot#4.png
Attachment screenshot#5.png
In reply to Mike Sollitt

Re: Moodle 3.3 upgrade

by Ken Task -
Picture of Particularly helpful Moodlers

Screen shot shows you've uploaded and unzipped the environment.zip in moodledata.

The environment.xml file belongs in moodlecode/admin/

There should be an environment.php script in that zip me thinks.   Where did the .zip file come from?

There is a similar discussion (on going) about the same thing me think:

https://moodle.org/mod/forum/discuss.php?d=346561#p1431629

You should not be forced to upload any zip ....

Go to Site Admin Menu -> Server -> Environment

There is a link in the top right corner of that screen that says 'Update Component'.

See pic.   Click that.

'spirit of sharing', Ken


Attachment Screen Shot 2017-07-04 at 6.23.21 AM.png
In reply to Ken Task

Re: Moodle 3.3 upgrade

by Mike Sollitt -

That's where I got the zip file from, i.e. by clicking the 'Update component' link.  

If you look at screenshot#1 from yesterday, you'll see that the error message contains a link to the zip with instruction to copy it to "dataroot" ... which I thought was the Moodledata folder?

Thanks again for your input Ken, I'll go look at that other discussion ...

Mike

In reply to Mike Sollitt

Re: Moodle 3.3 upgrade

by Ken Task -
Picture of Particularly helpful Moodlers

Well, that's 'special'!   Have a moodle 3.1, 3.2, and a 3.3 on a server and clicking that 'update component' link doesn't download a zip ... of course I don't get the same notices screens you do as the server upon which the above versions reside meets requirements.

To the best of my knowledge, environment.php and environment.xml have always been in moodlecode/admin/

'spirit of sharing', Ken

Attachment Screen Shot 2017-07-04 at 7.39.30 AM.png