[CONFIRMED:9200]E-mail this Link to a Friend (svn9199)

This forum is for reporting bugs in Joomla!. Please don't report problems with extensions in here.
Locked
hughesjr
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Sat Aug 04, 2007 5:06 pm
Contact:

[CONFIRMED:9200]E-mail this Link to a Friend (svn9199)

Post by hughesjr » Tue Oct 09, 2007 5:08 am

With SEF enabled, I get the following errors on svn9199 in the "E-mail a link to a Firend" using the beez template on a linux sever:

Notice: Undefined offset: 1 in /includes/router.php on line 183

Notice: Undefined offset: 1 in /includes/router.php on line 185

(where is the install directory)

The e-mail is properly sent after the error, but the window does not disappear and the error text shows up.
Last edited by mihu on Tue Oct 09, 2007 3:35 pm, edited 1 time in total.

User avatar
mihu
Joomla! Guru
Joomla! Guru
Posts: 741
Joined: Mon Mar 20, 2006 8:17 am

Re: E-mail this Link to a Friend (svn9199)

Post by mihu » Tue Oct 09, 2007 3:35 pm

TEST W/ SVN 9200
CONFIRMED

I am using default template, and hughesjr was using beez template, so I think this is nothing to do w/ template.
bento2go.com - We DO NOT sell bento !!

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

[CONFIRMED] 9204- E-mail article to friend bugs

Post by infograf768 » Wed Oct 10, 2007 7:46 am

1. Link in mail has a slash and sitename too much
http://192.168.0.100/joomla11new//joomla11new/section-blog/16-only-one-edit-window-how-do-i-create-qread-moreq.html

2. If debug language is on, message includes •
•This is an e-mail from (joomla15) sent by me (mymail@org). You may find the following Link interesting: http://192.168.0.100/joomla11new//jooml ... .html•
Last edited by Anonymous on Fri Oct 19, 2007 11:43 am, edited 1 time in total.
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

kdevine
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 200
Joined: Thu Mar 02, 2006 8:38 pm
Location: Baltimore, MD

Email Icon Building Improper Link

Post by kdevine » Wed Oct 17, 2007 9:14 pm

Description:
On my installation the link (the one being emailed by com_mailto) has the incorrect path.
In JHTMLIcon::email() of the content component the link is constructed using JURI::base() and JRoute and since my installation is in a subdirectory the subdirectory is being added to the link twice. For example...
JURI::base() returns http://localhost/joomla15/
JRoute returns /joomla15/index.php?{query}

The link in the email ends up being http://localhost/joomla15//joomla15/index.php?{query}

Reported on:
Revision 9243

Affected functions:
JTMLIcon::email()

Related files:
components/com_content/helpers/icon.php

user deleted

Re: 9204- E-mail article to friend bugs

Post by user deleted » Fri Oct 19, 2007 11:42 am

Dev note; confirmed on latest build 9251

User avatar
tcp
Joomla! Ace
Joomla! Ace
Posts: 1548
Joined: Wed Sep 21, 2005 9:25 am
Location: Thailand
Contact:

Re: [CONFIRMED] 9204- E-mail article to friend bugs

Post by tcp » Mon Oct 22, 2007 1:50 pm

Not sure, but this could be coming from line 72 of JHTMLIcon which is generating a weird link for me.  The following code

Code: Select all

$link	= JURI::base().JRoute::_("index.php?view=article&id=".$article->slug, false);
Gives me this value for $link.
Note the double slashes.  This could be a JRoute issue.

Haven't looked at the over amped text but we see a lot of these double-encodings.

tcp
Your solution for a single-page checkout on any website.
http://moolah-ecommerce.com

User avatar
tcp
Joomla! Ace
Joomla! Ace
Posts: 1548
Joined: Wed Sep 21, 2005 9:25 am
Location: Thailand
Contact:

Re: [CONFIRMED] 9204- E-mail article to friend bugs

Post by tcp » Mon Oct 22, 2007 6:29 pm

Last edited by tcp on Mon Oct 22, 2007 7:26 pm, edited 1 time in total.
Your solution for a single-page checkout on any website.
http://moolah-ecommerce.com

User avatar
tcp
Joomla! Ace
Joomla! Ace
Posts: 1548
Joined: Wed Sep 21, 2005 9:25 am
Location: Thailand
Contact:

Re: [CONFIRMED:9200]E-mail this Link to a Friend (svn9199)

Post by tcp » Mon Oct 22, 2007 6:29 pm

Your solution for a single-page checkout on any website.
http://moolah-ecommerce.com

dmsilva1
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Nov 07, 2007 11:03 pm

Re: [CONFIRMED] 9204- E-mail article to friend bugs - also effects pollxt

Post by dmsilva1 » Wed Nov 07, 2007 11:59 pm

I found this error on two sites that I'm developing and found the same problem occurring with PollXT. 

Someone posted that the solution was to reinstall, but since I have it on two sites, it seems clear I need to wait for an update or install an older version.  I don't want to go back, so anyone have any ideas on when this issue might get fixed? 

Thanks for any help!

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: [CONFIRMED] 9204- E-mail article to friend bugs

Post by infograf768 » Mon Nov 12, 2007 12:41 pm

I got that working by changing the line to
$link = JURI::base()."index.php?view=article&id="."$article->slug";

Not sure it is the way to go but it works here.
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

dmsilva1
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Nov 07, 2007 11:03 pm

Re: [CONFIRMED] 9204- E-mail article to friend bugs

Post by dmsilva1 » Mon Nov 12, 2007 7:17 pm

It worked!!!  I changed line 78 of both components\com_content\helpers\icon.php files on my 2 sites and that fixed the problem with the email to a friend bug.

Now I just need a solution that works on PollXT! 

User avatar
mcsmom
Joomla! Exemplar
Joomla! Exemplar
Posts: 7897
Joined: Thu Aug 18, 2005 8:43 pm
Location: New York
Contact:

Re: [CONFIRMED] 9204- E-mail article to friend bugs

Post by mcsmom » Fri Nov 16, 2007 2:20 am

I'm still getting a double here, and also a 500 error although the email itself is successfully sent.

http://www.mcscommunity.org/testsite//testsite/index.php?view=article&id=94%3Afarm-festival-get-ready&option=com_content&Itemid=73
So we must fix our vision not merely on the negative expulsion of war, but upon the positive affirmation of peace. MLK 1964.
http://officialjoomlabook.com Get it at http://www.joomla.org/joomla-press-official-books.html Buy a book, support Joomla!.

timwhit
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Tue Dec 19, 2006 7:47 pm
Location: Chicago, IL

Re: [CONFIRMED] 9204- E-mail article to friend bugs

Post by timwhit » Fri Nov 16, 2007 3:33 am

I reported this to the tracker, but I don't think it has been fixed in SVN.

kdevine
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 200
Joined: Thu Mar 02, 2006 8:38 pm
Location: Baltimore, MD

Re: [CONFIRMED] 9204- E-mail article to friend bugs

Post by kdevine » Fri Nov 16, 2007 3:48 am

There isn't currently a method in JURI to return just the base URL without any path info. The methods base() and root() both return the same thing. Would it be possible to change the parameter for the base() method instead of true/false pathonly to true/false includepath with the default true? I think that would solve the problem with this bug without affecting too many other calls to JURI::base() else where in the application.

User avatar
tcp
Joomla! Ace
Joomla! Ace
Posts: 1548
Joined: Wed Sep 21, 2005 9:25 am
Location: Thailand
Contact:

Re: [CONFIRMED] 9204- E-mail article to friend bugs

Post by tcp » Fri Nov 16, 2007 3:57 am

Got it.

tcp
Your solution for a single-page checkout on any website.
http://moolah-ecommerce.com

User avatar
tcp
Joomla! Ace
Joomla! Ace
Posts: 1548
Joined: Wed Sep 21, 2005 9:25 am
Location: Thailand
Contact:

Re: [CONFIRMED:9200]E-mail this Link to a Friend (svn9199)

Post by tcp » Sun Nov 18, 2007 10:06 pm

Updated in Rev 9386


tcp
Your solution for a single-page checkout on any website.
http://moolah-ecommerce.com

kdevine
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 200
Joined: Thu Mar 02, 2006 8:38 pm
Location: Baltimore, MD

Re: [CONFIRMED:9200]E-mail this Link to a Friend (svn9199)

Post by kdevine » Mon Nov 19, 2007 3:56 am

$link  = JURI::base()."index.php?view=article&id="."$article->slug";

That solution would fix the problem in com_content with the link but then unfortunately you don't get the Itemid included so no page parameters, right? Not sure anyone else cares.

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: [CONFIRMED:9200]E-mail this Link to a Friend (svn9199)

Post by infograf768 » Mon Nov 19, 2007 6:31 am

kdevine wrote: $link  = JURI::base()."index.php?view=article&id="."$article->slug";

That solution would fix the problem in com_content with the link but then unfortunately you don't get the Itemid included so no page parameters, right? Not sure anyone else cares.
TCP has just solved the issue as it should;)  )in last SVN.
tcp wrote: Updated in Rev 9386


tcp
It should therefore now be available also in the nightly build.
I consider the isssue as solved here.
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

User avatar
tcp
Joomla! Ace
Joomla! Ace
Posts: 1548
Joined: Wed Sep 21, 2005 9:25 am
Location: Thailand
Contact:

Re: [CONFIRMED:9200]E-mail this Link to a Friend (svn9199)

Post by tcp » Mon Nov 19, 2007 6:34 am

kdevine wrote: $link  = JURI::base()."index.php?view=article&id="."$article->slug";

That solution would fix the problem in com_content with the link but then unfortunately you don't get the Itemid included so no page parameters, right? Not sure anyone else cares.
Correct.  If anyone can post a solution then I would be glad to look at it.  I wasn't able to resolve the problem that you brought up previously re: JURI, and at this stage of the game ( pre-RC4 ) it would be a bad idea to modify the API of any framework class.

The double slash - maybe this is a general JRoute issue.  I'll ping the other devs about this.

tcp
Your solution for a single-page checkout on any website.
http://moolah-ecommerce.com

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: [CONFIRMED:9200]E-mail this Link to a Friend (svn9199)

Post by infograf768 » Mon Nov 19, 2007 6:52 am

:'(

Looks like you solved the double slash issue here, using

Code: Select all

$link	= JURI::base()."index.php?view=article&id=".$article->slug;
Is'nt it?
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

User avatar
tcp
Joomla! Ace
Joomla! Ace
Posts: 1548
Joined: Wed Sep 21, 2005 9:25 am
Location: Thailand
Contact:

Re: [CONFIRMED:9200]E-mail this Link to a Friend (svn9199)

Post by tcp » Mon Nov 19, 2007 7:01 am

Yeah but there may be a general JRoute issue that could affect other parts of the system and that I've asked other Devs to look at.  Not sure yet.

tcp
Your solution for a single-page checkout on any website.
http://moolah-ecommerce.com

kdevine
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 200
Joined: Thu Mar 02, 2006 8:38 pm
Location: Baltimore, MD

Re: [CONFIRMED:9200]E-mail this Link to a Friend (svn9199)

Post by kdevine » Mon Nov 19, 2007 2:09 pm

I've come across a problem with this solution - If the article slug contains spaces the URL in the email is not valid.

I'd like to offer this as another possible solution. Instead of stripping JRoute, replace JURI:base() with...

Code: Select all

$uri     =& JURI::getInstance();
$base  = $uri->toString( array('scheme', 'host', 'port'));
$link    = $base.JRoute::_( "index.php?view=article&id=".$article->slug, false );
Last edited by kdevine on Mon Nov 19, 2007 3:21 pm, edited 1 time in total.

User avatar
tcp
Joomla! Ace
Joomla! Ace
Posts: 1548
Joined: Wed Sep 21, 2005 9:25 am
Location: Thailand
Contact:

Re: [CONFIRMED:9200]E-mail this Link to a Friend (svn9199)

Post by tcp » Mon Nov 19, 2007 5:37 pm

Nice, I like it.  :)

I tested this using Rev 9397 with SEF both on and off.  In both cases the link is generated correctly although i haven't tried with with J installed in a subdirectory.

Updated in Rev 9398 .

tcp
Your solution for a single-page checkout on any website.
http://moolah-ecommerce.com

User avatar
mcsmom
Joomla! Exemplar
Joomla! Exemplar
Posts: 7897
Joined: Thu Aug 18, 2005 8:43 pm
Location: New York
Contact:

Re: [CONFIRMED:9200]E-mail this Link to a Friend (svn9199)

Post by mcsmom » Mon Nov 19, 2007 5:46 pm

That's great Toby.

I've noticed that spaces are causing many problems. THere was the media manager problem that I think has been resolved and the are also some problems that people are having when the alias has a space.
So we must fix our vision not merely on the negative expulsion of war, but upon the positive affirmation of peace. MLK 1964.
http://officialjoomlabook.com Get it at http://www.joomla.org/joomla-press-official-books.html Buy a book, support Joomla!.

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: [CONFIRMED:9200]E-mail this Link to a Friend (svn9199)

Post by infograf768 » Mon Nov 19, 2007 6:31 pm

tcp wrote:
I tested this using Rev 9397 with SEF both on and off.  In both cases the link is generated correctly although i haven't tried with with J installed in a subdirectory.
9398:  OK when using subdirectory but spaces in alias are not replaced.

http://192.168.0.100/joomla11new/more-a ... a/44-essai fo.html
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

kdevine
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 200
Joined: Thu Mar 02, 2006 8:38 pm
Location: Baltimore, MD

Re: [CONFIRMED:9200]E-mail this Link to a Friend (svn9199)

Post by kdevine » Mon Nov 19, 2007 7:23 pm

I see now this was a pre-existing bug before any changes from this thread were made.

I haven't completely tested this but how about preg_replace?

Code: Select all

$url	= 'index.php?option=com_mailto&tmpl=component&link='.base64_encode( preg_replace('/\s/', '%20', $link) );
Does that seem dirty to anyone else? Possibly move that into JRoute, somehow linked to the xhtml parameter?

Thinking aloud here.. should there be some validation in the alias? Sorry, I'm still a little confused what it is used for but if it is expressly intended for sef urls then maybe spaces should not be allowed.

User avatar
tcp
Joomla! Ace
Joomla! Ace
Posts: 1548
Joined: Wed Sep 21, 2005 9:25 am
Location: Thailand
Contact:

Re: [CONFIRMED:9200]E-mail this Link to a Friend (svn9199)

Post by tcp » Tue Nov 20, 2007 8:50 am

kdevine wrote:
Does that seem dirty to anyone else? Possibly move that into JRoute, somehow linked to the xhtml parameter?
I haven't looked at the code enough to say what the best solution is.  Generally speaking, any route should be a properly formed URL, so this issue is not specific to the e-mail link. 

I'm not sure where is the best place to put this check from an architectural point-of-view and will get some feedback from other devs.

tcp
Your solution for a single-page checkout on any website.
http://moolah-ecommerce.com

User avatar
tcp
Joomla! Ace
Joomla! Ace
Posts: 1548
Joined: Wed Sep 21, 2005 9:25 am
Location: Thailand
Contact:

Re: [CONFIRMED:9200]E-mail this Link to a Friend (svn9199)

Post by tcp » Fri Dec 07, 2007 9:50 am

Hunting through old posts.  I've added the preg_replace() code to JRoute::_() so that we know our $url will not have spaces in them.

Updated in Rev 9486.  Please let me know if this breaks anything.

tcp
Your solution for a single-page checkout on any website.
http://moolah-ecommerce.com

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: [CONFIRMED:9200]E-mail this Link to a Friend (svn9199)

Post by infograf768 » Sat Dec 08, 2007 3:40 pm

It works.
I have tested a few funtion and have not see any new error.
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

User avatar
mjvvorst
Joomla! Apprentice
Joomla! Apprentice
Posts: 38
Joined: Sun Sep 18, 2005 9:25 pm
Location: Netherlands

Re: [CONFIRMED:9200]E-mail this Link to a Friend (svn9199)

Post by mjvvorst » Thu Dec 13, 2007 1:59 pm

I've something to add to this discussion.
On my localhost (XPpro, PHP 5.2, Apache) everthing works like a charm (using rev. 9539)!
I use shared hosting for my live site, based on IIS6. But I get CGI-errors with different modules/components.
Together with my hoster we did some digging and found out that this was caused bij JRoute. I had SEF disabled, and just removing JRoute in controller.php of ie poll, contact and search, made all the CGI-errors disappear!
I'm not a developer, but it would be nice (and advantageous to Joomla! as well) if Joomla would work flawless in a standard IIS-environment, although it seems that installing FastCGI solves the problems as well (so, maybe it ís an IIS issue, I dont know; but I dó know that my hosted site works perfectly without JRoute!)

Mark


Locked

Return to “Joomla! 1.5 Bug Reporting”