[UNABLE TO CONFIRM] "E-mail this to a friend" doesn't work

Post Reply
carloff
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Fri Feb 17, 2006 3:11 pm

[UNABLE TO CONFIRM] "E-mail this to a friend" doesn't work

Post by carloff » Thu Mar 02, 2006 1:42 pm

Even if connected, the E-mail this to a friend gives me the following message:
You are not authorized to view this resource.

Joomla 1.0.8 Stable.

Any suggestion on how to handle this ?
Last edited by stingrey on Wed Apr 05, 2006 5:26 pm, edited 1 time in total.

User avatar
crash777
Joomla! Explorer
Joomla! Explorer
Posts: 334
Joined: Sat Sep 03, 2005 1:56 am
Location: Upstate New York

Re: "E-mail this to a friend" doesn't work

Post by crash777 » Fri Mar 17, 2006 2:17 am

I remember this being and issue way back in 4.5 something...
The only site I could currently try it on is on 1.04 but it did work... anyone care to try it on 1.08?
Thanks!
Aaron

carloff
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Fri Feb 17, 2006 3:11 pm

Re: "E-mail this to a friend" doesn't work

Post by carloff » Mon Mar 20, 2006 1:54 pm

crash777 wrote: I remember this being and issue way back in 4.5 something...
The only site I could currently try it on is on 1.04 but it did work... anyone care to try it on 1.08?
Thank you for your answer. I still didn't find how to handle this problem.

If anybody remembers where it was addressed in 4.5, I would appreciate a link to this thread.

User avatar
crash777
Joomla! Explorer
Joomla! Explorer
Posts: 334
Joined: Sat Sep 03, 2005 1:56 am
Location: Upstate New York

Re: "E-mail this to a friend" doesn't work

Post by crash777 » Mon Mar 20, 2006 3:57 pm

The only thing I could find is:
http://www.mambers.com/showthread.php?t ... ail+friend

Not sure how much it might help... :(
Thanks!
Aaron

carloff
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Fri Feb 17, 2006 3:11 pm

Re: "E-mail this to a friend" doesn't work

Post by carloff » Wed Mar 22, 2006 6:19 pm

crash777 wrote: The only thing I could find is:
http://www.mambers.com/showthread.php?t ... ail+friend

Not sure how much it might help... :(
Thank you for the link. There is no real answer in this thread, do you know which files are invoked when the e-mail button is pressed ? I could look into them...

User avatar
crash777
Joomla! Explorer
Joomla! Explorer
Posts: 334
Joined: Sat Sep 03, 2005 1:56 am
Location: Upstate New York

Re: "E-mail this to a friend" doesn't work

Post by crash777 » Wed Mar 22, 2006 6:50 pm

Not sure exactly, sorry. I have retested a couple of times and it seems to work fine for me. Has this worked for you in the past?
Thanks!
Aaron

carloff
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Fri Feb 17, 2006 3:11 pm

Re: "E-mail this to a friend" doesn't work

Post by carloff » Thu Mar 23, 2006 6:09 pm

crash777 wrote: Not sure exactly, sorry. I have retested a couple of times and it seems to work fine for me. Has this worked for you in the past?
It works in another site I did in Mambo 4.5.2.

The problem in my website started when I upgraded in Joomla 1.0.8, I think. This is not a huge thing, but I would prefer a full working e-mail button !

User avatar
crash777
Joomla! Explorer
Joomla! Explorer
Posts: 334
Joined: Sat Sep 03, 2005 1:56 am
Location: Upstate New York

Re: "E-mail this to a friend" doesn't work

Post by crash777 » Thu Mar 23, 2006 6:21 pm

So you upgraded from 4.5.2 (M@mbo) to Joomla 1.08? Any number of things could cause the email friend problem if this is the case.. Seeing that some sites do work and some may not, it is unlikely it is a bug in Joomla, however, I am not sure of the files invoked during this process... Does anyone know?
Thanks!
Aaron

carloff
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Fri Feb 17, 2006 3:11 pm

Re: "E-mail this to a friend" doesn't work

Post by carloff » Thu Mar 23, 2006 11:54 pm

crash777 wrote: So you upgraded from 4.5.2 (M@mbo) to Joomla 1.08? Any number of things could cause the email friend problem if this is the case.. Seeing that some sites do work and some may not, it is unlikely it is a bug in Joomla, however, I am not sure of the files invoked during this process... Does anyone know?
No, the website where I have this problem was created directly in Joomla 1.07, then I upgraded to 1.08. Another site I did is still in M@mbo 4.5.2 and the e-mail button works there...

carloff
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Fri Feb 17, 2006 3:11 pm

Re: "E-mail this to a friend" doesn't work

Post by carloff » Fri Mar 24, 2006 12:19 am

Finally, I found in content.php the following code, which contains mosNotAuth.
* Shows the email form for a given content item.
* @param int The content item id
*/
function emailContentForm( $uid ) {
global $database, $my;

$row = new mosContent( $database );
$row->load( $uid );

if ( $row->id === null || $row->access > $my->gid ) {
mosNotAuth();
return;
} else {
$query = "SELECT template"
. "\n FROM #__templates_menu"
. "\n WHERE client_id = 0"
. "\n AND menuid = 0"
;
$database->setQuery( $query );
$template = $database->loadResult();
HTML_content::emailForm( $row->id, $row->title, $template );
}
Who knows what to edit in order to solve the problem: You are not authorized to view this resource.

http://www.macgraph.com
Last edited by carloff on Tue Mar 28, 2006 7:29 pm, edited 1 time in total.

MaxX
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Tue Sep 06, 2005 10:57 am

Re: "E-mail this to a friend" doesn't work

Post by MaxX » Mon Apr 03, 2006 6:16 pm

I am having this exact same problem upgrading from joomla 1.0.7 to joomla 1.0.8

I will try removing the mosnotauth() part..

MaxX
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Tue Sep 06, 2005 10:57 am

Re: "E-mail this to a friend" doesn't work

Post by MaxX » Mon Apr 03, 2006 6:21 pm

Ok I fixed it by commenting these lines which checks some sort of 'hash' which always fails.

//$validate = mosGetParam( $_POST, mosHash( $mosConfig_db ), 0 );
//if (!$validate) {
// probably a spoofing attack
// mosErrorAlert( _NOT_AUTH );
//}

carloff
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Fri Feb 17, 2006 3:11 pm

Re: "E-mail this to a friend" doesn't work

Post by carloff » Tue Apr 04, 2006 9:03 am

Thanks a lot, it now works perfectly !

Yves


http://www.macgraph.com

MaxX
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Tue Sep 06, 2005 10:57 am

Re: "E-mail this to a friend" doesn't work

Post by MaxX » Tue Apr 04, 2006 9:21 am

Can somebody from joomla fix this hash function in the next version maybe? :)

ChuckCourter
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Wed Mar 22, 2006 2:32 am

Re: "E-mail this to a friend" doesn't work

Post by ChuckCourter » Tue Apr 04, 2006 3:30 pm

MaxX wrote: Ok I fixed it by commenting these lines which checks some sort of 'hash' which always fails.

//$validate = mosGetParam( $_POST, mosHash( $mosConfig_db ), 0 );
//if (!$validate) {
// probably a spoofing attack
// mosErrorAlert( _NOT_AUTH );
//}
I'm having the same problem. Are we talking "com_content/content.php" here? I just tried the above on this and no help.

Is this the correct file?

Thanks,
Chuck

MaxX
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Tue Sep 06, 2005 10:57 am

Re: "E-mail this to a friend" doesn't work

Post by MaxX » Tue Apr 04, 2006 4:04 pm

ChuckCourter wrote:
MaxX wrote: Ok I fixed it by commenting these lines which checks some sort of 'hash' which always fails.

//$validate = mosGetParam( $_POST, mosHash( $mosConfig_db ), 0 );
//if (!$validate) {
// probably a spoofing attack
// mosErrorAlert( _NOT_AUTH );
//}
I'm having the same problem. Are we talking "com_content/content.php" here? I just tried the above on this and no help.

Is this the correct file?

Thanks,
Chuck
Yes thats the correct file.

If commenting it out dosent work then try commenting out some of the further checks that are being made..

User avatar
stingrey
Joomla! Hero
Joomla! Hero
Posts: 2756
Joined: Mon Aug 15, 2005 4:36 pm
Location: Marikina, Metro Manila, Philippines
Contact:

Re: "E-mail this to a friend" doesn't work

Post by stingrey » Wed Apr 05, 2006 5:26 pm

I have checked the email to friend ability on 1.0.8 and 1.0.9 SVN and both worked as expected.

I reexamined the code people referenced regards mosHash and it is working as it should.



All these checks were introduced to limit the possibility that this function would be misused.
Rey Gigataras
http://www.wizmediateam.com <-- great team of talented Web Designers and Programmers!
http://about.me/reygigataras <-- About Me :)
Partner, Business Development & Project Manager, Event Manager, Sports Coach :D

quiddities
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Oct 13, 2006 7:14 pm

Re: [UNABLE TO CONFIRM] "E-mail this to a friend" doesn't work

Post by quiddities » Fri Apr 27, 2007 7:02 pm

I am running a fresh install of 1.0.11 Stable and was still having this issue. This topic helped my find where the code was located & I was able to isolate my issue which I have not found anywhere else. If you have the email icon turned off in your global config you will receive this error... even if you you have the email icon turned on for a particular page. I commented out the following code.

// if ($mosConfig_hideEmail) {
// echo _NOT_AUTH;
// return;
// }

I just wanted to post this in case someone else still came across this issue.


Post Reply

Return to “Superseded Issues - Archive”