Forum .LRN Q&A: Create DOTLRN User and Portlets getting messed up on initial log in

Hello,

We encountered a bug that we are trying to trace on dotlrn PostGres.

Before anything we would edit the User portal templates to establish
the order of portlets for all new users.

We would create a new dotlrn user from the users link in dotlrn/admin.

When user is created, he/she logs in to find that the order of the
portlets does not follow the one we defined in user templates.

Clicking revert to default in the control panel > customize layout
seems to cause the site to hang.

Has anybody seen this behaviour before ?

Thanks,

Collapse
2: Problem Solved. (response to 1)
Posted by Hamilton Chua on

Deds has found and pin-pointed the problem.

It seems that there is a query in a function (responsible for creating the portals of a user at first log in) in api-create.tcl in new-portal/sql/postgresql that was not using the sort_key in the portals_pages table.

Because of this everytime our server executes the cron to vacuumdb the database - which is nightly, the order of the portal_pages records in the table change.

So here's how it was fixed - just go to new-portal/sql/postgresql/api-create.sql and locate this code under portal__new function.

       for v_page in select *
                      from portal_pages
                      where portal_id = p_template_id 
        loop

Just add "order by sort_key" after p_template_id in the query above.

This same needs to be updated in the oracle version of api-create.