Forums | Mahara Community

Developers /
Possible license problems?


Gregor Anželj's profile picture
Posts: 349

28 April 2013, 17:46

Installed fresh instance of Mahara 1.7.0. I have only one user - admin user. No data is set, everything is default as install process created it.

Created new page and tried to add Textbox block. The rendering of config form took forever... Upon investigation I found out that it is caused because 'license' and 'license_advanced' pieform elements are created without 'type' which would indicate the type of Pieform. This is needed in line 930 of 'build_configure_form' function in file htdocs/blocktype/lib.php which tries to reference Pieform javascript function:

line 930: $function = 'pieform_element_' . $element['type'] . '_views_js';

I suspect it can't be done since 'type' index isn't set...

Haven't added it to bugtracker since I want you guys to please confirm this.

Kind regards,
Gregor

Kristina Hoeppner's profile picture
Posts: 4731

28 April 2013, 19:35

Hi Gregor,

I can't replicate the issue on demo.mahara.org. I turned license and custom license on there.

Cheers

Kristina

Gregor Anželj's profile picture
Posts: 349

29 April 2013, 1:06

Kristina hi.

As a said the problem exists with plain "vanilla" install. When I turn on the license, the problem vanishes...

Regards, Gregor

Kristina Hoeppner's profile picture
Posts: 4731

30 April 2013, 9:55

Hi Gregor,

I filed a bug at https://bugs.launchpad.net/mahara/+bug/1174540

Cheers

Kristina

Aaron Wells's profile picture
Posts: 896

30 April 2013, 16:42

Hi Gregor,

I also wasn't able to replicate. I tested with mysql and postgresql, downloading a copy of mahara-1.7.0.zip, installing it, and before making any other changes to the site, going in and creating a page and putting a text box in it. I was able to create the text box successfully each time.

I do see a bunch of warning messages, though, about undefined indexes: 'type', 'licensor', 'license', 'licensorurl'. They show up when I load up the next page on the site. Maybe for some reason in your installation they're showing up in an ajax response page, thus fouling up the XML and making it hang... I'll try putting together a patch to clear up those warnings and you can see if that solves the problem.

Cheers,
Aaron

Aaron Wells's profile picture
Posts: 896

30 April 2013, 17:22

Hi Gregor,

Okay, here's a patch that squelches those warnings. Can you give this a try? https://reviews.mahara.org/#/c/2099/

Cheers,
Aaron

Gregor Anželj's profile picture
Posts: 349

01 May 2013, 21:51

That's it... and possibly that I have all warnings/errors printed out enabled in config.php:

$cfg->log_dbg_targets     = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
$cfg->log_info_targets    = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
$cfg->log_warn_targets    = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
$cfg->log_environ_targets = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;

I forgot about that... Embarassed

Anyway it works now. Thanx.

Gregor

Aaron Wells's profile picture
Posts: 896

02 May 2013, 10:16

Hi Gregor,

The strange thing is, I had those same config.php directives making my instance print warnings/errors to the page as well. Still, it's good to fix warnings produced by the code anyway. Smile

I'm going to try to get out a 1.7.1 in the next couple of days, which will include this patch.

Cheers,
Aaron

8 results