Ticket #1411 (new defect)

Opened 14 years ago

Last modified 13 years ago

portlet editor

Reported by: tziade Owned by: jmorliaguet
Priority: P1 Milestone: CPS 3.5.7
Component: CPSPortlets Version: TRUNK
Severity: normal Keywords:
Cc:

Description

renaming a slot that contains portlets will loos all portlets

Change History

comment:1 Changed 14 years ago by gracinet

Lost or just not found ? In later case, it just means that we have to change their slot attribute (maybe after confirmation)

comment:2 Changed 14 years ago by jmorliaguet

that's by design, the relation between the portlet and the slot is not a "hard link". Slots are a bit like topic folders.

there could be nasty side-effects if portlets were reassigned automatically, for instance if you have 10 portlets in slotA, 10 portlets in slotB and you rename slotB as slotA, you'll have 20 portlets in slotA. On large sites, it could be a real mess to sort things out afterwards.

So you you have to reassign the new slot attributes more or less manually.

via the UI, you can find the "lost" portlets inside the "unused portlets" menu, and move them to into the "new" slots.

comment:3 Changed 14 years ago by ogrisel

That would be nice to be able to change the portlet slot attribute on a dropdown list by editing the portlet itself or on the explorer/unused portlets views directly.

The copy and paste approach is not enough: I don't want to duplicate portlets, I just want to move them and it's not possible to move portlet on the explorer/unused portlets wiews AFAIK.

comment:4 Changed 14 years ago by tziade

<<< there could be nasty side-effects if portlets were reassigned automatically, for instance if you have 10 portlets in slotA, 10 portlets in slotB and you rename slotB as slotA, you'll have 20 portlets in slotA. On large sites, it could be a real mess to sort things out afterwards.

So you you have to reassign the new slot attributes more or less manually.

via the UI, you can find the "lost" portlets inside the "unused portlets" menu, and move them to into the "new" slots. <<<

well in your example, the editor should then avoid renaming slotB into slotA. I mean, the manual approach is a bit unfriendly. it could be automated. It is very disturbing to loose the whole content of the slot after a renaming

comment:5 Changed 14 years ago by jmorliaguet

To move portlets between slots you can also add a temporary slot on a theme page and do drag-and-drop between the two slots or do cut / paste.

to rename slotA into slotB:

  • change the ID of slotA to slotB (the portlets disappear)
  • add a temporary slot called slotA next to slotB
  • move the portlets from slotA to slotB

Then slot's id is just an id, the slot's title can be renamed safely.

Also renaming slots is a bit like renaming ZPT macro slot names, it has consequences and should be avoided, it is OK now since 3.4 has not been released yet, but later it really would be a problem.

If it's done too often it will break site import / exports and site upgrades. Generic setup for instance has no way of doing that kind of magic renaming between snapshots.

comment:6 Changed 14 years ago by tziade

i'd suggest disabling id renaming then if it breaks everything.

the use case is: portlet editor comprehension, so changing the name is suffisant then.

comment:7 Changed 14 years ago by ebarroca

  • Milestone changed from CPS 3.4.0 to CPS 3.4.1

comment:8 Changed 13 years ago by sfermigier

  • Milestone changed from CPS 3.4.1 to CPS 3.4.2
Note: See TracTickets for help on using tickets.