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.

All other Modules /

Discuss all other Modules here.

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

Seriuous Issues With CMS Workflow [not solved, but resolved]


Reply


5 Posts   1598 Views

Avatar
prawnstar

Community Member, 121 Posts

24 August 2010 at 4:10pm

Edited: 25/08/2010 5:57pm

Hi All,

I'm having some serious issues with CMS Workflow and could really use some help with this.

I've set up 2 roles. "author" and "publisher"

author can:
Access to 'Files & Images' section
Access to 'Pages' section
View draft content

And publisher can:
Full administrative rights

Then I created 2 groups. "Test Member" who will be authoring all of Test Members pages. And "Publishers" who will be in charge of publishing all of Test Members posts.

Under Test Member I created a unique user.

Under Publishers I'm using an administrator that is already in the Admin group.

In the CMS, I've set up Test Member to be the editor of his/her page and Publisher to publish. See attached.

When the author edits a page and clicks save. I get a "Status changed to saved (update)" response in green text. Then I click "Request Publication" fill in some comments and click ok in the pop-up. I then get a "Request to change. Emailed to no-one" message.

I do not get an email (publisher is set up with my email address).

Then...

When I log in as the publisher and click on the edited page, I see the "Workflow" tab. If I click "Save" it appears to save. But then if I click "Save and Publish" I get an "Error Saving Content" in red. BUT it DOES actually save. If I refresh the CMS page, I see that the "Workflow" tab is removed and the content is saved.

In mysite/_config.php I have this line:
WorkflowRequest::set_alert('WorkflowPublicationRequest', 'request', 'publisher', true);

But still I don't receive an email. I'm absolutely sure my email address is correct. Matter of fact, NO admin user receives an email.

I should mention that I'm currently running this on a IIs server (was developed on Apache II), but has the same issue on Apache II.

Any help is greatly appreciated.

UPDATE: Actually this gives me a server error when I try to request publishing as the author:
WorkflowRequest::set_alert('WorkflowPublicationRequest', 'request', 'publisher', true);

Chris.b

Avatar
Willr

Forum Moderator, 5513 Posts

24 August 2010 at 7:58pm

Do you have the specific error message which is outputted when you get that red box. You can find the full error message either in your PHP error log on your server or if you have a javascript console (like Firefox) and have your SilverStripe site in dev mode then you should see the full error message outputted to the javascript console.

See http://doc.silverstripe.org/debugging#dev_mode for how to put your site in devmode.

Avatar
prawnstar

Community Member, 121 Posts

25 August 2010 at 4:23am

Edited: 25/08/2010 5:12am

Will thank you so much for your reply.

I already have the site in Dev mode, but I'm not getting the usual screen of text when the error occurs. The php logs are a bit tricky here. I logged into the server, but the latest log seems to be from 2 days ago. I am however seeing this error in my JavaScript console:

JavaScript Error:
500 Warning: "mail() [<a href='function.mail'>function.mail</a>]: SMTP server response: 451 See http://pobox.com/~djb/docs/smtplf.html." at line 163 of D:\Hosting\xxxxxx\html\new\sapphire\email\Mailer.php

The url in the error message seems to indicate that CMS Workflow is sending bad line endings?
http://cr.yp.to/docs/smtplf.html

Does this mean hacking the saphire code?

EDIT: By the way, this is a GoDaddy account running a IIs server. That's not by choice. Also, in my original post I stated that this is happening on the ApacheII server. That is incorrect. It is not happening on the Apache server.

Also, hacking the /saphire/email/Mailer.php script to change \n to \r\n results in a brand new server error:

500 Warning: "mail() [<a href='function.mail'>function.mail</a>]: Failed to connect to mailserver at &quot;relay-hosting.secureserver.net&quot; port 25, verify your &quot;SMTP&quot; and &quot;smtp_port&quot; setting in php.ini or use ini_set()" at line 163 of D:\Hosting\xxxxxx\html\new\sapphire\email\Mailer.php

Chris.b

Avatar
prawnstar

Community Member, 121 Posts

25 August 2010 at 6:03pm

Edited: 25/08/2010 6:12pm

This issue is not solved, but to make it go away, I moved the official install to a LAMP server and everything works fine. I don't have any philosophical differences with Microsoft, but dealing with IIs7 is too much for me to feel like dealing with at the moment. YMMV.

If anyone has anything useful to contribute to this discussion, please post. I'm sure someone will find it useful. Otherwise this issue is mute.

Thank you Willr for your time.

Chris.b

Avatar
mark_s

Community Member, 78 Posts

26 August 2010 at 5:23pm

Hi.

This sounds like it might be a problem with the mail() functions under IIS. As I understand it, php mail() function on *nix uses the sendmail command to delivery mail, relying on it to be configured. Under IIS, sendmail is not tyically present, but support is built into PHP for that. It does require windows-specific configuration:

http://www.php.net/manual/en/mail.configuration.php

Regards
Mark