My suggestion for a solution to the problem with page mappings
"disappearing" from portal_table_page_map (when more than one user or
group attempts to manage a portal) is to do two alterations on
portal_table_page_map
:
alter table portal_table_page_map add map_group_id integer;
alter table portal_table_page_map add map_user_id integer;
and then, in both
/portals/manage-portal-2.tcl
and
/portals/admin/manage-portal-2.tcl
, add the appropriate
filter (on
map_user_id = $user_id
in
/portals/manage-portal-2.tcl
, and on
map_group_id =
$group_id
in
/portals/admin/manage-portal-2.tcl
)
to the two delete statements near the end of the file in question.
The comment lines for the delete statements I'm referring to read as
follows:
# delete all tables
# delete tables that didn't appear in our list (hence they were
javascript-deleted)
To the best of my knowledge, this solution does
not require any
changes to
manage-portal.tcl
in either directory.
However -- and I almost forgot this -- you also need to change the
insert into portal_table_page_map
statements to reflect
the new data model (adding map_user_id
or
map_group_id
to the insert statement, as appropriate).
Here's the example from /portals/manage-portal-2.tcl
:
insert into portal_table_page_map
(table_id, page_id, sort_key, page_side, map_user_id)
values
($table_id, $page_id, $sort_key, 'r',$user_id)
THERE ARE TWO ITERATIONS OF THIS INSERT IN EACH FILE (one for the
right, and one for the left). Also, in the
/portals/admin
version of the
file, make sure you use
map_group_id
and
$group_id
in place of
map_user_id
and
$user_id
.
Hopefully this is sufficiently clear for anyone who wants to fix their
portals module. Please let me know if I've missed something...