Home arrow Forum Missing url in all emails going out - SMF RC 1+bridge 1.01b
  Welcome, Guest. Please login or register.
Did you miss your activation email?
December 03, 2008, 01:24:31 AM
Home New Posts Search Calendar


Login with username, password and session length
+  Joomla Forum
|-+  Joomla Hacks
| |-+  Joomla-SMF Forum Support
| | |-+  Joomla-SMF 1.0.x (Moderators: -Wolverine, kai920)
| | | |-+  Missing url in all emails going out - SMF RC 1+bridge 1.01b
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] 2 Go Down Print
Author Topic: Missing url in all emails going out - SMF RC 1+bridge 1.01b  (Read 9055 times)
PJ
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 3


View Profile
Missing url in all emails going out - SMF RC 1+bridge 1.01b
« on: October 11, 2005, 09:55:09 PM »

Its a fresh install of the latest version of SMF and the bridge just downloaded here.

ALl of the emails that are being send out only have the last part of the linkand look like they're missing the info in $script (ie "http://www.mydomain.tld/smf-folder/"). This is all set up correctly in the smf admin -> server settings.

for example:

Quote
A new topic, 'blah blah blah', has been made on a board you are watching.

You can see it at
topic=507.new#new

More topics may be posted, but you won't receive more email notifications until you return to the board and read some of them.

Unsubscribe to new topics from this board by clicking here: action=notifyboard;board=11.0

Regards,
The SMF Forums Team.

Forum was working fine until bridge was installed.
Bridge install seemed to work perfectly. (yes all the preflight checks were good)
Board is unwrapped

This forum is live, so any quick help  would be greatly appreciated!
« Last Edit: October 11, 2005, 10:04:26 PM by Piers » Logged
joelabq
Joomla Newbie
*

Karma: +2/-0
Offline Offline

Posts: 26


View Profile
Re: Missing url in all emails going out - SMF RC 1+bridge 1.01b
« Reply #1 on: October 11, 2005, 10:05:31 PM »

Mine does this only it's random.. Noticed it today during a topic notification. I had one complaint from a new user that the URL was incomplete like you describe.

I can't reproduce it though, it's just "random"...

Joel
Logged
PJ
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 3


View Profile
FIXED!!!! Missing url in all emails going out - SMF RC 1+bridge 1.01b
« Reply #2 on: October 14, 2005, 06:17:43 PM »

The universe has a sense of irony....

To fix this and have links displaying properly I just had to comment out the lines (496-497 on mine) below:

Code:
//JOOMLAHACKS.COM : fix links
global $mosurl;
$message = str_replace($scripturl."?", $mosurl, $message);

and my links now work perfectly! Bizzare.

So for any newbies even more newbie than me, just replace the lines above with the lines below in your SMF folder/sources/Subs-Post.php with the lines below:

Code:
//JOOMLAHACKS.COM : fix links
// global $mosurl;
// $message = str_replace($scripturl."?", $mosurl, $message);

Live long and prosper.
Logged
Editor (cowboy)
Administrator
Joomla Guru
*****

Karma: +86/-23
Offline Offline

Posts: 1144



View Profile WWW
Re: Missing url in all emails going out - SMF RC 1+bridge 1.01b
« Reply #3 on: October 14, 2005, 11:30:43 PM »

That fix should reference the link to your com_smf link. If you commented it out, the link will be your original SMF url. I will take a look at this for 1.0.3.

[1.0.3]
« Last Edit: October 14, 2005, 11:32:17 PM by Editor (cowboy) » Logged
Vramin
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 9


Intensitive


View Profile
Re: Missing url in all emails going out - SMF RC 1+bridge 1.01b
« Reply #4 on: October 18, 2005, 04:23:24 PM »

Here's what appears to be the real fix...

Somehow $mosurl doesn't seem to have a value when it needs it, so it replaces $scripturl with null. I coded a test fix like this:

Code:
//JOOMLAHACKS.COM : fix links
global $mosurl;
// HACK: $mosurl is coming out null, so I copied this in from my config file
if (!$mosurl) {$mosurl = "http://www.yourdomain.com/index.php?option=com_smf&Itemid=35&";}

That seemed to work, so next I tried this:
Code:
  //JOOMLAHACKS.COM : fix links
//global $mosurl;
$message = str_replace($scripturl."?", $GLOBALS["mosurl"], $message);
That seemed to work as well, I get full Joomla URL's back to the private messages in my email notifications. It's odd because the first reference to $mosurl is the global declaration, so it should have taken the global value.

Myself, I always tend to go through the $GLOBALS array. I've had difficulty with global declarations in the past that I solved by using the array.
Logged
Vramin
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 9


Intensitive


View Profile
Re: Missing url in all emails going out - SMF RC 1+bridge 1.01b
« Reply #5 on: October 18, 2005, 04:29:10 PM »

Well, I give up. I reversed all that out and tried again and still got a good link. Is it intermittent? The first notification I got today had arguments only. I'm going home.
Logged
Editor (cowboy)
Administrator
Joomla Guru
*****

Karma: +86/-23
Offline Offline

Posts: 1144



View Profile WWW
Re: Missing url in all emails going out - SMF RC 1+bridge 1.01b
« Reply #6 on: October 18, 2005, 04:54:32 PM »

well, just wait for 1.0.2 hopefully this weekend. I'll verify this issue for that release.
Logged
mophsy
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 8


View Profile
Re: Missing url in all emails going out - SMF RC 1+bridge 1.01b
« Reply #7 on: October 24, 2005, 06:47:40 AM »

is your solution good for mambo 4.5.2.3 and MamboSMFForum_1.3.1.3 ? i'm using smf 1.0.5

i have almost the same problem but i get this in my email:

/index.phptopic=19.new;topicseen#new    <-- missing the "?" between index.php and topic=19...

If i put the "?" all works fine!

How can i fix this?

Please support
Logged

Gura Humorului Portal | www.gurahumorului.org
Editor (cowboy)
Administrator
Joomla Guru
*****

Karma: +86/-23
Offline Offline

Posts: 1144



View Profile WWW
Re: Missing url in all emails going out - SMF RC 1+bridge 1.01b
« Reply #8 on: October 25, 2005, 03:56:41 PM »

mophsy,

you can try his solution... it should work.
Logged
Editor (cowboy)
Administrator
Joomla Guru
*****

Karma: +86/-23
Offline Offline

Posts: 1144



View Profile WWW
Re: Missing url in all emails going out - SMF RC 1+bridge 1.01b
« Reply #9 on: October 25, 2005, 05:15:09 PM »

Here's what appears to be the real fix...

Somehow $mosurl doesn't seem to have a value when it needs it, so it replaces $scripturl with null. I coded a test fix like this:

Code:
//JOOMLAHACKS.COM : fix links
global $mosurl;
// HACK: $mosurl is coming out null, so I copied this in from my config file
if (!$mosurl) {$mosurl = "http://www.yourdomain.com/index.php?option=com_smf&amp;Itemid=35&amp;";}

That seemed to work, so next I tried this:
Code:
  //JOOMLAHACKS.COM : fix links
//global $mosurl;
$message = str_replace($scripturl."?", $GLOBALS["mosurl"], $message);
That seemed to work as well, I get full Joomla URL's back to the private messages in my email notifications. It's odd because the first reference to $mosurl is the global declaration, so it should have taken the global value.

Myself, I always tend to go through the $GLOBALS array. I've had difficulty with global declarations in the past that I solved by using the array.


i'm trying to address this issue for 1.0.2, i'm just really not sure how to fix it because it is fine on my testing. The $mosurl is never null. I guess for users having this issue, just manually put your url.
Logged
mophsy
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 8


View Profile
Re: FIXED!!!! Missing url in all emails going out - SMF RC 1+bridge 1.01b
« Reply #10 on: October 25, 2005, 08:38:50 PM »

The universe has a sense of irony....

To fix this and have links displaying properly I just had to comment out the lines (496-497 on mine) below:

Code:
//JOOMLAHACKS.COM : fix links
global $mosurl;
$message = str_replace($scripturl."?", $mosurl, $message);

and my links now work perfectly! Bizzare.

So for any newbies even more newbie than me, just replace the lines above with the lines below in your SMF folder/sources/Subs-Post.php with the lines below:

Code:
//JOOMLAHACKS.COM : fix links
// global $mosurl;
// $message = str_replace($scripturl."?", $mosurl, $message);

Live long and prosper.


Look, i dont know at all php or stuffs like that, but after i lost 5 kg/minute manipulating database and upgrading forum to 1.1RC1 i had the same error. I used the solution in quote. Works perfect!

Thanks a lot guys!
Logged

Gura Humorului Portal | www.gurahumorului.org
ChaosEnergy
Joomla Newbie
*

Karma: +1/-0
Offline Offline

Posts: 14


View Profile
Re: Missing url in all emails going out - SMF RC 1+bridge 1.01b
« Reply #11 on: December 08, 2005, 05:01:37 AM »

i got a message from a user about broken activation link
smf 1.1rc1
joomla 104
bridge 102a
Logged
afonic
Joomla Pro
**

Karma: +8/-1
Offline Offline

Posts: 84



View Profile WWW
Re: Missing url in all emails going out - SMF RC 1+bridge 1.01b
« Reply #12 on: January 12, 2006, 10:47:14 AM »

It happens in my site in about 1 every 100 users.

I mean 100 users (and me in my tests) get the activation URL correctly, 1 is getting just the ?.... path, not the site's URL in front.

Weird...
Logged

-Wolverine
Moderator
Joomla Guru
*****

Karma: +376/-34
Offline Offline

Posts: 3393


Lead Developer


View Profile WWW
Re: Missing url in all emails going out - SMF RC 1+bridge 1.01b
« Reply #13 on: January 23, 2006, 09:05:38 AM »

I think the best fix here is if mosurl is not set, require_once the Joomla-SMF config file and then use mosurl.  That way any changes a user makes will be replicated always.  I am going to test this.
Logged

Need help?  Check Here First!
Get the JSMF User Guide
SEARCH this forum.
-Wolverine
Moderator
Joomla Guru
*****

Karma: +376/-34
Offline Offline

Posts: 3393


Lead Developer


View Profile WWW
Re: Missing url in all emails going out - SMF RC 1+bridge 1.01b
« Reply #14 on: January 23, 2006, 09:25:10 AM »

I made this change to the code.  Since the problem hasn't occurred for me I am unsure if it truly works.  If one of you with consistent problems could try it and report any failures or problems that would be great.  I plan to include this in the next release of the Joomla-SMF bridge.

Code:
//JOOMLAHACKS.COM : fix links
global $mosurl;
        if(empty($mosurl)){
            global $mosConfig_absolute_path;
            require_once($mosConfig_absolute_path."/administrator/components/com_smf/config.smf.php");
        }
$message = str_replace($scripturl."?", $mosurl, $message);
« Last Edit: January 24, 2006, 05:47:19 PM by -Wolverine » Logged

Need help?  Check Here First!
Get the JSMF User Guide
SEARCH this forum.
Pages: [1] 2 Go Up Print 
« previous next »
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Joomla Forum | Powered by SMF 1.1 RC1.
© 2001-2005, Lewis Media. All Rights Reserved.
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!

Joomla Hacks is a Joomla Components, Joomla Modules, Joomla Templates, & Joomla Mambots resource portal. None of the text or images in this public website may be copied without the expressed written consent of the authors. Copyright 2005 by JoomlaHacks.com. Powered by Joomla. All rights reserved.
Terms of Use
Joomla Hacks



Joomla Hacks
German Lang French Lang Italian Lang Spanish Lang Japanese Lang Chinese Lang
MamboBuzz.com
Search Contact About Advertise Blogs Topsites Submit News Register Login