Development

#3384 (sfSimpleCMSPage setSlot dosent work as is expected)

You must first sign up to be able to contribute.

Ticket #3384 (new defect)

Opened 2 months ago

sfSimpleCMSPage setSlot dosent work as is expected

Reported by: cristianbaciu Assigned to: francois
Priority: major Milestone:
Component: sfSimpleCMSPlugin Version: 1.0.13
Keywords: Cc:
Qualification: Unreviewed

Description

If you want to copy a slot from a culture to an other, you must have tow objects(sfSimpleCMSPagePeer::retrieveBySlug) tow times. method setSlot doesn't work as is expected if you get slot (->getSlot) with a different culture

[[file: sfSimpleCMSPage.php - line 80]]
function setSlot($name, $culture, $type, $value)...
..

    if(!$slot)
    {
##### THIS WILL NEVER HAPPEN IF U ALLREADY call getSlot on the same instance of a sfSimpleCMSPage object #####
      $slot = new sfSimpleCMSSlot();
      $slot->setName($name);
      $slot->setPageId($this->getId());
      $slot->setCulture($culture);
    }