faster is better than slow | Download Swift
+ Reply to Thread
Results 1 to 5 of 5

Thread: Contact form bug

  1. #1

    Join Date
    Aug 2011
    Location
    Sao Paulo, Brazil
    Posts
    54


    Exclamation Contact form bug

    I've discovered a small bug in Swift's contact form (perhaps WordPress?). If one enters brackets in the subject line, so that the shortcode looks like this:

    Code:
    [contact_form email="example@example.com" subject="[Blah] Something"]
    It interprets the closing bracket inside the subject parameter as closing the whole shortcode, so that:

    Code:
    Something"]
    Is printed right after the generated form.

    I haven't attempted actually using the form to see what'd happen. Better to change the brackets to parenthesis.

  2. #2

    Join Date
    Aug 2011
    Location
    Sao Paulo, Brazil
    Posts
    54


    Another small problem I found while translating the contact form related texts to use it in a pt-BR site. In /lib/plugins/shortcode-ninja/admin-shortcodes.php, lines 1464 and 1472, the e-mail field names "From: " and "Reply-To: " are being translated. This shouldn't happen, as those names are standardized. Translating them would result in odd results, probably preventing the form from working.

  3. #3

    Join Date
    Aug 2011
    Location
    Sao Paulo, Brazil
    Posts
    54


    And a last one: I had to add this to lib/load-core.php at line 38 for the form translation to load:

    Code:
    load_theme_textdomain( 'swiftthemes', TEMPLATEPATH . '/languages' );
    This text domain is very small and related almost exclusively to the contact form, so maybe it's mostly left overs from a previous mass replace from 'swiftthemes' to 'swift'?

  4. #4

    Join Date
    Aug 2011
    Location
    Sao Paulo, Brazil
    Posts
    54


    PS.: I found that the incorrect textdomain is limited to /lib/plugins/shortcode-ninja/admin-shortcodes.php, so quite easy to fix. It's just a matter of replacing all instances of 'swiftthemes' (including the single quotes) in the file with 'swift' (including the single quotes). Afterwards the above "load_theme_textdomain" workaround isn't needed anymore.

  5. #5


    fixed the issue

+ Reply to Thread

Similar Threads

  1. Contact form reporting
    By lukevincent in forum Support
    Replies: 4
    Last Post: 02-21-2014, 06:01 PM
  2. Default Contact Form
    By jennybhatt in forum Support
    Replies: 0
    Last Post: 11-27-2012, 11:39 AM
  3. Contact form in Header
    By ranger79 in forum Bug report and suggestions.
    Replies: 2
    Last Post: 11-15-2012, 01:01 AM
  4. Contact form notifications
    By lukevincent in forum Support
    Replies: 1
    Last Post: 03-19-2012, 03:42 AM
  5. Problem with Fast Secure Contact Form plugin (labels on left)
    By ppalace in forum Bug report and suggestions.
    Replies: 0
    Last Post: 03-01-2012, 04:35 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts