[CONFIRMED:9200]E-mail this Link to a Friend (svn9199)
-
- Joomla! Apprentice
- Posts: 8
- Joined: Sat Aug 04, 2007 5:06 pm
- Contact:
[CONFIRMED:9200]E-mail this Link to a Friend (svn9199)
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.
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.
- mihu
- Joomla! Guru
- Posts: 741
- Joined: Mon Mar 20, 2006 8:17 am
Re: E-mail this Link to a Friend (svn9199)
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.
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 !!
- infograf768
- Joomla! Master
- Posts: 19133
- Joined: Fri Aug 12, 2005 3:47 pm
- Location: **Translation Matters**
[CONFIRMED] 9204- E-mail article to friend bugs
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•
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
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
-
- Joomla! Enthusiast
- Posts: 200
- Joined: Thu Mar 02, 2006 8:38 pm
- Location: Baltimore, MD
Email Icon Building Improper Link
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
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
- tcp
- Joomla! Ace
- Posts: 1548
- Joined: Wed Sep 21, 2005 9:25 am
- Location: Thailand
- Contact:
Re: [CONFIRMED] 9204- E-mail article to friend bugs
Not sure, but this could be coming from line 72 of JHTMLIcon which is generating a weird link for me. The following code
Gives me this value for $link.
Haven't looked at the over amped text but we see a lot of these double-encodings.
tcp
Code: Select all
$link = JURI::base().JRoute::_("index.php?view=article&id=".$article->slug, false);
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
http://moolah-ecommerce.com
- tcp
- Joomla! Ace
- Posts: 1548
- Joined: Wed Sep 21, 2005 9:25 am
- Location: Thailand
- Contact:
Re: [CONFIRMED] 9204- E-mail article to friend bugs
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
http://moolah-ecommerce.com
- tcp
- 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)
Your solution for a single-page checkout on any website.
http://moolah-ecommerce.com
http://moolah-ecommerce.com
-
- Joomla! Fledgling
- Posts: 2
- Joined: Wed Nov 07, 2007 11:03 pm
Re: [CONFIRMED] 9204- E-mail article to friend bugs - also effects pollxt
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!
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!
- infograf768
- Joomla! Master
- Posts: 19133
- Joined: Fri Aug 12, 2005 3:47 pm
- Location: **Translation Matters**
Re: [CONFIRMED] 9204- E-mail article to friend bugs
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.
$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
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
-
- Joomla! Fledgling
- Posts: 2
- Joined: Wed Nov 07, 2007 11:03 pm
Re: [CONFIRMED] 9204- E-mail article to friend bugs
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!
Now I just need a solution that works on PollXT!
- mcsmom
- 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
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
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!.
http://officialjoomlabook.com Get it at http://www.joomla.org/joomla-press-official-books.html Buy a book, support Joomla!.
-
- Joomla! Apprentice
- Posts: 31
- Joined: Tue Dec 19, 2006 7:47 pm
- Location: Chicago, IL
Re: [CONFIRMED] 9204- E-mail article to friend bugs
I reported this to the tracker, but I don't think it has been fixed in SVN.
-
- Joomla! Enthusiast
- Posts: 200
- Joined: Thu Mar 02, 2006 8:38 pm
- Location: Baltimore, MD
Re: [CONFIRMED] 9204- E-mail article to friend bugs
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.
- tcp
- Joomla! Ace
- Posts: 1548
- Joined: Wed Sep 21, 2005 9:25 am
- Location: Thailand
- Contact:
Re: [CONFIRMED] 9204- E-mail article to friend bugs
Got it.
tcp
tcp
Your solution for a single-page checkout on any website.
http://moolah-ecommerce.com
http://moolah-ecommerce.com
- tcp
- 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)
Updated in Rev 9386
tcp
tcp
Your solution for a single-page checkout on any website.
http://moolah-ecommerce.com
http://moolah-ecommerce.com
-
- 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)
$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.
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.
- infograf768
- 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)
TCP has just solved the issue as it should ( )in last SVN.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.
It should therefore now be available also in the nightly build.tcp wrote: Updated in Rev 9386
tcp
I consider the isssue as solved here.
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
- tcp
- 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)
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.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.
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
http://moolah-ecommerce.com
- infograf768
- 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)
Looks like you solved the double slash issue here, using
Code: Select all
$link = JURI::base()."index.php?view=article&id=".$article->slug;
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
- tcp
- 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)
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
tcp
Your solution for a single-page checkout on any website.
http://moolah-ecommerce.com
http://moolah-ecommerce.com
-
- 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)
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...
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.
- tcp
- 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)
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
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
http://moolah-ecommerce.com
- mcsmom
- 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)
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.
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!.
http://officialjoomlabook.com Get it at http://www.joomla.org/joomla-press-official-books.html Buy a book, support Joomla!.
- infograf768
- 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)
9398: OK when using subdirectory but spaces in alias are not replaced.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.
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
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
-
- 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)
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?
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.
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) );
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.
- tcp
- 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)
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.kdevine wrote:
Does that seem dirty to anyone else? Possibly move that into JRoute, somehow linked to the xhtml parameter?
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
http://moolah-ecommerce.com
- tcp
- 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)
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
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
http://moolah-ecommerce.com
- infograf768
- 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)
It works.
I have tested a few funtion and have not see any new error.
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
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
- mjvvorst
- 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)
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
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