J3 Issue ?
avatar davidcibeles
davidcibeles
2 Dec 2015

Steps to reproduce the issue

Enable cache com_content
Load an article from the front-end component com_content
Open a new private browsing (To generate a new session)
Use "Email this link to a friend" from the icons

Expected result

The link is sent to a friend.

Actual result

COM_MAILTO_EMAIL_NOT_SENT

/components/com_mailto/controller.php

$link     = MailtoHelper::validateHash($this->input->get('link', '', 'post'));

if (!$link || !JUri::isInternal($link))
{
    // Non-local url...
    JError::raiseNotice(500, JText::_('COM_MAILTO_EMAIL_NOT_SENT'));

    return $this->mailto();
}

System information (as much as possible)

/components/com_content/helpers/icon.php
JHtmlIcon::email

line 90: $url = 'index.php?option=com_mailto&tmpl=component&template=' . $template . '&link=' . MailToHelper::addLink($link);

MailToHelper::addLink -> adds a URL to the mailto system and returns the hash.
But only in the first session!!
Later the others users will get the hash from the cached file.

/components/com_mailto/controller.php
And when the controller of com_mailto use MailtoHelper::validateHash

Line 61: $mailto_links = $session->get('com_mailto.links', array());

This returns an empty array to de new users.

Additional comments

avatar davidcibeles davidcibeles - open - 2 Dec 2015
avatar infograf768
infograf768 - comment - 3 Dec 2015

@dodiaraculus17

Please stop spamming our repo!

avatar Kubik-Rubik
Kubik-Rubik - comment - 3 Dec 2015

Spam deleted!

avatar bertmert
bertmert - comment - 4 Dec 2015

@davidcibeles

Enable cache com_content

Where? How?

avatar brianteeman brianteeman - change - 4 Aug 2016
Status New Confirmed
avatar brianteeman
brianteeman - comment - 4 Aug 2016

I can confirm that if you enable cache
Open an article and then open the same article in a private window
Using "Email this link to a friend" it was sent successfuly in the first window but in the private window I got a "Email could not be sent."


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8582.

avatar jobwol
jobwol - comment - 15 Dec 2016

After mostly every Joomla update I'll get the errors on the option email to a friend. I found my solution on Voodish. You'll search for the file /components/com_mailto/controller.php

Locate the following line of code (approximately line 57):
if($timeout == 0 || time() - $timeout < 20) {

Change the line to the following:

if($timeout == 0 || time() - $timeout > 20) {
Save, Upload and test.
You can also increase the time from 20 to say 50.

Tnx to voodish


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/8582.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 28 Jan 2017

Issue still valid.

avatar AlexRed
AlexRed - comment - 30 Mar 2017

I can confirm in Joomla! 3.7.0-staging


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/8582.

avatar AlexRed
AlexRed - comment - 2 May 2017

I can confirm the problem on Joomla! 3.7.1-dev (nightly Build)


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/8582.

avatar franz-wohlkoenig franz-wohlkoenig - change - 8 Nov 2017
The description was changed
Status Confirmed Needs Review
avatar joomla-cms-bot joomla-cms-bot - edited - 8 Nov 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 8 Nov 2017

Status is set on "Needs Review".

avatar rdeutz rdeutz - change - 13 Nov 2017
Status Needs Review Pending
avatar rdeutz
rdeutz - comment - 13 Nov 2017

Set to pending, it's just a bug

avatar franz-wohlkoenig franz-wohlkoenig - change - 13 Nov 2017
Status Pending Discussion
avatar franz-wohlkoenig franz-wohlkoenig - change - 13 Nov 2017
Status Discussion Known Issue
Closed_Date 0000-00-00 00:00:00 2017-11-13 14:50:28
Closed_By franz-wohlkoenig
avatar joomla-cms-bot joomla-cms-bot - change - 13 Nov 2017
Status Known Issue Closed
Closed_By franz-wohlkoenig joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 13 Nov 2017
avatar joomla-cms-bot
joomla-cms-bot - comment - 13 Nov 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 13 Nov 2017
Status Closed Discussion
Closed_Date 2017-11-13 14:50:28
Closed_By joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - change - 13 Nov 2017
Status Discussion New
Closed_Date 0000-00-00 00:00:00
avatar joomla-cms-bot joomla-cms-bot - reopen - 13 Nov 2017
avatar joomla-cms-bot
joomla-cms-bot - comment - 13 Nov 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 19 Nov 2017
Status New Discussion
avatar brianteeman brianteeman - change - 25 Mar 2018
Labels Added: J3 Issue
avatar brianteeman brianteeman - labeled - 25 Mar 2018
avatar alikon
alikon - comment - 26 Apr 2019

i'm unable to reproduce this issue with current staging
Screenshot from 2019-04-26 13-01-21

p.s
i'll close this issue in a week if no other feedback

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 26 Apr 2019

@alikon can we close this now as it always can be reopened - easier to manage?

avatar joomla-cms-bot joomla-cms-bot - change - 26 Apr 2019
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2019-04-26 15:31:52
Closed_By joomla-cms-bot
avatar alikon alikon - change - 26 Apr 2019
Closed_By joomla-cms-bot alikon
Labels
avatar joomla-cms-bot joomla-cms-bot - close - 26 Apr 2019
avatar joomla-cms-bot
joomla-cms-bot - comment - 26 Apr 2019

Set to "closed" on behalf of @alikon by The JTracker Application at issues.joomla.org/joomla-cms/8582

avatar alikon
alikon - comment - 26 Apr 2019

closing as it seems no more reproducible
it always can be reopened if needed


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/8582.

Add a Comment

Login with GitHub to post a comment