Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

Save and Publish producing error after installation of CMSWorkflow


Go to End


2 Posts   1538 Views

Avatar
Laurie

Community Member, 21 Posts

27 May 2010 at 7:40am

After the installation of CMS Workflow, the "Save and Publish" button is no longer working properly.

First, here is the code that I added to the \mysite\_config.php file for a two-step workflow:

// CMSWorkflow
Object::add_extension('WorkflowRequest', 'WorkflowTwoStepRequest');
Object::add_extension('SiteTree', 'SiteTreeCMSTwoStepWorkflow');
Object::add_extension('LeftAndMain', 'LeftAndMainCMSWorkflow');
Object::add_extension('SiteConfig', 'SiteConfigTwoStepWorkflow');
LeftAndMainCMSWorkflow::set_prompt_admin_for_comments(false);

Too much? Too little? Something I missed?

So...after an edit is made to a page and I select "Save and Publish," I received an error that says "Error saving content" and the "Publishing..." button just keeps spinning. However, if I refresh the page, the change has actually been saved.

In my SilverStripe error log, I get the following error:
Warning at \sapphire\email\Mailer.php line 163: mail() [<a href='function.mail'>function.mail</a>]: Failed to connect to mailserver at &quot;localhost&quot; port 25, verify your &quot;SMTP&quot; and &quot;smtp_port&quot; setting in php.ini or use ini_set()

I'm guessing that the error is related to the fact that it wants to email something but can't...I don't need anything e-mailed, so how do I just turn that option off?

Thanks.

Avatar
Laurie

Community Member, 21 Posts

27 May 2010 at 3:16pm

Thanks, Luke...your code worked perfectly!

Cheers,
Laurie