TinyPortal

Development => Support => Topic started by: Lum-chan on January 16, 2012, 01:05:00 PM

Title: Unable to use external weblinks in HTML/BCC articles
Post by: Lum-chan on January 16, 2012, 01:05:00 PM
Link to my site: http://forum.lum-chan.com
SMF version: SMF 2.0.2
TP version: TP 1.0 RC3
Default Forum Language: English
Theme name and version: Default Curve and Grasslands Curve Variation
Browser Name and Version: Firefox 9.0.1 and IE 8.0.6001.18702
Mods installed: See text below (quoted)
Related Error messages: See text below (quoted)

Mods Installed:
Quote
1.    SMF Gallery Lite    3.0.4
2.    Random News Fader    1.0
3.    YouTube BBCode    2.6
4.    reCAPTCHA for SMF    0.9.8a
5.    Enhanced PM Popup    1.0.1
6.    Extended Help    1.0
7.    Highslide 4 SMF    0.7a
8.    Internal_Links_Use_Same_Window    1.2
9.    SMF Staff Page    1.7
10.    Spoiler Tag    0.7.2a
11.    SMF Links    2.3
12.    AvatarSelect    1.2.1
13.    Default Avatar    2.1
14.    TinyPortal    1.104
15.    Tapatalk SMF Plugin    1.0.2
16.    Nico Embed BBCode    1.0.3
17.    PM Sent Notification    1.0.5
18.    Treasury    2.10
19.    Users Online Today    2.0 RC1

The two errors in the Errorlog:
Quote
Lum-chan
Session: 99c47893157bdd582ff788d0a2b032f8
Type of error: General
URL: http://forum.lum-chan.com/index.php?page=340
2: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource
File: /mnt/webg/d0/55/51962555/htdocs/forum/Themes/default/TPsubs.template.php(114) : eval()'d code
Line: 139

Quote
Lum-chan
Session: 99c47893157bdd582ff788d0a2b032f8
Type of error: Undefined
URL: http://forum.lum-chan.com/index.php?page=340
message: 8: Undefined variable: txt
File: /mnt/webg/d0/55/51962555/htdocs/forum/Themes/default/TPsubs.template.php(114) : eval()'d code
Line: 22

The url shown in both error isn't available due to being not created.

I dont know since when this problem is active but this happens with SMF 2.0.1/TP 1.0RC2 and SMF 2.0.2/TP 1.0RC3 (both running on the same hosing-company, Strato AG)

When I try to create a new article in HTML or BCC and using a weblink/url in these articles the server gives me the errormessage '503 Service Temporarily Unavailable'. When I update a artible (HTML or BCC) the same happens with the same message.

When I use as an external link http://www.lum-chan.com or forum.lum-chan.com, everything works ok, the page gets created or updated, but as soon as I use another url, such as http://www.telegraaf.nl or any other (external) domainname the server looks like it's crashing.

The above happens with the following configurations:
SMF 2.0.1 + TP 1.0RC2 (Strato AG) http://www.miaauw.com
SMF 2.0.2 + TP 1.0RC3 (Strato AG) http://forum.lum-chan.com / http://www.lum-chan.com

It doesn't happen on this configuration:
SMF 2.0.2 + TP 1.0RC3 (Sohosted.com) http://www.passat35i-forum.nl

Links to external images in any type of article (HTML or BCC) do show up fine with no errors at all.

I disabled mods such as 'Nico Embed BBCode', 'Internal_Links_Use_Same_Window' and 'YouTube BBCode' but this didn't solve the problem.

Am I missing a setting in TP which prevents external URLs to be allowed in any type of article, did I messed up something or might it be a hosting-issue? I was thinking of the first mentioned error from the errorlog, but I'm not sure...

I hope this can be solved so I can update my website (http://forum.lum-chan.com) with fresh new web-links to external sites.

Thanks in advance!
Title: Re: Unable to use external weblinks in HTML/BCC articles
Post by: IchBin on January 16, 2012, 09:00:18 PM
The errors you posted are from a block or article that has an error in the php code.

The links problem sounds like a server issue. I've never seen TP have any problems with this. Are you just putting the link into an article? Or are you trying to include a file from another domain by linking to it? Can you post an example of code that works, and code that does not?
Title: Re: Unable to use external weblinks in HTML/BCC articles
Post by: Lum-chan on January 16, 2012, 10:24:37 PM
Oke, I'll try:

This is what works:

http://www.lum-chan.com (with or without trailing slash)
http://forum.lum-chan.com (with or without trailing slash)
http://forum.lum-chan.com/index.php?page=127
<a href="any of the links above" target="links"> Any text you type here</a> (for html article) (with or without trailing slash)
[ url=any of the links above]any text you can put here[/url ] (fur bcc article) (with or without trailing slash)

What does not work:

http://www.telegraaf.nl (with or without trailing slash)
http://www.tagged.com (with or without trailing slash)
http://forum.miaauw.com/index.php?page=12
<a href="any of the links above" target="links"> Any text you type here</a> (for html article) (with or without trailing slash)
[ url=any of the links above]any text you can put here[/url ] (fur bcc article) (with or without trailing slash)

In short: A link anything other than the domain or sub-domain of my website will fail when entered in a html or bcc article then updating it or creating a new one. So http://www.lum-chan.com , images.lum-cchan.com or anything.lum-chan.com  (all with or without trailing slash) will work but anyting NOT part of the domain lum-chan.com will fail with that server-error.

If you need a php-info output of my server, i'll be glad to provide it. Could it be an issue with SMF 2.xx? When the website was before version 2.0 Final (never used the beta's /RC's) with TP (version before RC1.1) I never had this problem on the same hosting-provider...

[edit]
link to phpinfo
http://forum.lum-chan.com/_phpinfo.php

I hope this helps a bit. I'm completely clueless on this...
[edit]
Title: Re: Unable to use external weblinks in HTML/BCC articles
Post by: IchBin on January 17, 2012, 03:09:54 AM
I do not believe it is a software issue. I've never seen any code where SMF or TP strip links out like that or have a problem with them. This must be a server issue. I can only think that something like mod_security on your server is filtering all the requests. I'd hit your host up with this information and see what they say.
Title: Re: Unable to use external weblinks in HTML/BCC articles
Post by: Lum-chan on January 17, 2012, 08:49:06 AM
Thanks for your info, IchBin! I did a search on [Unkown]'s mod_security (as stated on one of your other posts which popped-up when searching for mod_security) and added his suggested addition to .htaccess


<IfModule mod_security.c>
# Turn off mod_security filtering.  SMF is a big boy, it doesn't need its hands held.
SecFilterEngine Off

# The below probably isn't needed, but better safe than sorry.
SecFilterScanPOST Off
</IfModule>


Now it seems to work as it should be and I'm able to post links in whatever type article I want YAY! For a test I removed the code above from my .htaccess and it stil works ?!?!?!? Odd, perhaps I'm a victim of some major server-hiccup on Strato's side? I'll keep the code in the .htaccess file just to be sure but it's now working as it should, so I'm a very happy man \(^_^)/

Anyhow, as far as I'm concerned, I guess it's solved.

[edit]
Bookmarked this thread as a reference for Strato AG is needed in the future
[/edit]
Title: Re: Unable to use external weblinks in HTML/BCC articles
Post by: IchBin on January 17, 2012, 03:29:44 PM
That's great! Glad you figured it all out!
Title: Re: Unable to use external weblinks in HTML/BCC articles
Post by: Lum-chan on April 27, 2012, 12:58:41 AM
Somehow this problem re-ocurred. The most odd part is a second website running SMF 2.01 with TP 1.0 Final on the same server and this one doesn't give this error when playing with url's. ie I can use anything I want as a url but I can't do this with my primary site. Each site has it's own db. Both websites use the same webspace but each with it's own directory and domainname.

http://www.miaauw.com works OK with anything as URL in a html/BCC article
http://forum.lum-chan.com only accepts www.lum-chan.com or forum.lum-chan.com as URL in a HTML/BBC. Anything else as a URL will cause problems as mentioned in my startpost.

I don't get it. Anyone has any suggestions?
Title: Re: Unable to use external weblinks in HTML/BCC articles
Post by: G6Cad on April 27, 2012, 08:19:13 AM
What differ the sites in other mods? You have any other mod installed to the site where it doesent work? Something regarding the change of the URLs ?
Title: Re: Unable to use external weblinks in HTML/BCC articles
Post by: Lum-chan on April 27, 2012, 09:14:18 AM
It seems related to the entered URL but I can't find some kind of connection to any of the mods.

Here's my list of active mods as of today:

1.    SMF Gallery Lite    3.0.4    
2.    Random News Fader    1.0    
3.    YouTube BBCode    2.6    
4.    reCAPTCHA for SMF    0.9.8a    
5.    Enhanced PM Popup    1.0.1    
6.    Extended Help    1.0    
7.    Highslide 4 SMF    0.7a    
8.    Internal_Links_Use_Same_Window    1.2    
9.    TinyPortal    1.107    
10.    Spoiler Tag    0.7.2a    
11.    SMF Links    2.3    
12.    AvatarSelect    1.2.1    
13.    Default Avatar    2.1    
14.    SMF 2.0.1 Update    1.0    
15.    Project Snow 1.1    1.1    
16.    SMF 2.0.2 Update    1.0    
17.    Tapatalk SMF Plugin    1.0.2    
18.    Nico Embed BBCode    1.0.3    
19.    PM Sent Notification    1.0.5    
20.    Treasury    2.10
21.    Users Online Today    2.0 RC1

I uninstalled 'Internal_Links_Use_Same_Window' but this didn't fix it so I re-installed it again.

These are the installed mods on the site which works OK:

1.    TinyPortal    1.104    
2.    Extended Help    1.0    
3.    SMF Staff Page    1.7    
4.    SMF Gallery Lite    3.0.4    
5.    YouTube BBCode    2.6    
6.    Users Online Today    2.0 RC1    
7.    AvatarSelect    1.2.1    
8.    reCAPTCHA for SMF    0.9.8a    
9.    Nico Embed BBCode    1.0.3    
10.    Highslide 4 SMF    0.7a    
11.    Default Avatar    2.1    
12.    Random News Fader    1.0    
13.    SMF 2.0.1 Update    1.0    
14.    Project Snow 1.1    1.1
15.    SMF 2.0.2 Update    1.0
Title: Re: Unable to use external weblinks in HTML/BCC articles
Post by: IchBin on April 27, 2012, 04:38:39 PM
It's a host issue. You need to speak with your host to see why it's not working. They may have disabled  it in certain configurations or something.
Title: Re: Unable to use external weblinks in HTML/BCC articles
Post by: Lum-chan on April 27, 2012, 04:51:38 PM
Hmmm odd, Both sites are in one webhosting account. But the used database is very old. Maybe I could backup the database-contents, create a new one and restore
the contents in the newly created DB. Would this be an idea?

Otherwise I might have to get in touch with my hosting-company and let them figure out why this is happening. I'll keep you guys posted on this.
Title: Re: Unable to use external weblinks in HTML/BCC articles
Post by: lurkalot on April 27, 2012, 06:31:04 PM
Quote from: Lum-chan on April 27, 2012, 04:51:38 PM

Hmmm odd, Both sites are in one webhosting account.


I've had similar issues with mod security with two sites on one server.  It was enabled for my main site, but not on my test site.  So it might still be worth sending them a ticket.
Title: Re: Unable to use external weblinks in HTML/BCC articles
Post by: Lum-chan on April 27, 2012, 07:16:49 PM
Thanks! Will do this after some testing this weekend.
Title: Re: Unable to use external weblinks in HTML/BCC articles
Post by: Lum-chan on April 28, 2012, 08:20:40 AM
Quote from: Lum-chan on April 27, 2012, 07:16:49 PM
Thanks! Will do this after some testing this weekend.

[edit]
Tried another newly created database and restored the data from the old database. This didn't help.
[/edit]
Title: Re: Unable to use external weblinks in HTML/BCC articles
Post by: WillyP on April 30, 2012, 11:37:11 AM
Some hosts give you an option to change settings like this yourself. And even though both your sites are on the same host, it does not mean they are on the same machine, so there could be some variation in the server settings.
Title: Re: Unable to use external weblinks in HTML/BCC articles
Post by: Lum-chan on May 06, 2012, 05:06:56 PM
Thanks Willy! I did check the controls thoroughly but couldn't find such options anywhere. I'll open a ticket to resolve this problem. I'll report back when more info or a solution is available...
Title: Re: Unable to use external weblinks in HTML/BCC articles
Post by: Lum-chan on May 21, 2012, 09:17:41 AM
Odd? I tried to edit the same article again and now it does work without any problem? I guess it was a host-issue (again)...
Title: Re: Unable to use external weblinks in HTML/BCC articles
Post by: Lum-chan on May 12, 2014, 11:49:53 AM
I'm very sorry the delay in solving this.

Got it solved! It was a configuration of the anti-spam filter. odd enough it not only has influence on the email but also on used post-actions on websites. Disabled the anti-spam option and everything is working like a charm \(^_^)/
Title: Re: Unable to use external weblinks in HTML/BCC articles
Post by: WillyP on September 27, 2014, 01:33:30 AM
Glad you got it worked out, and I hope you don't get spammed now!