Quantcast
Channel: Installing and upgrading help
Viewing all 46949 articles
Browse latest View live

Issue after upgrade to 3.8+

$
0
0
by Brian Pool.  

I just upgraded to the recent 3.8+ from the version two weeks ago.  Now when I hit the "Check for Available Updates" in the Site Administration-Notifications I get the following at the top of the page.  Everything else seems to be working fine, at least on first inspection.

Notice: Constant PROFILE_VISIBLE_ALL already defined in /var/www/html/user/profile/lib.php on line 30

Notice: Constant PROFILE_VISIBLE_PRIVATE already defined in /var/www/html/user/profile/lib.php on line 36

Notice: Constant PROFILE_VISIBLE_NONE already defined in /var/www/html/user/profile/lib.php on line 41


Does anyone know if this is an issue I need to be concerned with, or how to fix?

Thanks,

Brian


Re: Issue after upgrade to 3.8+

$
0
0
by Howard Miller.  

That's where those constants are supposed to be defined. It's a concern that they are being defined somewhere else (or that library is being re-required). Make sure you have debugging turned up to Developer and give us the full trace for one of those messages.

Javascript errors after upgrade

$
0
0
by Jordan Dohms.  

Hello,

We recently upgraded from Moodle 3.5 to 3.9 and the upgrade seemed to go without hiccup.

I am now, however, getting an error trying to add activities/resources to a course.  It seems to be a javaScript error.

When I click "Add an activity or resource" (as a site admin) the dialog appears, with a loading spinner and it never loads the list of choices to add.  I've disabled all additional plugins, cleared caches, but still nothing.


In my browser debug console i'm seeing the following:

"Unhandled promise rejection" [object Object]{errorcode: "invaliduser", link: "https://courses...", message: "Invalid user", moreinfourl: "http://docs.moodle.org/39/en/error/moodle/invaliduser"}

in https://courses.../lib/javascript.php/1593791298/lib/babel-polyfill/polyfill.min.js

I'm not seeing any PHP or Apache errors, unfortunately. Anyone have an idea how to track down the source of this issue?  Was it something that went awry with the upgrade?

Re: Javascript errors after upgrade

$
0
0
by Ken Task.  

When you say "...cleared caches..." did you do that via Moodle Admin UX or via command line rm -fR moodledata/cache/ and rm -fR moodledata/localcache/

Not a programmer ... but this:

"Unhandled promise rejection" [object Object]{errorcode: "invaliduser"

does look like a javascript issue related to user ...

and for what it's worth ...

git acquired code ... directories moodle35, moodle36, moodle37, moodle38, and moodle39

find ./moodle??/ -name polyfill.min.js
./moodle38//lib/babel-polyfill/polyfill.min.js
./moodle39//lib/babel-polyfill/polyfill.min.js

find ./moodle??/ -name polyfill.js
./moodle37/lib/mdn-polyfills/polyfill.js
./moodle38/lib/mdn-polyfills/polyfill.js
./moodle38/lib/babel-polyfill/polyfill.js
./moodle39/lib/babel-polyfill/polyfill.js
./moodle39/lib/polyfills/polyfill.js

Looks like some mdn and babel-polyfill ...

Hmmm ... I wonder.

'SoS', Ken

JSON Parse error: Unexpected EOF

$
0
0
by Abdelmalek Nezzal.  

Hi,

On my localhost moodle 3.9 that I've installed with MAMP, I've this message only when I go to Dashboard , any Help:



Re: JSON Parse error: Unexpected EOF

$
0
0
by Ken Task.  

Similar problems reported already ... no way to replicate ... therefore no resolution.

So ... try this:

In your /Applications/MAMP/conf/php7.2.10 (which ever php version you have)
check php.ini for short_open_tag ... if Off turn On.

Terminal command located in above path:

fgrep 'short_open_tag' php.ini

If it shows:
; short_open_tag
short_open_tag = Off

Edit php.ini with nano ....
nano php.ini ... find the short_open_tag line and change it to:

short_open_tag = On

Save the php.ini file.

Restart your MAMP.

Fingers cross for ya!  Good luck!

'SoS', Ken

Re: JSON Parse error: Unexpected EOF

$
0
0
by Abdelmalek Nezzal.  

Hi,

I've changed it to : short_open_tag = On , and restart but I've the same error message on the dashboard for all the commands on it 😀 What can I do next please.



Re: JSON Parse error: Unexpected EOF

$
0
0
by Ken Task.  

Have you tried Googling for:
SyntaxError JSON Parse error: Unexpected EOF

https://www.google.com/search?q=SyntaxError+JSON+Parse+error%3A+Unexpected+EOF

Found in apps other than moodle ... and one won't find a link to MAMP/moodle using above sooooooo????


In the MAMP directory there is also a logs directory.
Contained therein, apache_error.log and a php_error.log
Now don't upload to these forums the entire log file.
Do look at them to see if you can find lines related to  accessing the Dashboard for a clue.

3.9 is right out of the shrink wrap ... so wonder if a minor update isn't already needed.   You might not know this but think MAMP can use git these days.

Let's check some things ... in terminal ... located in /Applications/MAMP/htdocs/moodle39

The commands:

fgrep '$release' version.php

What does that show?

Same location in terminal enter:

git branch -a

Yours should show:
* MOODLE_39_STABLE
  remotes/origin/MOODLE_39_STABLE

Haven't tried the following but if it works you can get minor updates ... the point releases to your version 3.9.0 or 3.9+ to sub versions like 3.9.1 or 3.9.2 etc.

With MAMP running
Same location in terminal:

git pull

Go back to the GUI MAMP refresh ... see if it upgrades.

Good luck!

'SoS', Ken



Re: version 10.2.29 is required and you are running 5.7.30

$
0
0
by Petr Chernov.  

Hello from Russia. Today I ran into similar problem installing latest Moodle 3.9 on server. The error was: “databasemariadb (5.7.26-29) version 10.2.29 is required and you are running 5.7.26.29”. Solution was to edit config.php as follows:

$CFG->dbtype    = 'mysqli';(not mysql) It solved the problem. Probably it would have been better to choose mysqli, not mariadb from start during installation, I am not sure.

It’s interesting that on local PC using XAMPP things look different. If I choose mariadb, everything goes smooth. But if I pick mysqli it comes to error and I have to edit config.php writing mariadb. Go figure) May be folks in Moodle should slow down a bit and not run ahead of existing infrastructure.


Exception - Call to undefined method license_manager::get_active_licenses_as_array()

$
0
0
by James Alborough.  

I tried to upgrade from 3.8.3 to 3.9 and realized that the server doesn't have the necessary Maria DB version, so I reverted to 3.8.3 via a server backup. Now, I can't access any admin functions without seeing this error:

Exception - Call to undefined method license_manager::get_active_licenses_as_array()

The front end seems to work, but every time I go to admin, I get that error. Any clues?

Re: Exception - Call to undefined method license_manager::get_active_licenses_as_array()

$
0
0
by Howard Miller.  

Moving to Installation and upgrading forum...

Re: Exception - Call to undefined method license_manager::get_active_licenses_as_array()

$
0
0
by Howard Miller.  

If it worked, it broke and you restored then the obvious conclusion is that the restore was incomplete or failed.

Did you restore everything? The Moodle code, the moodle file data and the database?

Re: Exception - Call to undefined method license_manager::get_active_licenses_as_array()

$
0
0
by James Alborough.  

Yes, I believe I restored everything: moodledata, the database and the moodle code.
Any insight into what it is looking for? the error appears at /admin/index.php, /admin/search.php etc.

Re: Exception - Call to undefined method license_manager::get_active_licenses_as_array()

$
0
0
by Ken Task.  

After you login as admin user, use the URL line of browser and go directly to:

/admin/purgecaches.php

Did that fix?   If not, ditto ... for this URL:

/admin/settings.php?section=debugging

Turn on debugging all the way to developer level.

Then using URL line in browser again, go directly to:
/admin/search.php

Share back any debug lines moodle spits out.

Also, mind doing this query on your db?

mysql> select * from mdl_config where name like '%license%';

What shows?

'SoS', Ken

Re: Exception - Call to undefined method license_manager::get_active_licenses_as_array()

$
0
0
by James Alborough.  

Hi Ken,
I tried /admin/purgecaches.php with no change (error still displays)

/admin/settings.php?section=debugging also shows the same error.

the DB result is shown in the attached screen snap.


Re: Exception - Call to undefined method license_manager::get_active_licenses_as_array()

$
0
0
by Ken Task.  

By chance do you have something wordpress or other in front of your Moodle? ... and a moodle addon to interact with that?

So you never saw a form that allowed you to turn on debugging by doing directly to /admin/settings.php?section=debugging?

So your site is https://somesite.somenet.net/moodle/ and after you login as admin level, you use the browser url line which has something like:

https://somesite.somenet.net/moodle/

and add at the tail end ...

admin/settings.php?section=debugging

So now your URL line looks like:

https://somesite.somenet.net/moodle/admin/settings.php?section=debugging

All on the URL line.   You hit enter from key board to tell browser to 'go'.

It just shows the same error and went no where.

Strange ... very strange.

Let's add these lines to your config.php file:
@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!

Do NOT add those lines to the bottom of the file beyond the comment about php closing tag.

Add them just above those comments.

No need to restart anything ... just go to site and login ... now let's see what Moodle might say.

The query shows (at least the rows asked for) that you DB is a 3.8.x ... a 3.9 database has

mysql> select * from mdl_config where name like '%license%';
+-----+-------------------------+-------------------------------------------------------------------------+
| id  | name                    | value                                                                   |
+-----+-------------------------+-------------------------------------------------------------------------+
|  28 | licenses                | unknown,allrightsreserved,public,cc,cc-nd,cc-nc-nd,cc-nc,cc-nc-sa,cc-sa |
|  29 | sitedefaultlicense      | unknown                                                                 |
| 152 | rememberuserlicensepref | 1                                                                       |
+-----+-------------------------+-------------------------------------------------------------------------+

Since you've had to essentially replace EVERYTHING .. did you check ownerships/permissions again on files that were restored to site?

About caches ... time to get nasty ... use whatever you have to browse files in your site, and go to moodledata directory.   In there there is a cache directory.   Remove the contents of ... again ... remove the contents of ... the cache directory.   Do same for the localcache directory and for the sessions directory (if that exist).

I'll bet next time you'll take the time to check Site Admin Menu, Server, Environment to see if you server meets specs.  Too bad that's link to environment isn't on the notifications 'nag screen' to remind admin user to do so (that's been suggested but ....).

'SoS', Ken


Re: Exception - Call to undefined method license_manager::get_active_licenses_as_array()

$
0
0
by James Alborough.  

Ha, you are right about learning lessons!

All your assumptions about paths, etc. are correct. The installation is at https://www.hainesfire.org/training and while https://www.hainesfire.org/ is a drupal site, there is no connection between the two.

After adding the debug lines and clearing out the contents of cache, localcache and sessions and then going to https://www.hainesfire.org/training/admin/search.php, I get the following output (see file)

Thank you for you attention and help!

Re: Exception - Call to undefined method license_manager::get_active_licenses_as_array()

$
0
0
by Ken Task.  

Did you have h5p installed in the 3.8.x as an add on?

Reason asked ... h5p became part of core in 3.9 ... this clip from error:

Duplicate admin category name: h5p

    line 961 of /lib/adminlib.php: call to debugging()
    line 34 of /admin/settings/top.php: call to admin_category->add()
    line 8372 of /lib/adminlib.php: call to require()
    line 4320 of /lib/navigationlib.php: call to admin_get_root()
    line 4183 of /lib/navigationlib.php: call to settings_navigation->load_administration_settings()
    line 769 of /lib/pagelib.php: call to settings_navigation->initialise()
    line 830 of /lib/pagelib.php: call to moodle_page->magic_get_settingsnav()
    line 3535 of /lib/navigationlib.php: call to moodle_page->__get()
    line 4488 of /lib/outputrenderers.php: call to navbar->get_items()
    line 44 of /theme/boost/layout/columns2.php: call to core_renderer->region_main_settings_menu()
    line 1374 of /lib/outputrenderers.php: call to include()
    line 1304 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
    line 2806 of /lib/outputrenderers.php: call to core_renderer->header()
    line 1941 of /lib/setuplib.php: call to core_renderer->fatal_error()
    line 386 of /lib/setuplib.php: call to bootstrap_renderer->__call()
    line ? of unknownfile: call to default_exception_handler()

duplicate admin category name doesn't sound like you restored an sql dump/backup to a ***NEW*** database but an existing existing database.

The sql dump (backup) of the moodle shouldn't be an sql dump of all databases in one .sql file.   That moodle sql dump should be only the DB for moodle.

'SoS', Ken

Re: Exception - Call to undefined method license_manager::get_active_licenses_as_array()

$
0
0
by James Alborough.  

I think you and I were thinking along the same lines about there being extra files in my moodle folder.

From what I can tell, my "replacement" done through a Cpanel server rewind was actually a merge that replaced certain files and left various 3.9 files (instead of totally replacing the moodle folder). The result was a blend of 3.9 files and 3.83 files instead of a pure 3.8.3 file set.

Now that I uploaded a brand new 3.8.3 and added the config file, all seems to be back to normal again.

Definitely a lesson learned about 1) checking the the environment and 2) making a backup before upgrading.

Thank you so much for your help!

Re: Exception - Call to undefined method license_manager::get_active_licenses_as_array()

$
0
0
by Ken Task.  

Congrats!  All is well ... that ends well.

Now some stupid comments from me ... this part: 'Cpanel server rewind' sounds like you are administering the server backend via cPanel ... does your a2 hosting provider have 'one click' installs of apps .. like Moodle?  Beware of one click upgrades.   The very often do not work and no one here in community forums works for hosting provider (other than Moodle Partners) nor the $ apps that install/update (thinking Softaculous here).

Upgrade to 3.9 ... think I'd wait a while ... it's 3.9+ which is a bump of a .0 release.   Wait for a .1 or .2 release ... more bug fixes etc.

Also study up on how to upgrade.

https://docs.moodle.org/39/en/Upgrading

Note the first items are an Envioronment check and a full site backup!

Haines, AK ... hmmmm ... many year ago I graduated from Ben Eielson HS Ben Eielson AFB ... south of Fairbanks ... entire State is beautiful!

'Spirit of Sharing', Ken

Viewing all 46949 articles
Browse latest View live