Forums | Mahara Community
Support
/
About page not created when a group is made [solved]
05 April 2013, 23:37
HelloI have an issue that when a new group is created an about page isn't created for it.
I can fix this by manually creating an entry in the view table for the group with -
insert into view (title, group, ctime,mtime,atime,numcolumns,template,copynewuser,type,allowcomments,approvecomments,retainview,locked)values ('Group Homepage','@groupID@','2011-12-19 11:31:37','2011-12-19 11:31:37','2011-12-19 11:31:37','1','0','0',grouph
This creates the tab but doesn't create any blocks that are normally on this page - ie group pages, members, latest forum posts
Can anyone tell me what I need to do in order to create these blocks as well please
Edits to this post:
- Dominique-Alain JAN - 09 April 2013, 20:43
08 April 2013, 10:46
You should be able to add those blocks by going to the group's "Pages" tab, and click the "edit" icon next to the group homepage. These blocks are all under the "General" pallette. (If you wanted to create them by inserts into the database, I believe that'd be the "view_artefact" table. Take a look at View::create_from_template() in lib/view.php for more details.)
As for why your groups aren't getting a homepage when they're created, normally when you create a new group Mahara makes a copy of the "group homepage" template page stored in the database. Perhaps your template got deleted. Do you see anything when you run this SQL query?
select * from view where type='grouphomepage' and template=1 and owner=0;
Cheers,
Aaron
08 April 2013, 19:28
If I run that sql I do get a row back. So some form of template exists.
I ended up putting in a hacky script to 'fix' this on friday that essentialy looks for any group without the grouphomepage view, adds it and then adds the block instances to that view.
This works but I'd still liek to find the real fix.
I'm assuming the root course is linked to the problem where when I create a new group I get:
MKC Mahara: Site unavailable
Something in the way you're interacting with MKC Mahara is causing an error.
Details if any, follow:
User with id "0" is not known
09 April 2013, 13:28
Hi dan,
Yes, that is probably the cause of the problem. Mahara is supposed to have a special system user called "root" with id 0. It will probably cause various problems in your system if that user is missing, or has an id other than 0. Can you check and see if you have one?
select * from usr where username='root';
Cheers,
Aaron
09 April 2013, 19:15
\0/ hurrahh that fixed it!
the root user had an id of 1263, changed it to 0 and now the groups are creating fine.
Thanks for your help
10 April 2013, 10:48
Hi Dan,
Glad to hear it.
Although watch out that it may cause other issues as well. I'm not too familiar with what the root user is used for, but there may be existing records in other tables that are pointing at that user id of 1263, which will break if there is no user present with that ID. Perhaps the easiest safeguard against that would be to create another usr record with id 1263 and a username like "root2".
Cheers,
Aaron