Proposed fix: change "Error" message when publish fails.

379 views
Skip to first unread message

Darren Ferguson

unread,
Jun 26, 2012, 8:31:07 AM6/26/12
to umbra...@googlegroups.com
All,

For a while it has bugged me that when you publish a custom event handler cancels - that you get a big nasty error icon:



So - looking into the source:

editContent.aspx.cs has:

ClientTools.ShowSpeechBubble(speechBubbleIcon.info, ui.Text("error"), ui.Text("contentPublishedFailedByEvent"));

and publish.aspx.cs has:

 feedbackMsg.type = umbraco.uicontrols.Feedback.feedbacktype.error;
feedbackMsg.Text = ui.Text("publish", "contentPublishedFailedByEvent", d.Text, base.getUser()) + "</p><p><a href='#' onClick='" + ClientTools.Scripts.CloseModalWindow() + "'>" + ui.Text("closeThisWindow") + "</a>";
                    
Simple enough to fix but, before I submit a pull request:

umbraco.uicontrols.Feedback.feedbacktype is an enumeration of:

  • Error
  • Notice
  • Success
and speechBubbleIcon an enumeration of
  • Error
  • Info
  • Save
  • Success
  • Warning
My inclination is to change to Notice in the first case and Warning in the second. Any objections.

Also - would i create a pull request against 4.8, and do I need a matching defect for it to be considered.

Thanks.

Stephen Roberts

unread,
Jun 26, 2012, 9:18:44 AM6/26/12
to umbra...@googlegroups.com

How much more difficult would it be to be able to choose an icon from the cancel event and also stick in a custom message?

 

-Ste

--
You received this message because you are subscribed to the Google Groups "Umbraco development" group.
To post to this group, send email to umbra...@googlegroups.com.
To unsubscribe from this group, send email to umbraco-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/umbraco-dev/-/kdtxiAgdLgMJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Darren Ferguson

unread,
Jun 26, 2012, 9:41:21 AM6/26/12
to umbra...@googlegroups.com
Currently you cancel an event by setting a Cancel property which is a boolean.

The solution I guess would change that cancel property to a more complex type or to add some additional properties.

Not loads of work....

jbr...@gmail.com

unread,
Jun 26, 2012, 9:54:57 AM6/26/12
to umbra...@googlegroups.com
If this is not a high prio it could be postponed until the events will be replaced with the task system from v5, but that could take a while.

Darren Ferguson

unread,
Jun 26, 2012, 10:01:09 AM6/26/12
to umbra...@googlegroups.com
I don't see a reason to postpone it - it is a 2 line quick win.

Lee Kelleher

unread,
Jun 26, 2012, 10:12:39 AM6/26/12
to umbra...@googlegroups.com
+1  Changing the icon "Notice" and heading to "Warning" makes sense.  As it is not accurate that it is an "Error" if the event is cancelled.

As for the patch/pull-request workflow, I think creating a ticket on the issue tracker is good - if only so this amend is documented and referenced within the changeset/release-notes for 4.8.

Cheers,
- Lee


--
You received this message because you are subscribed to the Google Groups "Umbraco development" group.
To post to this group, send email to umbra...@googlegroups.com.
To unsubscribe from this group, send email to umbraco-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/umbraco-dev/-/dKOL3KgvMVsJ.

Darren Ferguson

unread,
Jun 28, 2012, 5:04:08 AM6/28/12
to umbra...@googlegroups.com
Issue here:  http://issues.umbraco.org/issue/U4-84 

It is *really* slow creating a fork and cloning - this will put people off making these quick fixes I'd guess.

Darren Ferguson

unread,
Jun 28, 2012, 6:15:03 AM6/28/12
to umbra...@googlegroups.com

New message - not so Error looking any more :)

The whole process for contributing that was really slow and cumbersome.

On Tuesday, 26 June 2012 15:12:39 UTC+1, Lee Kelleher wrote:

Dan Diplo

unread,
Jun 28, 2012, 11:31:32 AM6/28/12
to umbra...@googlegroups.com
On Thursday, 28 June 2012 11:15:03 UTC+1, Darren Ferguson wrote:

New message - not so Error looking any more :)

Looks good. Much better than a "scary" error! 
Reply all
Reply to author
Forward
0 new messages