Form Email Plugin Condition Stopped Working

chapmanla

New Member
After upgrading from 3.0.7 to 3.0.9 (via Joomla update process), the "send email based on Condition" feature doesn't seem to work as previously. I have a form with two email plugins enabled, where the send conditions were mutually exclusive (i.e., send the email based upon whether the current date was before or after a specified deadline date). Prior to the upgrade, these conditions worked as expected - only one email was sent depending on the date. After the update, both plugins send emails.

I created a test form where I tried using the simplest condition code for two email plugins - the condition for one is "return true;" and the other is "return false;" (quotes were not included in the actual input). The form still generates two emails. I have looked at the code, specifically the shouldProcess function, but can't see why it doesn't work as before.

I have also updated the entire component through Github, the issue still exists.

Thanks for any help.
 
Hi
That vaguely rings a bell - could you try updating from the github zip to see if the issue has not already been fixed. See my signature for details on how to update from github

-Rob
 
Hi Rob,

I had updated from GitHub just before making my original post. I also did it again yesterday - there is no change in how the email plugin acts.

I am assuming that inputting "return true;" and "return false;" (excluding quotes) in the Condition box for the two email plugins should create mutually exclusive send conditions. It seems like the "shouldProcess" function is either being ignored or interpreting both conditions as true.

Thanks,

Larry
 
I can't replicate;
I've tested with two email plugins, it's sending only the one with "return true;"
Do you have any other settings (on new/edit, eval to ....)?
Can you post a screenshot?

Did you update from GitHub AFTER the update via Joomla?
 
I am using a test form with just the two email plugins, with no other evals or code settings. Attached is a screenshot of the "return false;" plugin setup, the other plugin is identical except for the "return true;" condition. The plugins do use an article template for the email message, but I get the same result if I use the default message template.

I have updated twice from GitHub after the Joomla 3.0.9 update.
 

Attachments

  • Screen Shot 2014-02-28 at 1.33.17 PM.jpg
    Screen Shot 2014-02-28 at 1.33.17 PM.jpg
    103.7 KB · Views: 430
OK, I think I have isolated the issue (it may be a bug).

In a form that contains a date element and an email plugin (with a conditional send), the email plugin behaves differently depending on the input to the date element. For testing purposes, I have a form that contains two email plugins, with the only difference being the Condition input (one plugin had "return=true;", the other "return=false;)
  1. If you leave the date element blank, the email plugin works correctly.
  2. If you select a date from the date picker, then no emails are sent.
  3. Also, no emails are sent if you set the access level of the date element to a higher ACL (e.g., the Form View access level is set to registered and the user is Public).
I have tested this on a couple of development sites (including a fresh install of Joomla 2.5.18 with no other components/plugins installed) and am seeing the same behavior.
I would be interested if anyone else could replicate this.
 
Friendly bump. It would be very helpful and greatly appreciated if someone would advise if they can replicate this very simple situation - Just create a form with a single element (date) and include two form email plugins with one set true and the other false. The email plugins will fail to send if anything is input into the date field.

I am seeing this using the latest Github (March 19) over multiple browsers and PHP 5.3.28 and 5.4.25.

In Troester's previous post, he was unable to replicate, but this was before I was able to isolate the issue to interaction between the date element and email plugins.

OK, I think I have isolated the issue (it may be a bug).

In a form that contains a date element and an email plugin (with a conditional send), the email plugin behaves differently depending on the input to the date element. For testing purposes, I have a form that contains two email plugins, with the only difference being the Condition input (one plugin had "return=true;", the other "return=false;)
  1. If you leave the date element blank, the email plugin works correctly.
  2. If you select a date from the date picker or if there is a default value set, then no emails are sent.
  3. Also, no emails are sent if you set the access level of the date element to a higher ACL (e.g., the Form View access level is set to registered and the user is Public).
I have tested this on a couple of development sites (including a fresh install of Joomla 2.5.18 with no other components/plugins installed) and am seeing the same behavior.

I would be interested if anyone else could replicate this.
 
I've tried with a date element in all variations - no luck, it's always sending the "true" email as expected.
Did you try with an other form, other article/html/php template....?
Is your Joomla error reporting set to max.?
email spam folder checked?
 
Thanks for trying to replicate this, Troester.

In an effort to let others see what I am experiencing, I have installed a clean version of Joomla 2.5.18 in a subdirectory of my hosted site. The only third-party extension installed is Fabrik, the template used the default Joomla template. You can access the test form at this link (the form is also accessible as a top menu item "Fabrik Test").

The form is simple - just an email field and date field. The form has three email plugins: one with a condition "return true;", one with "return false;", and one with no conditions. (The Subject lines for these three plugins are "True Condition", "False Condition", and "No Condition" respectively). The plugins are set to send emails to the email submitted in the form.

If you fill out the form and select a date, then all three emails are sent, including the one with the false condition. If you leave the date blank, then only the true condition and no condition emails are sent.

I will be glad to provide backend login credentials via PM if you want to look at the form setup.
 
Ok, I've tested on your site.
No condition is executed in case of inserting a date (you can check by putting echo 'this is condition true';exit; in your conditions).
Is your Joomla error reporting set to maximum?
Anything in any error log?
 
Thanks again, Troester.

The error reporting is set to maximum, and the only error I am getting is :

Code:
Strict Standards: Declaration of FPagination::_item_active() should be compatible with JPagination::_item_active(&$item) in /home3/delamofl/public_html/jtest/components/com_fabrik/helpers/pagination.php on line 32

I agree that the conditions are being ignored when inserting a date.

In a previous post, you stated that you were unable to replicate this issue on another site. Was your form setup the same as the one I posted in the subdirectory?
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top