modules/field_ui/field_ui.admin.inc:781 produces the error message There was a problem creating field %label: @message., where @message placeholder can be the HTMLed message generated by inclues/database/schema.inc:629: Table %name already exists.,

That produces a stranger end result like: There was a problem creating field Field Name: Table <em>Table Name</em> already exists.. (with em tags escaped).

Maybe !message should be used instead of @message.

Files: 
CommentFileSizeAuthor
#12 field-ui-1206992-12.patch2.5 KBoriol_e9g
PASSED: [[SimpleTest]]: [MySQL] 34,004 pass(es).
[ View ]
#9 after-patch.png207.59 KBoriol_e9g
#9 before-patch.png226.03 KBoriol_e9g
#8 field-ui-message-1206992-8.patch1.24 KBoriol_e9g
PASSED: [[SimpleTest]]: [MySQL] 32,951 pass(es).
[ View ]
#5 error-confirmat.png226.03 KBoriol_e9g

Comments

Version:7.4» 8.x-dev
Issue tags:+Novice

Tagging.

Assigned:Unassigned» dsm

Tracking to review a patch if one is submitted.

Assigned:dsm» Unassigned

Moving back into the queue.

StatusFileSize
new226.03 KB

I can confirm the error in Drupal 8.x.

Plus: We should remove the two final sentence points and the error level message! Now is in green and should be an error in red!

Status:Needs work» Active

There are two messages with the type message problem:

drupal_set_message(t('There was a problem creating field %label: @message.', array('%label' => $instance['label'], '@message' => $e->getMessage())));
...
drupal_set_message(t('The field %label cannot be added because it is locked.', array('%label' => $values['label'])));

Should be:
drupal_set_message(t('There was a problem creating field %label: @message.', array('%label' => $instance['label'], '@message' => $e->getMessage())), 'error');
...
drupal_set_message(t('The field %label cannot be added because it is locked.', array('%label' => $values['label'])), 'error');

Title:Field ui error message can output escaped HTMLField ui error message and incorrect type level
Status:Active» Needs work

Status:Active» Needs review
StatusFileSize
new1.24 KB
PASSED: [[SimpleTest]]: [MySQL] 32,951 pass(es).
[ View ]

StatusFileSize
new226.03 KB
new207.59 KB

Screenshots attached before/after patch.

Status:Needs review» Reviewed & tested by the community

Seems fine for me.

Status:Reviewed & tested by the community» Needs work

Needs a re-roll for the /core change.

Status:Needs work» Needs review
StatusFileSize
new2.5 KB
PASSED: [[SimpleTest]]: [MySQL] 34,004 pass(es).
[ View ]

Re-rolling i have found more message level errors.

Status:Needs review» Reviewed & tested by the community

Nice.

Status:Reviewed & tested by the community» Fixed

Committed to 7.x and 8.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.