Cannot Create A Learning Object

Install and configure FormaLMS and DoceboCE
Post Reply
mltai_lms
Newbie
Posts: 5
Joined: Thu May 07, 2020 4:13 pm

Cannot Create A Learning Object

Post by mltai_lms »

Code: Select all

Server information
Server software : : nginx/1.17.10
Mysql Client Version : : 5.0.12
Forma LMS Version: 2.4.1

PHP Version : : 7.0.33-27+ubuntu20.04.1+deb.sury.org+1

magic_quotes_gpc = OFF
Safe mode = OFF
register_global = OFF
file_uploads = On
allow_url_fopen = On
short_open_tag = On
memory_limit = 256M
upload_max_filesize = 100M
max_execution_time = 360
Everything seems to work up until creating a learning object. While attempting to add any New Learning Object to my new course, it proceeds to this URL(Note: Domain name has been edited to "forma"):

Code: Select all

https://forma/appLms/index.php?modname=storage&op=display&sor=organization1&organization_createLOEnd=1&id_lo=6&create_result=1
...with a general 500 error in Chrome:
forma is currently unable to handle this request.
HTTP ERROR 500
Other browsers show as blank page...

I get the following PHP error every time no matter what object i try to add or browser I use:

Code: Select all

Stack trace:
#0 /var/www/forma/appLms/modules/organization/orglib.php(1121): RepoTreeView->extendedParsing(Array, Array, Array)
#1 /var/www/forma/lib/lib.treeview.php(456): Org_TreeView->extendedParsing(Array, Array, Array)
#2 /var/www/forma/appLms/class.module/class.organization.php(85): TreeView->parsePositionData(Array, Array, Array)
#3 /var/www/forma/appLms/modules/storage/storage.php(97): Module_Organization->initialize()
#4 /var/www/forma/appLms/modules/storage/storage.php(176): storage_display()
#5 /var/www/forma/appLms/class.module/class.definition.php(105): include('/var/www/forma....')
#6 /var/www/forma/appLms/index.php(84): LmsModule->loadBody()
#7 {main}
  thrown in /var/www/forma/appLms/lib/lib.repo.php on line 640" while reading response header from upstream, client: 192.168.0.50, server: forma, request: "GET /appLms/index.php?modname=storage&op=display&sor=organizat>
alfa24
Senior Boarder
Posts: 2008
Joined: Fri Nov 24, 2017 8:45 am

Re: Cannot Create A Learning Object

Post by alfa24 »

Can you turn the debug on and post the stack trace you get in the browser?
Per supporto GRATUITO contattatemi in privato qui
User avatar
CisterNino
FormaLms User
Posts: 72
Joined: Mon May 06, 2013 2:59 pm

Re: Cannot Create A Learning Object

Post by CisterNino »

It seems you have problem in uploading files from your computer:

"while reading response header from upstream, client: 192.168.0.50, server: forma, request: "GET /appLms/index.php?modname=storage&op=display&sor=organizat>"

If you are trying to upload something to forma, try to do it from a different computer, just to clear this doubt.
I'm Livio, the Two. If you need, you can contact the one.
mltai_lms
Newbie
Posts: 5
Joined: Thu May 07, 2020 4:13 pm

Re: Cannot Create A Learning Object

Post by mltai_lms »

This occurs without uploading any documents.
The steps I take are
1. Click Enter on the Course.
2. Under Course Objects, click New Learning Object.
3. Click HTML Page, Click New.
4. Add a title.
5. Add some content.
6. Click Insert.

Then the above error appears.

These errors are present in the Chrome console before I hit insert.

Code: Select all

Uncaught SyntaxError: Unexpected token '<'
DevTools failed to load SourceMap: Could not parse content for https://forma.mltai.org/addons/jquery/select/bootstrap-select.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://forma.mltai.org/addons/jquery/bootstrap/css/bootstrap.min.css.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://forma.mltai.org/addons/jquery/bootstrap/css/bootstrap-theme.min.css.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://forma.mltai.org/addons/tiny_mce/skins/lightgray/skin.min.css.map: Unexpected token < in JSON at position 0
bootstrap-3.3.6.min.js:6 Uncaught TypeError: Cannot read property 'offsetWidth' of undefined
    at c.slide (bootstrap-3.3.6.min.js:6)
    at c.next (bootstrap-3.3.6.min.js:6)
    at d (jquery-1.12.3.min.js:2)
Is there a forma debugging option that you are referring to or were you referring to the browser console?
alfa24
Senior Boarder
Posts: 2008
Joined: Fri Nov 24, 2017 8:45 am

Re: Cannot Create A Learning Object

Post by alfa24 »

I'm referring to do_debug value in config.php, please set it to true and repeat the steps. Don't mind all of the notice errors, just post here the last one, that should be a fatal.
Per supporto GRATUITO contattatemi in privato qui
mltai_lms
Newbie
Posts: 5
Joined: Thu May 07, 2020 4:13 pm

Re: Cannot Create A Learning Object

Post by mltai_lms »

Sorry for the late reply. I found that while in debug mode, I couldn't navigate to the course normally. So, for anyone else doing this... I had to take it back out of debug mode, find out the url link to the course first, put it back in debug mode, and then paste the link to get back to where I needed to be to try and replicate the steps to create a learning object again.

Anyway, ignoring the notices and the warnings of the debug on the page... the only fatal error at the bottom is the following (Note: domain name was changed to forma):

Code: Select all

Fatal error: Uncaught Error: Call to a member function getTitle() on boolean in /var/www/forma/appLms/lib/lib.repo.php:640 Stack trace: #0 /var/www/forma/appLms/modules/organization/orglib.php(1121): RepoTreeView->extendedParsing(Array, Array, Array) #1 /var/www/forma/lib/lib.treeview.php(456): Org_TreeView->extendedParsing(Array, Array, Array) #2 /var/www/forma/appLms/class.module/class.organization.php(85): TreeView->parsePositionData(Array, Array, Array) #3 /var/www/forma/appLms/modules/storage/storage.php(97): Module_Organization->initialize() #4 /var/www/forma/appLms/modules/storage/storage.php(176): storage_display() #5 /var/www/forma/appLms/class.module/class.definition.php(105): include('/var/www/forma....') #6 /var/www/forma/appLms/index.php(84): LmsModule->loadBody() #7 {main} thrown in /var/www/forma/appLms/lib/lib.repo.php on line 640
alfa24
Senior Boarder
Posts: 2008
Joined: Fri Nov 24, 2017 8:45 am

Re: Cannot Create A Learning Object

Post by alfa24 »

I can't replicate the error. Maybe it's related to nginx (that it's the only difference with the test environment I tried, as I used apache).
Anyway, it's a server issue, as you can read from the stack trace, not a client one as CisterNino was guessing).
I would help but I should be on your istance to do some deeper debug.
Per supporto GRATUITO contattatemi in privato qui
Post Reply