Jump to:

10993 Posts in 2727 Topics by 1818 members

All other Modules

SilverStripe Forums » All other Modules » CMSWorkflow and SS 2.3.2

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2
Go to End
Author Topic: 1718 Views
  • Mo
    Avatar
    Community Member
    508 Posts

    CMSWorkflow and SS 2.3.2 Link to this post

    Hi All,

    I am having an issue with CMS workflow and the latest release of SS.

    I have just upgraded SS to 2.3.2, and have the latest version of cmsWorkflow from the trunk. I am getting the error:

    [User Error] DataObject::getComponents(): Unknown 1-to-many component 'WorkflowRequests' on class 'HomePage'

    Looks like the issue is in the method:

    public function ClosedWorkflowRequests($filter = "", $sort = "", $join = "", $limit = "") {
          $this->componentCache = array();
          
          if($filter) $filter .= ' AND ';
          $filter .= "Status IN ('Approved','Denied')";
          return $this->owner->getComponents(
             'WorkflowRequests',
             $filter,
             $sort,
             $join,
             $limit
          );
       }

    in SiteTreeCMSWorkflow.php

    Anyone got any Ideas what might be causing this? A partial trace is as follows, any help would be appreciated (I know this isn't meant to be stable until 2.4, but if anyone could point out a workaround, that would be great):

    DataObject::getComponents(): Unknown 1-to-many component 'WorkflowRequests' on class 'HomePage'
    Line 1086 of DataObject.php

    DataObject->getComponents(WorkflowRequests,Status IN ('Approved','Denied'),,,)
    Line 259 of SiteTreeCMSWorkflow.php

    SiteTreeCMSWorkflow->ClosedWorkflowRequests()
    Line 139 of SiteTreeCMSWorkflow.php

    SiteTreeCMSWorkflow->getWorkflowCMSFields()
    Line 123 of SiteTreeCMSWorkflow.php

    SiteTreeCMSWorkflow->updateCMSFields(FieldSet,,,,,,)
    Line 741 of Object.php

    Object->extend(updateCMSFields,FieldSet)
    Line 1328 of SiteTree.php

    SiteTree->getCMSFields()
    Line 14 of Page.php

    Page->getCMSFields()
    Line 55 of HomePage.php

    HomePage->getCMSFields(CMSMain)
    Line 390 of CMSMain.php

    CMSMain->getEditForm(1)
    Line 925 of LeftAndMain.php

    LeftAndMain->EditForm()

    call_user_func_array(Array,Array)
    Line 550 of ViewableData.php

  • Mo
    Avatar
    Community Member
    508 Posts

    Re: CMSWorkflow and SS 2.3.2 Link to this post

    Right, I have found a fix of sorts, adding:

    public static $has_many = array(
       'WorkflowRequests' => 'WorkflowRequest'   
    );

    To my page class gives it the association the page requires, but I am guessing this is meant to be handled by the plugin?

    Mo

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: CMSWorkflow and SS 2.3.2 Link to this post

    Yes, the SiteTreeSubsites.php file is supposed to add that relation. Did you try doing a ?flush=1 after you installed the plugin?

  • Mo
    Avatar
    Community Member
    508 Posts

    Re: CMSWorkflow and SS 2.3.2 Link to this post

    I did do a flush, it didn't make any difference.

    Mo

  • Mo
    Avatar
    Community Member
    508 Posts

    Re: CMSWorkflow and SS 2.3.2 Link to this post

    Ok, here is something odd, the front end is fine, its only the admin area that gives me this error.

    Very odd!

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: CMSWorkflow and SS 2.3.2 Link to this post

    Okay, damn it, I thin this is a bug in the 2.3.2 release.

    I've added a ticket here: http://open.silverstripe.com/ticket/4285

  • Mo
    Avatar
    Community Member
    508 Posts

    Re: CMSWorkflow and SS 2.3.2 Link to this post

    Ah, doh! Well glad I could be of some help.

    Do you think 2.3.2 will be updated with this bugfix, or will we have to workaround until 2.3.3?

    Cheers for your help so far,

    Mo

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: CMSWorkflow and SS 2.3.2 Link to this post

    Well, we never change 2.3.2, so if a fix is required then it will definitely be in 2.3.3. The real question is "if it's a bug how long before we release 2.3.3". And that I can't answer right now... ;-)

    1718 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.