Closed (fixed)
Project:
Status Messages Alter
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
29 Jul 2011 at 01:07 UTC
Updated:
2 Jan 2012 at 02:40 UTC
I'm trying to replace messages from the Web Links module... But nothing happens... Can this module handle messages set by form_set_error()?
Comments
Comment #1
BartonDrupal commentedyeah, the message type is "error"
Comment #2
walker2238 commentedHmmm, that's odd then.
Maybe you can point out what I'm doing wrong.
Comment #3
thedavidmeister commentedThis is a support request... also, should we really be using the issue queue for a specific module for general php coding advice?
looking in the MessagesAlter class it appears you should be using $messages->contains('required', 'error'); if you just want to test errors only.
also, i'm not sure if this would help because I haven't tested your code, but I personally would test if( !empty($matches) ) rather than just if( $matches ), just to be safe.
Comment #4
BartonDrupal commentedComment #5
thedavidmeister commentedwhat i suggested with !empty... do this instead: