Softaculous problems

Softaculous problems

by Abet Laurito -
Number of replies: 19
Hi Howard and Ken..My site is https://academy.fpiche.org and  I also just encountered this same issue with Softaculous after attempting to upgrade to Version 3.64. It gave an Error 500.  My webhost did a restore to the previous version and initially I thought there was no more problem until I noticed that the Site Admin link does not work anymore (see image below). Any attempt to access the admin page gave this same exception error. However I still can access the site and my courses are still intact. Please help us if you can. Thanks.
Site Admin not working
Average of ratings: -
In reply to Abet Laurito

Re: Exception - Call to a member function add() on null after UPDATE

by Ken Task -
Picture of Particularly helpful Moodlers

@Abet ... turn on debugging via copying lines for debugging in config-dist.php file to your config.php file.

Your issue and other posters issues might not be the same and the only similar is (cough/spit) 'SoftAckNotSoAcculous'!

'SoS', Ken


In reply to Ken Task

Re: Exception - Call to a member function add() on null after UPDATE

by Abet Laurito -
I was able to use a file editor to copy the config-dist.php and config.php from my site directory. I also saw the last softaculous backup files in the same directory. I am attaching them in this post for your analysis and more detailed instructions. Thanks.

(Edited by Helen Foster to remove attachments - original submission Sunday, 7 July 2019, 5:45 PM)

In reply to Abet Laurito

Re: Exception - Call to a member function add() on null after UPDATE

by Abet Laurito -
I'm sorry but I could not upload here the files from the Softaculous backup directory in my site as they have big sizes.
In reply to Abet Laurito

Re: Exception - Call to a member function add() on null after UPDATE

by Ken Task -
Picture of Particularly helpful Moodlers

Moderator ... @Howard if it's you!!!! Please remove @Abet's attached config files ... disclose too much!

@Abet ...

Do NOT upload 'SoftAcceident' backup files!!!!  Too large for one and really contains a lot more info than you know ... someone could use to reverse engineer access to your site!

From section 7 of config-dist.php

Copy the following lines from config-dist.php to config.php


// @error_reporting(E_ALL | E_STRICT); // NOT FOR PRODUCTION SERVERS!
// @ini_set('display_errors', '1');    // NOT FOR PRODUCTION SERVERS!
// $CFG->debug = (E_ALL | E_STRICT);   // === DEBUG_DEVELOPER - NOT FOR PRODUCTION SERVERS!
// $CFG->debugdisplay = 1;             // NOT FOR PRODUCTION SERVERS!

put them above the comments at the end of active config.php

To enable ... remove the // in front of each line.

No need to restart anything, just access site and do whatever.

Once done with this, suggest leaving the lines but commenting them out again by putting // in front of each line .... especially if you continue to use 'SoftAcceident' ... nope, I spelled it the way I wanted to spell it ... more descriptive me thinks! smile

IMHO, it's darn near criminal! :\

'SoS', Ken



In reply to Ken Task

Re: Exception - Call to a member function add() on null after UPDATE

by Abet Laurito -
Hi Ken:

I tried this and this time the Site Administration link is just taking its sweet time loading but nothing is happening. Please check what I did below.
editedconfig
In reply to Abet Laurito

Re: Exception - Call to a member function add() on null after UPDATE

by Abet Laurito -
Here is also the result from the JS Console:
jsconsole2
In reply to Ken Task

Re: Exception - Call to a member function add() on null after UPDATE

by Abet Laurito -

Hi Ken:

Hope you can help me with the attached file containing the recorded errors.

Thanks.

Abet

In reply to Abet Laurito

Re: Exception - Call to a member function add() on null after UPDATE

by Ken Task -
Picture of Particularly helpful Moodlers

About the only thing I can see looking at that log file and can say ... 'Softridiculousness' didn't work, did it?

All the way through the log ...

Duplicate admin category name: users

Duplicate admin category name: courses

Duplicate admin category name: grades

ditto ... with different admin category.

And this one:

Exception - Call to a member function add() on null

which looks like the upgrade failed to add a member function of some sort.

Do see /theme/adaptable/ in log shared.

https://moodle.org/plugins/theme_adaptable

which has a fairly obvious 'red' box that says:

"The latest version of Adaptable for M3.6+ has been re-written to use Boost as a parent theme.
If you are upgrading the theme on an existing site be sure to test before applying to your live site.
"

In config.php add a line:

$CFG->theme='boost';

Dunno if that will help/clean up the other or not ... am not hopeful.

So all I can say is 'Softridiculousness' didn't do an environment check nor did it adjust automagically the theme ... nor did it ... nor did it ... and so on an so forth.

Suggestion: get the permanent link for this thread.   Go to your providers helpdesk and share the link.   And if you know of a contact from 'Softridiculousness' also share same link with them.

'Softridiculousness' is software provided by your provider.  That being the case your provider has told you it will work ... otherwise, why would they provide it to you, the customer?  

Obviously, it did not work.  

Who is to blame?  'Softridiculousness' Who should fix? 'Softridiculousness'/Provider.

Sorry ... but looks like you are in between a rock and a hard place ... no one over here in this community put you there ... moodle code didn't put you there ... your provider and 'Softridiculousness' did! :|

'spirit of sharing', Ken

In reply to Ken Task

Re: Exception - Call to a member function add() on null after UPDATE

by Abet Laurito -

Hi Ken:

Sorry for this delayed reply. I did pursue my ticket with my host provider using your suggested approach and the best they could do for me was to restore my complete site before I made the upgrade. The site is now up again with no more site administration access error. I guess I'll stick with Version 3.55 for the moment until I'm brave enough to do the manual upgrade. It's also good Cristina was able to solve her problem by herself.

Thanks a lot for the time spent on this and do tell me if you  want to come to Manila next year for Moodlemoot 2020 Philippines. Same goes for Howard, thanks!

Abet

In reply to Abet Laurito

Re: Exception - Call to a member function add() on null after UPDATE

by Ken Task -
Picture of Particularly helpful Moodlers

There have been numerous postings in these community forums about upgrading moodle via Softac.  None have granted me access to their sites (cPanel/Terminal/Moodle) to be able to see just what those upgrades did and maybe why they failed.

Theory ... if provider offers a Softac upgrade for moodle, it might work *IF* the upgrade is one hop upwards ... and that hop upwards doesn't have moodle requirements for higher PHP or MySQL config tweaks.  IF the Softac upgrade is a hyperjump ... like 3.5.x to 3.7.x it doesn't appear to be smart enough to make the adjustments to PHP/MySQL (character set/collations) etc. and a biggy ... themes ...  and it fails with some very abnormal issues.

What's criminal about it? Provider and Softac say to come to community forums for a resolution to the problem ... provider and Softac are commercial ... they should provide that level of support as well.

SoftTac has it's own forums for support ... can view some without signing up with an account ... me, I don't want to buy it, install it, just to get access to customer side of those forums to see if they offer any support for failed moodle upgrades.

https://www.softaculous.com/board/index.php?

Cristina was able to do a work-around ... you probably could have also ... she found she could get to courses and the course admin menu.   There she was able to create course backups.   Those backups, however, used the default backups config which is set in admin areas of the her moodle and she couldn't get there.  If left for defaults, backups included users, all their work, grades, etc.   Cept her's had one hickup/glitch ... the course backup she shared with me so I could inspect and attempt to restore to a sandbox moodle, had the admin user as a user in the course - admin user id #2 - superadmin.  Restore failed due to conflict of users ... shouldn't have had admin user id #2 as a course member.  Fix ... edit users.xml in extracted .mbz file, remove admin user, save xml, rebuild the .mbz backup to another filename.   Restore was then successful via course admin menus.

Lesson learned ... don't assign admin level users to courses.

If I were 10 years younger might consider your kind invitation to attend MoodleMoot in your nation/country.   But, alas, I don't travel well ... and besides, my teacher retirement isn't such that one could travel often.

Yes ... do try the manual upgrade ... but do check environment of current site to see if it can handle 3.7.x and do check plugins/themes for compatiblity with destination version - moodle won't do that ... has to be done manually .... unless there is some plugin now that does that!

That's one good thing about a Moodle ... admin can install plugins ... but guess what is also a bad thing about Moodle ... same ... admin can install plugins .... and if not done with compat version and in correct fashion, issues with the moodle ... either minor/annoying or major ... 'white screen of death'. sad

'SoS', Ken


Average of ratings: Useful (1)
In reply to Ken Task

Re: Exception - Call to a member function add() on null after UPDATE

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
To extend this a bit.... all these one-click installers (including the ones available from moodle.org) are fine for quickly trying out Moodle but that's the limit. None of them are suitable for running a proper, production site.

I've said it before - and I'm sure I'll say it again - running a production web site on the Public Interweb requires some skills. None are rocket science and can be readily acquired - as long as you understand that you have to acquire them.

In the great scheme of things, Moodle is quite an easy system to implement. Well, up to a point anyway.

So, please, if you are running a Moodle site for real users do not use Softaculous, don't use Bitbucket, don't use Linux packages or anything else. Only ever download Moodle from moodle.org and follow the installation instructions. If you get stuck or aren't sure, we'll be very pleased to help. Just ask!
In reply to Ken Task

Re: Exception - Call to a member function add() on null after UPDATE

by Jeff Shelp -

Forcing the theme to boost via the config.php file solved my problem after upgrading (500 error).

In reply to Abet Laurito

Re: Softaculous problems

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Just to note that I split this from the other discussion. It may or may not be the same issue but these things can get incredibly confusing. 

I also deleted your posting in another thread. PLEASE don't post more than once about the same problem. 

In addition to Ken's advice, this sort of thing can be caused by a Javascript issue. Open up your browser's Javascript Console and reload the page. look for any (red) error messages that are generated. 

If you're not using a core theme, try switching to Boost by adding 

$CFG->theme = 'boost'; 

...in your config.php
In reply to Howard Miller

Re: Softaculous problems

by Abet Laurito -

Howard/Ken

Thanks  a lot for your suggestions. I am not comfortable however in editing javascripts and so I may just refer the matter to a local Moodle Partner. I have just started this site and I was able to back up all of the courses anyway and was thinking of just removing completely the current installation and just doing another reinstallation, and afterwards restoring all the courses. Tell me what you think of this move.

Abet

In reply to Abet Laurito

Re: Softaculous problems

by Ken Task -
Picture of Particularly helpful Moodlers

One suggestion ...

use cPanel to remove the contents of ... repeat contents of ...

moodledata/cache/ .... that's 'moodledata' not code directory.

and the contents of .... repeat contents of ...

moodledata/sessions/

Also clear your browser cookies for your site.

Consult Google if you need help with that! smile

'SoS', Ken


In reply to Ken Task

Re: Softaculous problems

by Abet Laurito -
Hi Ken,

Tried this and it didn't work. Will try the config editing.

Abet