Forums | Mahara Community

Support /
URL Secret gone after upgrade


24 February 2023, 22:29

Hello!

I've just handled an upgrade from in order 19.04 -> 20.04 -> 22.04. Might add that although I'm technical about linux, I'm not very proficient when it comes to Mahara.

Following the official instructions: the upgrade was complaining about diff with collation on tables vs default collation, so I converted the diff ones to the default ( utf8_general_ci ) collation. I know things can get back changing character set or collation, but after the upgrade and some testing things seems to work.

 

Except one thing, which is Secret URL for users to share documents publicly. I've triple checked this settings, and it's activated system wide, and should be for institution as well ( as it worked before upgrade, and we haven't changed this settings ).


To make things trickier, we have an old suspended institution without any users. It seems to be the primary ( as in it's selected automatically when checking configuration for various parts of Mahara ), and it's the only one that has a "Allow public institution portfolios" settings ( its activated too ), the institution with our users doesn't have this settings, it has in fact very few settings that you can toggle.

I don't know if the old institution can "block" the settings on the institution we're using? I've tried deleting it, but then I run into " A nonrecoverable error occurred. This probably means you have encountered a bug in the system" ( and as mentioned is has no users, nor any auth methods activated, which I've read is essential for this )


The suspended institution isn't really an issue, as long as it's not the cause of issues with things like Secret URL settings for our used Institution. The reason why I suspect it's related, is that if make a test institution page ( which I assume defaults to the first/suspended institution ), it shows a "New Secret URL" button after pressing "Manage Access" on it.

In case the suspended "main" institution could be a cause, I've provided error logs from Apache, when trying to delete it.

Would really appreciate some input here, we discovered the URL Secret thing after a while, and we have users that are dependent on it. Maybe it's possible to flip this settings in the databas, I've tried searching for info on this but only find manuals for the GUI.

Thanks ~ Rikard

  • mahara-error.txt
Robert Lyon's profile picture
Posts: 757

27 February 2023, 13:55

Hi Rikard,

The error log you provided looks to contain error similar to what was seen in

https://bugs.launchpad.net/mahara/+bug/1995527 where it has issues with the  View->delete() call.

There is a fix for this: https://reviews.mahara.org/c/mahara/+/13422

That will be released in the next stable release - but feel free to patch your site with it and see if it fixes you issue.

Cheers

Robert

 

28 February 2023, 7:32

Hello

Great, it did the trick for removing the unused institution, thank you!

With only the used institution in place now, I realize it wasn't the unused one that was the issue, it seems the active one must be broken or so.
When I enter administration menu -> Institution, then - except for settings - most options leads to a page saying "No institution", some text and a "Add institution" button.

 

I've no idea what to make of it, or where to start figuring it out. Is it possible create an institution, and bulk move all the 2500 users to the new one, or is there a better approach?

Thanks in advanced, we're kinda desperate here!

28 February 2023, 8:23

Update. Took my chances to have a look in the database, and found the settings for what I assumed was for public pages, so after:

update institution set allowinstitutionpublicviews = 1 where displayname = "our-inst-displayname";


Secret URL seems to be working! \o/

Although the institution when looking at it in Mahara still seems to be broken.

Kristina Hoeppner's profile picture
Posts: 4731

06 March 2023, 22:10

Hi Rikard,

Great that your secret URLs work again. What do you mean by 'Although the institution when looking at it in Mahara still seems to be broken.'? What is broken? Can you provide a link to a screenshot or screencast?

The default 'No institution' (shortname 'mahara') is the 'site' institution. It has much fewer settings than a regular institution as it is the site level, and therefore, a lot of things are set in Admin menu > Configure site > Site settings.

Cheers

Kristina

07 March 2023, 5:27

Hello, Kristina!

Ah, then it makes more sense. Yes, the populated institution's shortname is  'mahara'. Is it a kinda fallback option when users aren't assigned a manually created institution? I don't know how the previous administrator worked with Mahara, it could very well be that they didn't got it right with the institution for the users.

I provided a picture, although it doesn't reveal much more than the shortname. I also reverted the deletion of the the suspended institution, as that by itself didn't help with Secret URLs, but I was met with the  "Add institution" option after deletion, and at the time didn't know why and thought something was wrong.


We're gonna migrate all these users together with another installation of Mahara, and import/merge them both into a new installment , I have a workshop scheduled tomorrow to start learning about how to migrate/import. Do you think  that the users reside the "default mahara institution" can be an issue with the migration?

~ Rikard

Kristina Hoeppner's profile picture
Posts: 4731

07 March 2023, 14:48

Hi Rikard,

'No institution' ('mahara') is the site institution. Many organisations use that alone as it's enough for their purposes. I like to always set up a 'proper' institution because you have many more controls available, for example:

  • institution admins can't change plugin settings
  • institution support admins can't change institution settings
  • if you do want to differentiate between students and teachers (or other groups), you can do that with institutions and give them different theme, different auth methods, different permissions based on their institution etc.

So, in a way, 'No institution' is for those not assigned to a particular institution. When someone leaves and institution or is removed from one, they end up in 'No institution' because their account would still exist (unless it's been deleted by the institution admin). You can then add them to another institution.

It's not wrong to only work with 'No institution'. It just doesn't give you as much flexibility as you may like.

You can allow public portfolios (including secret URLs) on the site level via Admin menu > Configure site > Site options > Access settings. That means per default, all institutions can have public portfolios and those accessible via secret URL. However, if an institution decides to not allow secret URLs and public portfolios, you can prohibit that in the institution settings.

You can always move people from 'No institution' into an institution without them losing any of their content, sharing permissions etc. No exporting is needed for that! They will also retain their group membership. This is, provided you are not using isolated institutions, which are more restrictive.

Merging two instances of Mahara is a highly complex undertaking as you can't merge the databases but need to create new IDs for everything for one database so as not to move content from one person into the space of another who has the same ID in the second database. We've done it successfully several times, but it does take time and scripts. This process would preserve friend relationships, access permissions for people with accounts, group content etc. Merging of databases is a paid service that we at Catalyst offer and is in particular of interest to larger organisations that do want to retain all content.

Alternatively, you can bulk export personal portfolios and import them into the second site. However, that doesn't bring along everything as it excludes groups, friend relationships, institution portfolios etc.

Cheers

Kristina

08 March 2023, 2:56

Hello, Kristina!

Thank you for clarifying! I didn't know that you could get help on enterprise level with Mahara, to me this looks like a scenario that we could use some, absolutely a better option than me and my colleague starts figuring out relations in the DB and start scripting.

I'll mention/suggest it to involved parts, if it's viable to them - how do we go on about this with Catalyst?

Regards ~ Rikard

Kristina Hoeppner's profile picture
Posts: 4731

08 March 2023, 9:23

Hi Rikard,

You can email me. 😀

Catalyst is the main development company and maintainer of the Mahara project, and we offer consulting services for our community as sometimes free support that we provide here in the forums is not enough, especially when we'd need to look at server configuration etc. or develop new features.

I look forward to hearing from you.

Kristina

09 March 2023, 4:46

Thank you, Kristina. I've notified my higher ups, I'll keep in touch after we've discussed this.

Regards ~ Rikard

10 results