Fresh install of joomla 3.7.3
Postback, then message box that captcha wasn't set and still filled Textboxes
Postback with messagebox, but all textboxes are empty so user has to enter again everything
Problem didn't occur before 3.7.3
PHP 5.4.16
Win7 Business Edition SP1
Apache 2.4.4.
Mysql 5.0.10
Hint to solution/reason:
I don’t know what’s the line for but in file “components\com_contact\views\contact\view.html.php” line 75 the contact data will be overwritten with category id. If this line is commented out it works. You can enter something in contact form, if you don’t enter captcha data and submit no data will be lost in textboxes and user don’t need to enter again.
$app->setUserState('com_contact.contact.data', array('catid' => $item->catid));
I use my own simple captcha plugin.
If I entered data in the contact form and do not fill in correctly the captcha field, all form data loses after a post.
Problem didn't occur certainly in J3.7.0.
#17122 test negative.
Additional comment:
See also: Additional comments pascal-910 (13 july)
If I delete the line 75: $app->setUserState('com_contact.contact.data', array('catid' => $item->catid));
No data in contact form data loses. That's OK.
Status | New | ⇒ | Discussion |
You shouldn't delete the line but instead use a getfromstate request in there and if it doesn't exists it sets $itsm->catid
With var_dump($item) you can see that $item->catid is already loaded. So it exists.
Hi @tonypartridge,
Do you mean the following?
Change line 75 (..a\components\com_contact\views\contact\view.html.php))
$app->setUserState('com_contact.contact.data', array('catid' => $item->catid));
To
if (!isset($item->catid) || empty($item->catid))
{
$app->setUserState('com_contact.contact.data', array('catid' => $item->catid));
}
If I tested local, its works by the 'Single Contact' form + captcha enabled.
Gr.
That looks good to me Gr, can you do a pull request?
Status | Discussion | ⇒ | Information Required |
I have made my first pull request #17743.
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-08-28 14:25:41 |
Closed_By | ⇒ | franz-wohlkoenig |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/17126
closed as having Pull Request #17743
Hi @franz-wohlkoenig, Pull Request #17743 is still open for testing.
have called 2 former Testers for retest.
Please test #17122
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17126.